I've noticed that most Lagrange multiplier problems I've seen can be solved with other methods. Often the method of Lagrange multipliers takes longer than the other available methods. I don't like forcing my students to use Lagrange multipliers on a problem that has an easier solution via other methods, but I'm having trouble coming up with problems where the method of Lagrange multipliers is the best solution.

Ideally I'm looking for problems that are easy enough to put on a quiz or test (some of the equation solving can be quite time consuming for these types of problems). Does anyone have any good ideas for problems or ideas for where I could look?

  • 1
    $\begingroup$ There are some nice classical mechanics examples here, @wikibooks. $\endgroup$ Jul 8, 2015 at 21:09
  • 1
    $\begingroup$ This doesn't answer the question but I think it's useful to tackle the same problem using a variety of methods. Do a problem with Lagrange and another method and compare. Lagrange Multipliers were always mysterious to me as they are often taught as a procedure without any background (in my opinion). $\endgroup$
    – Karl
    Jul 8, 2015 at 21:31
  • $\begingroup$ It might be worth mentioning, in the technique's analog to Lagrangian mechanics, the multipliers are generalized forces. Moreover, the idea of adding dimensions to implement a constraint in an unconstrained setting is a story which plays out again and again as we study more abstract settings in mathematical physics. Perhaps not great motivation for the bulk of a multivariate calculus section, but, maybe it motivates the boundary. The problem of seeing Lagrange multipliers as a critical point problem for a function of more variables is an interesting homework if nothing else. $\endgroup$ Jul 9, 2015 at 15:02
  • $\begingroup$ @JamesS.Cook can you give an example of where "adding dimensions to implement a constraint in an unconstrained setting " is useful? $\endgroup$ Jul 9, 2015 at 15:26
  • 2
    $\begingroup$ @StevenGubkin incidentally, the calculus III problems exhibiting this transition in viewpoint to unconstrained is given in my Problem 100 at supermath.info/math231mission5f2014.pdf (followed by one of my most beloved homework problems) $\endgroup$ Jul 9, 2015 at 15:44

5 Answers 5


A place that Lagrange Multipliers comes up is in the proof of the real spectral theorem.

Namely, let $A$ be a symmetric matrix.

Define $f: \mathbb{R}^n \to \mathbb{R}$ by $f(v) = v^\top A v$.

If you maximize $f$ on the unit sphere in $\mathbb{R}^n$, the Lagrange Multiplier condition will show that the maximum is achieved at an eigenvector of $A$. This is the hard part of the real spectral theorem.

I am not sure how much linear algebra your students have, but this could be an appropriate exercise on a test.

It is also important for the second derivative test later, since analyzing the definiteness of the Hessian of a function can be approached systematically by finding the eigenvalues of this Hessian. The real spectral theorem provides a theoretical basis for the existence of these eigenvectors.

  • $\begingroup$ For a class without as much linear algebra, you could still do an explicit version of this. For instance, maximize $4x^2 + 3xy - y^2$ on the unit circle, or maximize $2x^2+2xz+5xy+y^2-3z^2$ on the unit sphere. $\endgroup$ Jul 8, 2015 at 23:08
  • 4
    $\begingroup$ This is definitely a nice application. I'm teaching a multivariable calculus class so most of my students don't know much linear algebra and aren't comfortable with proofs, so it's not something I could give to them, but it would be nice for a more advanced class. Thanks! $\endgroup$
    – Seth
    Jul 9, 2015 at 1:25
  • $\begingroup$ This is a very beautiful application. Not only does it give you a symbolic calculation in $n$-dimensions, it also warrants discussion of constraint manifolds of dimension $n-1$ all the way down to $0$. It is a maximal example of the technique in the sense you get to calculate with a single-multiplier and then all the way to $n-1$ multipliers as you consider constraints which correspond to normal spaces of dimension $1$ all the way to $n-1$. $\endgroup$ Sep 24, 2015 at 12:36

A question with two constraints might make the method seem preferable to finding a parameterization (which I assume is the "easier" technique you refer too in the OP).

For example, maximizing $f(x,y,z)=x−y$ subject to the two constraints that $x^2+y^2+z^2=1$ and $x+y+z=1$ might be difficult for students to do without Lagrange multipliers. Is this form of the theorem treated in your course, or only one constraint?

  • $\begingroup$ I chose to skip the version with more than one constraint since I figured one constraint was already "hard enough" for them (and also for the sake of time in class). But perhaps in the future I'll teach the version with two constraints too and consider examples like this. $\endgroup$
    – Seth
    Jul 9, 2015 at 2:38

I am also vaguely aware that in economics, the actual value of $\lambda$ is often important.

