I have an optimization problem with two sets of parameters, $x_i \in [0,1]$ and $y_k \in [-\frac{\pi}{2},\frac{\pi}{2}]$ where $i,k \in \{1...n\}$ are indices. One way to solve this problem is using constrained optimization by setting appropriate bounds on the parameters $x_i, y_k$.
I have a second idea, and that is to transform the variables using the following transformations. $$x_i = \frac{\left(1 + tanh\left(m_i\right)\right)}{2},\,\, y_i = tan^{-1}\left(n_i\right)$$ where $m_i,\, n_i$ are unconstrained parameters and $m_i,\, n_i \in [-\infty,\infty]$. I can now carry out the optimization wrt to $m_i,\, n_i$ and then re-transform the optimized parameters. Both these are 1-1 transformations.
Can someone point out the issues in variable transformation for optimization and what is the nature of functions that can be used. Also, if it leads to faster convergence?
My empirical experiment shows that unconstrained solution is much better than constrained solution