# Optimization: Critical Points and Lagrange Multipliers

Physics I · Multivariable Calculus · https://tryals.app/learn/physics-i/optimization-critical-points-and-lagrange-multipliers

## Unconstrained Optimization

**Finding extrema** of $f(x,y)$ starts by computing the gradient vector $\nabla f = (f_x, f_y)$ and setting it to zero.

A **critical point** is any $(a,b)$ where $\nabla f = \vec{0}$. However, flat points also include **saddles**: a maximum in one direction and a minimum in another.

To classify critical points, use the **second derivative test** via the Hessian determinant:

$$D = f_{xx}f_{yy} - (f_{xy})^2$$

| Condition | Classification |
| --- | --- |
| $D > 0$, $f_{xx} > 0$ | Local minimum |
| $D > 0$, $f_{xx} < 0$ | Local maximum |
| $D < 0$ | Saddle point |
| $D = 0$ | Inconclusive |

**Common pitfall:** $\nabla f = 0$ alone only finds flat spots. The determinant $D$ is required to separate peaks, pits, and passes.

## Constrained Optimization

To optimise $f(x,y)$ subject to a constraint $g(x,y) = c$, use the **method of Lagrange multipliers**:

$$\nabla f = \lambda\,\nabla g \quad\text{and}\quad g(x,y) = c$$

**Geometric meaning:** At the optimum, the level curves of $f$ and $g$ are **tangent**, meaning their gradients are parallel.

The scalar $\lambda$ is the **Lagrange multiplier**. It measures how sensitive the optimum value is to small changes in the constraint value $c$.

> **Tip:** Lagrange multipliers only find interior constrained points. Always check boundary behavior too, as global extrema often occur at domain endpoints.

## Practice questions

6 of this lesson's 11 practice questions, with answers. The full set is in the app.

### 1. Sort: unconstrained optimization or constrained (Lagrange multipliers)?

**Answer:**

- Unconstrained: Minimize $f(x,y)$ with no restrictions, Find where $\nabla f$ = 0, Apply the second derivative test
- Constrained (Lagrange): Maximize $f(x,y)$ subject to $g(x,y) = 0$, Optimize f on the boundary of a region, Solve $\nabla f$ = $\lambda \nabla g$ and $g = 0$

**Why:** Lagrange multipliers handle optimization with equality constraints.

Page: https://tryals.app/practice/physics-i/optimization-critical-points-and-lagrange-multipliers/sort-unconstrained-optimization-or-constrained-lagrange

### 2. At a constrained optimum (maximize $f$ along the curve $g = c$), Lagrange says $\nabla f = \lambda\nabla g$. What is the geometric picture behind this equation?

A. The constraint curve passes through the unconstrained peak of $f$
B. The two gradients are perpendicular at the optimum
C. The level curve of $f$ is tangent to the constraint
D. $f$ and $g$ have equal values there

**Answer:** C. The level curve of $f$ is tangent to the constraint

**Why:** While level curves cross the constraint, sliding along it still improves $f$; the climb halts exactly where a level curve kisses the constraint tangentially. Parallel tangents mean parallel normals: $\nabla f = \lambda\nabla g$, with $\lambda$ measuring how hard the constraint is holding you back.

Page: https://tryals.app/practice/physics-i/optimization-critical-points-and-lagrange-multipliers/at-a-constrained-optimum-maximize-f-along-the-curve-g-c-lagrange

### 3. At a Lagrange optimum $\nabla f = \lambda \nabla g$. Why must the two gradients be parallel there?

A. Because otherwise you could still improve along the constraint
B. Because $\lambda$ is chosen to make them parallel by definition
C. Because the constraint forces the two functions to have equal gradients
D. Because gradients of any two functions are parallel at a critical point

**Answer:** A. Because otherwise you could still improve along the constraint

**Why:** A component of $\nabla f$ along the surface is an unexploited improvement. Parallelism says there is none left, and $\lambda$ measures how much the optimum would improve if the constraint were relaxed.

Page: https://tryals.app/practice/physics-i/optimization-critical-points-and-lagrange-multipliers/at-a-lagrange-optimum-f-g-why-must-the-two-gradients-be

### 4. At any point where $f_x = 0$ and $f_y = 0$, the function has a local maximum or minimum.

**Answer:** False

**Why:** False. Both partials vanish at a saddle point too, $x^2 - y^2$ at the origin is a minimum along $x$ and a maximum along $y$. Classifying a critical point needs the second-derivative test, and where its discriminant is zero even that is inconclusive.

Page: https://tryals.app/practice/physics-i/optimization-critical-points-and-lagrange-multipliers/at-any-point-where-fx-0-and-fy-0-the-function-has-a-local

### 5. Match each second derivative test outcome to the classification.

**Answer:**

- D > 0, $f_{xx}$ > 0 → Local minimum
- D > 0, $f_{xx}$ < 0 → Local maximum
- D < 0 → Saddle point
- $D = 0$ → Test inconclusive

**Why:** The discriminant $D = f_{xx}f$ᵧᵧ − ($f_{x}$ᵧ)² determines the critical point type.

Page: https://tryals.app/practice/physics-i/optimization-critical-points-and-lagrange-multipliers/match-each-second-derivative-test-outcome-to-the-classification

### 6. Which conditions define a critical point of $f(x,y)$?

A. $\nabla f$(a,b) = (0, 0)
B. $f(a,b) = 0$
C. fᵧ(a,b) = 0
D. $f_{x}(a,b) = 0$

**Answer:** A. $\nabla f$(a,b) = (0, 0); C. fᵧ(a,b) = 0; D. $f_{x}(a,b) = 0$

**Why:** Critical points have $\nabla f$ = 0; the function value itself can be anything.

Page: https://tryals.app/practice/physics-i/optimization-critical-points-and-lagrange-multipliers/which-conditions-define-a-critical-point-of-f-x-y
