# Second derivative test vs Lagrange multipliers

Hi I just have a quick question about optimization for multi-variable functions. I know you can optimize using the second derivative test for a bounded region on the graph, but I don't know how the methods as described in this video (https://www.youtube.com/watch?v=wkQp2ifFHP8&t=906s) are different than using Lagrange multipliers. To me they both optimize with a constraint.

• yes they both do optimise with a constraint but lagrange multipliers is more powerful, it can be used if you have a nonlinear constraint. Jul 18 '19 at 17:08
• @GeorgeDewhirst why wouldn't it be possible to use the same method in the video on nonlinear constraints? Couldn't we solve for an equation that describes the values of the function along the constraint regardless of the degree, or is it that it is possible but complicated? Jul 22 '19 at 15:35
• Yes you could, if you can explicitly solve a constraint and derive a feasible region, then you can check for turning points and check all of the points on the boundary. This would only work if you had a continuous region satisfying the constraint. Often this will be difficult to do in practice. One challenge here might be if the feasible region were disconnected. For example what if the constraint is $\sin(x) \leq \frac{1}{2}$? Jul 22 '19 at 15:45
• An example of a nonlinear constraint you could do is: $\min f(x)$ subject to $x^2 \leq 2$. Then we know the feasible region is just $[-\sqrt(2),\sqrt(2)]$ and we can find all turning points and check $f(\sqrt(2)), f(-\sqrt(2))$ Jul 22 '19 at 15:49
• Just to clarify, when you say a continuous region satisfying the constraint, do you mean that the domain of the constraint is on the domain of the function? Also if the continuous region doesn't satisfy the constraint and we still try to use this method would we get non-real solutions when solving? Jul 22 '19 at 15:57

As George Dewhirst said, Lagrange multipliers are powerful because they allow you to optimize your output $$f$$ by any constraint function $$g$$, by optimizing $$\nabla(f-\lambda g)$$, and then subbing it the values you find - regardless of whether $$g$$ is linear or not.