Lagrange Multipliers Practice Problems with Answers
12 Lagrange multiplier practice problems with answers: max and min on lines and circles, closest points, three variables and the meaning of lambda.
Multivariable calculus Updated 5 min read
At a glance
- Problems
- 12, with answers and full solutions
- Level
- Calculus 3
- You need
- Partial derivatives and solving systems of equations
- Main idea
- At a constrained max or min, the gradient of f is parallel to the gradient of the constraint
- Practice with new numbers
- Lagrange multipliers lesson
On this page
These Lagrange multiplier practice problems cover two-variable problems on lines and circles, closest-point problems, three-variable problems and what \lambda means. Try each one first. The answers come first, then full solutions.
The method, to find extreme values of f subject to g = k:
Solve the system, then compare f at every solution. For the geometry behind it, read the Lagrange multipliers guide.
Problems
Constraint on a line
- Maximize f(x, y) = xy subject to x + y = 10.
- Minimize f(x, y) = x^2 + y^2 subject to x + y = 4.
- Find the point on the line 2x + y = 5 closest to the origin.
Constraint on a circle
- Find the max and min of f(x, y) = x + y on x^2 + y^2 = 2.
- Find the max and min of f(x, y) = xy on x^2 + y^2 = 8.
- Find the max and min of f(x, y) = x^2y on x^2 + y^2 = 3.
- Find the max and min of f(x, y) = 2x + 3y on x^2 + y^2 = 13.
Three variables and applications
- Maximize f(x, y, z) = xyz subject to x + y + z = 12, with x, y, z > 0.
- Find the point on the plane x + 2y + 2z = 9 closest to the origin.
- A closed box has volume 8. Find the dimensions with the least surface area.
- A rectangle has perimeter 40. Find its largest possible area.
- In problem 1, find \lambda. Use it to estimate the new maximum if the constraint becomes x + y = 11, and compare with the exact value.
Answers
| Problem | Answer |
|---|---|
| 1 | Max 25 at (5, 5) |
| 2 | Min 8 at (2, 2) |
| 3 | (2, 1), distance \sqrt{5} |
| 4 | Max 2 at (1, 1), min -2 at (-1, -1) |
| 5 | Max 4 at \pm(2, 2), min -4 at \pm(2, -2) |
| 6 | Max 2 at (\pm\sqrt{2}, 1), min -2 at (\pm\sqrt{2}, -1) |
| 7 | Max 13 at (2, 3), min -13 at (-2, -3) |
| 8 | Max 64 at (4, 4, 4) |
| 9 | (1, 2, 2), distance 3 |
| 10 | A 2\times 2\times 2 cube, surface area 24 |
| 11 | 100, a 10\times 10 square |
| 12 | \lambda = 5; estimate 30, exact 30.25 |
Step-by-step solutions
1. \nabla f = \langle y, x\rangle and \nabla g = \langle 1, 1\rangle. So y = \lambda and x = \lambda, which gives x = y. The constraint gives x = y = 5 and f = 25.
2. \langle 2x, 2y\rangle = \lambda\langle 1, 1\rangle, so x = y = 2 and f = 8. Along the line, x^2 + y^2 grows without bound, so this is a minimum.
3. Minimize the squared distance x^2 + y^2. Then 2x = 2\lambda and 2y = \lambda, so x = 2y. The constraint gives 4y + y = 5, so y = 1 and x = 2. The distance is \sqrt{4 + 1} = \sqrt{5}.
4. \langle 1, 1\rangle = \lambda\langle 2x, 2y\rangle, so x = y. Then 2x^2 = 2, so x = \pm 1. Compare: f(1, 1) = 2 and f(-1, -1) = -2.
5. y = 2\lambda x and x = 2\lambda y. Multiply: xy = 4\lambda^2 xy. If xy \neq 0, then \lambda = \pm\frac{1}{2} and x^2 = y^2. The constraint gives x^2 = 4. The points (2, 2) and (-2, -2) give 4; (2, -2) and (-2, 2) give -4. If xy = 0 then f = 0, which is neither extreme.
6. 2xy = 2\lambda x and x^2 = 2\lambda y. If x \neq 0, the first gives \lambda = y, and the second gives x^2 = 2y^2. The constraint becomes 3y^2 = 3, so y = \pm 1 and x = \pm\sqrt{2}. Then f = x^2y = 2y, which is 2 or -2. The case x = 0 gives f = 0.
7. 2 = 2\lambda x and 3 = 2\lambda y, so \frac{y}{x} = \frac{3}{2} and y = \frac{3}{2}x. The constraint gives x^2 + \frac{9}{4}x^2 = 13, so x^2 = 4 and x = \pm 2. The points (2, 3) and (-2, -3) give 13 and -13.
8. yz = \lambda, xz = \lambda and xy = \lambda. Comparing them gives x = y = z, so each is 4 and f = 64.
9. Minimize x^2 + y^2 + z^2. Then \langle 2x, 2y, 2z\rangle = \lambda\langle 1, 2, 2\rangle, so (x, y, z) = t(1, 2, 2). The constraint gives t + 4t + 4t = 9, so t = 1. The point is (1, 2, 2) and the distance is \sqrt{1 + 4 + 4} = 3.
10. Minimize S = 2(xy + yz + xz) subject to xyz = 8. The equations 2(y + z) = \lambda yz, 2(x + z) = \lambda xz and 2(x + y) = \lambda xy give x = y = z. Then x^3 = 8, so the box is a 2\times 2\times 2 cube with S = 24.
11. Maximize xy subject to 2x + 2y = 40. Then y = 2\lambda and x = 2\lambda, so x = y = 10 and the area is 100.
12. In problem 1, \lambda = x = 5. Raising the constraint from 10 to 11 should raise the max by about 5, to 30. The exact max for x + y = 11 is 5.5^2 = 30.25. Close.
Common mistakes on these problems
- Dividing by a variable that could be 0. In problems 5 and 6, check the cases x = 0 or y = 0 separately.
- Forgetting the constraint equation. \nabla f = \lambda\nabla g alone has too many unknowns. The constraint is the extra equation.
- Stopping at one point. On a circle there is both a max and a min. Find every solution and compare.
- Minimizing distance with a square root. Minimize the squared distance instead. It has the same minimum point and simpler derivatives.
Keep practicing
For unlimited problems with instant feedback, try the Lagrange multipliers lesson and the critical points and second derivative test lesson. For practice with the gradients these problems need, see the partial derivative problems.
Practice it now
Lagrange multipliers
Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.
Practice this lesson