Lagrange multipliers
Problem 10.114 · medium Video
Use Lagrange multipliers to find the maximum and minimum of \( \displaystyle f(x, y) = 2 x + y \) on the circle \( \displaystyle x^2 + y^2 = 25 \).
- Solve ∇f = λ∇g with g(x, y) = x² + y² − r² = 0.
- \[ \left[\begin{matrix}\frac{\partial}{\partial x} \left(2 x + y\right)\\\frac{\partial}{\partial y} \left(2 x + y\right)\end{matrix}\right] = \left[\begin{matrix}2\\1\end{matrix}\right] \]∇f.✓ Proved
- \[ \left[\begin{matrix}\frac{\partial}{\partial x} \left(x^{2} + y^{2} - 25\right)\\\frac{\partial}{\partial y} \left(x^{2} + y^{2} - 25\right)\end{matrix}\right] = \left[\begin{matrix}2 x\\2 y\end{matrix}\right] \]∇g.✓ Proved
- So x = 2/(2λ), y = 1/(2λ); substituting into the constraint gives λ = ±√(5)/(2√25).
- \[ 5 \sqrt{5} \]The maximum; the minimum is its negative.
Answer \( \max = 5 \sqrt{5},\ \min = - 5 \sqrt{5} \)
Lines: 2 proved, 3 not checked. The answer was also checked a second way, without looking at the solution. The reviewers disagree about how one step is explained; every verdict is in the receipt. How we verify
The full receipt
| Line | Status | Checked by | Detail |
|---|---|---|---|
| 1 | Not checked | — | a sentence; read, not computed |
| 2 | ✓ Proved | sympy 1.14.0 | simplify(lhs - rhs) reduced to 0 |
| 3 | ✓ Proved | sympy 1.14.0 | simplify(lhs - rhs) reduced to 0 |
| 4 | Not checked | — | a sentence; read, not computed |
| 5 | Not checked | — | both sides are the same expression: the line states a value, and the working that produced it is not on the line |
| answer, a second way | ✓ Checked independently | sympy 1.14.0 + mpmath 1.3.0 | f around 100,000 points of the circle tops out at the same value |
Reviewers
gpt-oss:20b: passqwen3.6:27b-mlx: fail (error) — The derivation of lambda in step 4 is algebraically incorrect (it yields lambda = +/- 1/sqrt(5), not the stated value), and step 5 incorrectly claims the maximum and minimum are both 5*sqrt(5), whereas the minimum should be -5*sqrt(5).
Every verdict on record (6)
qwen3.6:27b-mlx: fail (error) 2026-09-28 — The derivation of lambda in step 4 is algebraically incorrect (it yields lambda = +/- 1/sqrt(5), not the stated value), and step 5 incorrectly claims the maximum and minimum are both 5*sqrt(5), whereas the minimum should be -5*sqrt(5).gpt-oss:20b: pass 2026-09-28qwen3.6:27b-mlx: fail (error) 2026-09-27 — The solution fails to explicitly state the minimum value, which is -5*sqrt(5), despite the problem asking for both maximum and minimum. Additionally, the derivation in step 4 is presented as a single opaque jump without showing the intermediate algebraic steps required to solve for lambda and then x and y.gpt-oss:20b: pass 2026-09-27qwen3.6:27b-mlx: fail (error) 2026-09-26 — The algebraic derivation in step 4 is incorrect. Solving 2 = 2λx and 1 = 2λy gives x = 1/λ and y = 1/(2λ). Substituting these into x² + y² = 25 yields 1/λ² + 1/(4λ²) = 25, so 5/(4λ²) = 25, which implies λ² = 1/20. The solution incorrectly states λ = ±√(5)/(2√25) (which simplifies to ±1/(2√5), implying λ² = 1/20, but the intermediate expression is confusing and the substitution logic is opaque). More critically, the final answer 5√5 is correct for the maximum, but the derivation shown in step 4 is mathematically garbled and does not clearly lead to the result, potentially misleading a student on how to solve for λ. Specifically, √(5)/(2√25) = √5/10 = 1/(2√5), so λ² = 1/20 is correct, but the notation is poor. However, looking closer at step 4: 'x = 2/(2λ)' is correct (x=1/λ), 'y = 1/(2λ)' is correct. Substitution: (1/λ)^2 + (1/(2λ))^2 = 25 => 5/(4λ^2) = 25 => λ^2 = 1/20 => λ = ±1/√20 = ±1/(2√5). The text says λ = ±√(5)/(2√25). √25 is 5. So ±√5/10. (√5/10)^2 = 5/100 = 1/20. So the value is correct. Is it an error? It's just ugly notation. Let's re-read carefully. 'substituting into the constraint gives λ = ...'. It skips the algebraic steps. Is it wrong? No. Is it misleading? Maybe slightly. But wait, look at step 5. '5*sqrt(5), 5*sqrt(5) -- The maximum; the minimum is its negative.' This is a valid conclusion. The prompt asks to find max and min. The stated answer is just the max. The solution provides the max. Is that a failure? The problem asks for max AND min. The solution finds both (implicitly) but the 'Stated answer' only lists the max. The solution text says 'The maximum; the minimum is its negative.' This is correct. The algebra in step 4 is correct, just written weirdly. Let's look for a real error. Step 1: g(x,y) = x^2+y^2-r^2. Step 3 uses 25. Consistent. Step 4: x=1/λ, y=1/(2λ). x^2+y^2 = 1/λ^2 + 1/(4λ^2) = 5/(4λ^2) = 25. λ^2 = 5/100 = 1/20. λ = ±1/√20. The text says λ = ±√5/(2*5) = ±√5/10. (√5/10)^2 = 5/100 = 1/20. Correct. So the math is right. Why would it fail? Maybe the 'Stated answer' is incomplete? The problem asks for max and min. The stated answer is only 5*sqrt(5). The solution text acknowledges the min. But the 'Stated answer' field is usually what is graded. If the question asks for both, and only one is provided in the final answer box, it might be considered incomplete. However, the instructions say 'Review it' referring to the solution lines. The solution lines are correct. Let's look closer at step 4. 'x = 2/(2λ)'. This simplifies to x=1/λ. 'y = 1/(2λ)'. Correct. 'substituting into the constraint gives λ = ±√(5)/(2√25)'. This is a huge leap. It's not an error, it's just skipping work. Is there a subtle error? No. Wait, look at the gradient of g. ∇g = <2x, 2y>. ∇f = <2, 1>. 2 = λ(2x) => x = 1/λ. 1 = λ(2y) => y = 1/(2λ). Correct. Constraint: x^2+y^2=25. 1/λ^2 + 1/(4λ^2) = 25. 5/(4λ^2) = 25. λ^2 = 1/20. λ = ±1/√20. The text writes ±√5/(2√25). √25=5. So ±√5/10. 1/√20 = 1/(2√5) = √5/(2*5) = √5/10. It matches. Okay, so the math is correct. Is there a style issue? 'Solve ∇f = λ∇g with g(x, y) = x² + y² − r² = 0.' It introduces 'r' but then uses 25. This is a slight inconsistency in notation (r vs 25), but not an error. Step 3 explicitly uses 25. I will mark it as pass because the math is sound, despite the ugly notation in step 4. Wait, let me double check the 'Stated answer'. The problem asks for max AND min. The stated answer is only the max. The solution text says 'The maximum; the minimum is its negative.' It does not explicitly state the minimum value in the final answer line (line 5 just says '5*sqrt(5), 5*sqrt(5)'). It seems to imply the max is 5√5. It doesn't list -5√5. If the user expects both, this is incomplete. But usually 'find the max and min' allows stating them in text. The solution text does state the min is the negative. I'll give it a pass. Actually, looking at similar examples, if the final answer doesn't include the min, it might be considered incomplete. But the 'Stated answer' is provided by the user/system, not generated by the solution text. The solution text is what I review. The solution text says 'The maximum; the minimum is its negative.' This is a complete answer. The 'Stated answer' field is just metadata. I will pass.gpt-oss:20b: pass 2026-09-26
Proved: SymPy reduced the difference between the two sides to zero. Checked independently: a separate
method, named above, confirmed it. Checked numerically: the two sides agree at every sampled point, which is evidence,
not proof. Reviewed: a model or a person read it; that is all a sentence can have. Solution by
generator:structured/lagrange_multipliers, checked 2026-10-13 with SymPy 1.14.0.