Say you have a function $f$ which needs to be optimized subject to a constraint $g = c$. Then it turns out that $\frac{d}{dc} \operatorname{max}(f) = \lambda$, where $\lambda$ is the lagrange multiplier.

Exploring this set of ideas could be interesting, and motivate the need to use Lagrange multipliers, since the other methods do not give this extra data.

An interesting way to get at this idea might be to come up with an "applied" problem where the constraint value $c$ could reasonably vary. Then have them use lagrange multipliers to find the maximum of $f$ when $c=100$ and when $c=101$. Then observe that the maximum increased by approximately $\lambda$. Rig up your problem so that this is fairly obvious (maybe the max in one case is $1000$, $\lambda$ is $21$ and the new maximum is $1021.01352...$).


Of course, I endorse Steve Gubkin's answers as manifestly more relevant to multivariable calculus. What follows is a second or third order motivation:

One interesting bit which connects $n$-dimensional constrained analysis to $n+1$ critical point analysis is the following trick: I'll just indicate it for $n=2$: suppose we wish to find extrema of $f(x,y)$ on the bounded constraint curve $g(x,y)=c$.

Define $F(x,y,\lambda) = f(x,y)-\lambda (g(x,y)-c)$

Here $\lambda$ plays the usual role of $z$. In this notation: $\nabla F = \langle \partial_x F, \ \partial_y F, \ \partial_{\lambda} F \rangle$. Then the condition $\nabla F = 0$ yields: $$ \nabla F = \langle \partial_x f-\lambda \partial_x g, \ \partial_y f-\lambda \partial_y g, \ g-c \rangle . $$ Which gives us both the colinearity of the two-dimensional gradients of $f$ and $g$ as well as the constraint.

So, one way we can understand the method of Lagrange multipliers is that it is trading a constrained problem in $n$ dimensions for an unconstrained problem in $n+1$ dimensions.

For the start of how this appears in Junior level mechanics see pages 275-281 of John Taylor's Classical Mechanics or the related PSE question. Page 20 or so of Jon-Ivar Skullerud's Notes from MP350 Classical Mechanics has a very readable presentation (quite close to what I saw in school as a physics undergrad). Some nice (mostly math) examples Wikipedia Example page

Finally, to make good on my earlier comment, the Auxiliary variable concept is behind many of the techniques used in modern theoretical physics. At the moment, I can't find a good general article on this. I recall the idea from conversations with other graduate students in physics. Roughly, the idea is when we have a global symmetry of physics then we can implement it as if it was a dynamical symmetry by introducing auxiliary fields. I think the idea is that some of these may have had interactions at an early point in the universe, but, at the moment the symmetry is frozen hence the equations governing the field are merely algebraic. Algebraic symmetries are quite important, the particles seen form representations of these symmetry groups and basically we are able to predict (at times see the $\Omega_-$ story) the existence of new particles from a pattern. All of this said, the use of the term "auxiliary" in physics is much more general than that particular use I sketch above. Generally, there is always a question of whether we leave a constraint unimposed, or apply the constraint. A professor I studied GR from apparently found an (unphysical) solution to quantum gravity after decades of work because he finally decided to work with the unconstrained problem and only apply the constraint at the end of the analysis. It's easy to see your wrong in related rates when you fix everything to constant and get a obviously wrong result. It's much harder to ascertain you are in error when the analysis is based on a partial fixing which leaves some dynamics. Here is a token example of such terminology: BRST and auxiliary field. I think there must be a better article somewhere, but I leave it at this for now.


You may be able to tweak an ordinary problem into one that fits your needs. Here are a some suggestions, the first two involving optimizing with linear functionals.

1) Optimize on an interesting parameterized convex surface, such as an ellipsoid or an appropriate portion of a hyperboloid. You might even compare that with solving on a sphere. The idea is to "follow the normal until you fall off the constraint", but for a sphere that point is easy to compute in ones head, while not so much for an ellipsoid or section of a hyperboloid.

2) Draw a picture of a surface (say two hills), and put a table of 14 points marked on the surface, with a table of the labels and the coordinates of the points. Give a linear functional F and ask which points of the surface are likely to be values that yield near-optimal values for F on the surface. Although they can solve it by computing F on each of the 14 points, the exercise is to imagine the hyperplane moving through the surface and finding points of tangency. This tests a geometric intuition for what is going on, and gives them a chance to verify it by computing F at the one or two points that are near optimal.

3) Try a squared "distance" from a point, where squared "distance" is determined by some quadratic form ((x -x')^2 + 2(y-y')^2 is a simple variation). Even if they change coordinates to solve the problem more simply, the have Lagrange multipliers to fall back on to confirm.

Gerhard "Also Check Points On Boundary" Paseman, 2015.09.25


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.