I've had experience in the past with Lagrange multipliers, but am struggling with this one.
Maximize $f(x_{1},x_{2},x_{3}) = \sqrt{x_{1}x_{2}} + \sqrt{x_{3}}$ subject to the constraint $p_{1}x_{1} + p_{2}x_{2} + p_{3}x_{3} = m$, where $p_{i}$ is a constant $\geq 0$ and $x_{i} \geq 0$
I've done the beginning, with ease :
$$\frac{x_{2}}{2\sqrt{x_{1}x_{2}}} = \lambda p_{1} $$
$$\frac{x_{1}}{2\sqrt{x_{1}x_{2}}} = \lambda p_{2} $$
$$\frac{1}{2\sqrt{x_{3}}} = \lambda p_{3} $$
I notice that if I divide the first equation by the second, and then vice versa, I get:
$$x_{2} = \frac{p_{1}x_{1}}{p_{2}}$$ and $$x_{1} = \frac{p_{2}x_{2}}{p_{1}}$$
However, I can't figure out how to proceed/what to do with the third equation. I find myself often going in circles/getting unreasonable answers with Lagrange multipliers. Any advice would be great here, thanks!
Note that some care must be taken here when applying the Lagrange multiplier method as the cost function is not differentiable at all feasible points.
I am assuming that $p_k >0$ for all $k$, and (implicitly) that $m>0$.
Note that the feasible set is compact, hence a minimiser and a maximiser exist. Not that it matters here, but the minimum is seen to be zero and must have $x_3=0$ and either $x_1$ or $x_2$ equal to zero (in which case the constraint gives the value of $x_2,x_1$ respectively).
Suppose $x$ is a maximiser, then either at least one component is zero or none are zero. If none are zero, the Lagrange condition must hold.
Suppose $x$ is a maximiser and $x_3 = 0$. Consider a perturbation $z(t) = x+(-{p_3 \over 2 p_1} t^2, -{p_3 \over 2 p_2} t^2, t^2)$ for small $t$. The choice of $t^2$ is to ensure that the cost $d(t) = f(z(t))$ is differentiable at $t=0$. It is easy to check that $z(t)$ is feasible for small $t$. It is also easy to verify that $d'(0) = 1 >0$, and so we see that $x=d(0)$ is not a maximiser. Hence we know that if $x$ is a maximiser, then $x_3 >0$.
Now suppose $x$ is a maximiser with $x_k >0$ for all $k$. The Lagrange condition must hold.
Multiplying the first two equations together gives ${1 \over 4} = \lambda^2 p_1 p_2$, the third gives $\sqrt{x_3} = {1 \over 2 \lambda p_3}$. Hence $\lambda >0$ and so $\lambda = {1 \over 2 \sqrt{p_1 p_2}}$, which gives $x_3 = { p_1 p_2 \over p_3^2 }$. The equations give $\lambda p_1 x_1 = \lambda p_2 x_2 = {1 \over 2 } \sqrt{x_1 x_2}$, hence $p_1 x_1 = p_2 x_2$. The constraint gives $2 p_1 x_1 = m - p_3 x_3 = m - {p_1 p_2 \over p_3 }$. Since $x_1 >0$, we have $m > {p_1 p_2 \over p_3 }$. In this case, the cost is given by ${1 \over 2} {m - {p_1 p_2 \over p_3} \over \sqrt{p_1 p_2} } + { \sqrt{p_1 p_2 } \over p_3}$.
Note, in particular, that if $m \le {p_1 p_2 \over p_3 }$, this condition implies that the Lagrange condition cannot hold, hence in this case, at least one of $x_1,x_2$ must be zero. In this case, the cost is given by $\sqrt{x_3}$, and hence is maximised when $x_3 = {m \over p_3}$ with cost $\sqrt{m \over p_3}$.
Combining these, we see that the maximum cost is given by ${1 \over 2} {\max(m - {p_1 p_2 \over p_3},0) \over \sqrt{p_1 p_2} } + \min({ \sqrt{p_1 p_2 } \over p_3}, \sqrt{m \over p_3})$.
Here is a slightly simpler approach:
Note that the constraints imply that $x_3 \in [0,{ m \over p_3}]$. Fix $x_3$ and solve the problem $\min \{x_1 x_2 | p_1 x_1 + p_2 x_2 = m-p_3 x_3 \}$. The Lagrange conditions are $x_2 = \mu p_1, x_1 = \mu p_2$, which gives $\mu = {m-p_3 x_3 \over 2 p_1 p_2 }$. Substituting values shows that the original cost is $c(x_3) = {m-p_3 x_3 \over 2 \sqrt{p_1 p_2 }} + \sqrt{x_3}$. It is straightforward to see that this is strictly increasing up to a maximum (for $x_3 \ge 0$) at $x_3^* = {\sqrt{p_2 p_2} \over p_3}$, and then strictly decreasing afterwards.
In particular, the maximiser of the original problem is $\hat{x}_3 = \min({{p_2 p_2} \over p_3^2}, {m \over p_3})$, computing $c(\hat{x}_3)$ results in the expression above.