Suppose I want to maximize the likelihood $L(\theta_1, \theta_2)$ for some constraint for example $\theta_1 + \theta_2 = 1$ and no other constraints
Can I just replace $\theta_2$ by $1 - \theta_1$ in the likelihood then do gradient descent on $\theta_1$. If I can, or cannot, why?
Can I set up an objective function with Lagrange multiplier $\mathcal{L} = L(\theta_1, \theta_2) + \lambda (\theta_1 + \theta_2 - 1)$ and do a gradient descent algorithm on $\mathcal{L}$? If I can, or cannot, why?
Do I only can rely on projected gradient descent if I want to solve this constrained optimization problem using gradient descent?
EDIT: I tried all 3 options and maybe my likelihood function is not "regular" and only option 3 works :'( I would like to know why and when options 1 and 2 work.
Thank you very much in advance for all the help.