Is unconstrained optimization more preferable to constrained one?

772 Views Asked by At

This might be a very naive question, as I have only done one course in numerical analysis many years ago in undergraduate study.

The story is that one day I was doing some very simple optimization for my applied work as usual. Let's denote the target function by $f(x)$, whose domain is $(0,1)$. I passed this function to some built-in constrained optimizer of the software, and that's it. When the code was shared with a friend, he asked why I didn't convert the problem to an unconstrained one, by, e.g., the transform $$ \varphi(t) = \frac{e^t}{1+e^t}, t \in \mathbb{R} $$ In other words, he suggested to do the optimization on $t \mapsto f(\varphi(t))$, find the optimizing point $t_0$, and the result would be $\varphi(t_0)$.

Question: I understand equivalence between these two methods. What I fail to perceive is my friend's claim that I should always convert constrained problem to an unconstrained one, if possible. When I asked why, he couldn't give the reason but just said that (back to the days of his undergraduate study) his lecturer said that constrained optimization can have some problem on the boundary (He is not very certain, so maybe the reason is even wrong).

If my friend was right, can anyone help to explain the reason behind it? Or, perhaps he has been wrong, as there is no difference between constrained and unconstrained optimization?

Thanks for any help!

1

There are 1 best solutions below

1
On

In general there's no reason to avoid constrained problems if you have software that can handle them. But do you really mean it when you say the domain is $(0,1)$ (rather than $[0,1]$)? If the objective does not extend to a continuous function on $[0,1]$, a solver for constrained problems may indeed have trouble at the boundary. In that case, the suggested transformation might be a good idea.