I need to solve the following optimization problem
Let $X=\left\{ x_{i}\right\} _{i=1}^{n}$ be an independent sequence of $k$-face die rolls. Where for $j\in\left[k\right]$ we have $p\left(x_{i}=j\right)=\theta_{j}$ (So $\sum_{i=1}^{k}\theta_{i}=1$)
I am requested to find the ML estimator for $\theta$ for $k=3$ under the constraint $\theta_{1}=\theta_{2}+\theta_{3}$
My work so far:
The log likelihood function is given by $$\ell\left(\theta\mid X\right)=\log p_{\theta}\left(X\right)=\log\prod_{i=1}^{n}p_{\theta}\left(x_{i}\right)=\sum_{i=1}^{n}\log p_{\theta}\left(x_{i}\right)=\sum_{i=1}^{n}\log\theta_{x_{i}}=\sum_{i=1}^{k}n_{i}\log\theta_{i}$$ where $n_{i}$ is the number of occurrences of face $i$
So the appropriate Lagrangian function is $$\mathcal{L}\left(\theta\right)=\ell\left(\theta\mid X\right)-\lambda_{0}\left(\sum_{i=1}^{k}\theta_{i}-1\right)-\lambda_{1}\left(\theta_{1}-\theta_{2}-\theta_{3}\right)=$$ $$\sum_{i=1}^{3}n_{i}\log\theta_{i}-\lambda_{0}\left(\theta_{1}+\theta_{2}+\theta_{3}-1\right)-\lambda_{1}\left(\theta_{1}-\theta_{2}-\theta_{3}\right)$$
and then we need to solve
$$\nabla\mathcal{L}=\left(\begin{matrix}\frac{\partial\mathcal{L}}{\partial\theta_{1}}\\ \frac{\partial\mathcal{L}}{\partial\theta_{2}}\\ \frac{\partial\mathcal{L}}{\partial\theta_{3}}\\ \frac{\partial\mathcal{L}}{\partial\lambda_{0}}\\ \frac{\partial\mathcal{L}}{\partial\lambda_{1}} \end{matrix}\right)=\left(\begin{matrix}\frac{n_{1}}{\theta_{1}}-\lambda_{0}-\lambda_{1}\\ \frac{n_{2}}{\theta_{2}}-\lambda_{0}+\lambda_{1}\\ \frac{n_{3}}{\theta_{3}}-\lambda_{0}+\lambda_{1}\\ -\theta_{1}-\theta_{2}-\theta_{3}+1\\ -\theta_{1}+\theta_{2}+\theta_{3} \end{matrix}\right)=\left(\begin{matrix}0\\ 0\\ 0\\ 0\\ 0 \end{matrix}\right)$$
Is this analysis correct? If so, do I really have to solve 5 (non linear) equations with 5 unknowns to get the answer? This is my first time working with Lagrange multipliers, and it seems to me that either I am wrong here or else there is some kind of a workaround, especially since the following questions seem like they'l end up with even more equations.
These aren't that hard to solve, despite being nonlinear. Referring to the equations by row number, $0=(2)-(3)$ gives $\theta_3 = n_3\theta_2/n_2$.
Next, $0=(4)-(5)=-2\theta_2+1-2\theta_3$. Plug in your $\theta_3$ to solve for $\theta_2$. Keep going...