Home / Courses / Calculus III (Multivariable) / Unit 4
Calculus III (Multivariable) Unit 4: Gradient & optimization
The gradient points in the direction of steepest increase. Setting it to zero finds critical points, and Lagrange multipliers handle constraints.
Covers: Directional derivatives, gradient, local extrema, Lagrange multipliers
Study guide
The gradient ∇f = ⟨f_x, f_y⟩ (with f_z in 3D) packages all the partial derivatives into one vector. It points in the direction of steepest increase, its magnitude is the maximum rate of increase, and it's perpendicular to level curves (and level surfaces).
The directional derivative gives the rate of change in any direction: D_u f = ∇f·u, where u is a unit vector. Always normalize the direction first. The maximum value of D_u f is |∇f|, in the direction of ∇f, and the minimum is −|∇f|. In 3D, ∇F at a point is normal to the level surface F = k there, which gives tangent planes to implicit surfaces.
Local extrema occur at critical points, where ∇f = 0 or a partial doesn't exist. The second derivative test uses D = f_xx f_yy − (f_xy)²: if D > 0 and f_xx > 0 it's a local min, if D > 0 and f_xx < 0 a local max, if D < 0 a saddle point, and if D = 0 the test is inconclusive. Absolute extrema on a closed, bounded region occur at critical points inside or on the boundary, so check both.
Lagrange multipliers optimize f subject to a constraint g(x, y) = c. At an extremum the gradients are parallel: ∇f = λ∇g. Solve this system together with the constraint, then compare f at the resulting points to find the max and min.
To check the boundary, parametrize each edge (for example, y = 0 for 0 ≤ x ≤ 2), substitute to get a one-variable function, find its critical points, and include the corner points as candidates. On an unbounded region, also check how f behaves as x or y grows without bound. A max or min exists only if f doesn't keep growing or shrinking in some direction.
The tangent plane to F(x, y, z) = k at (x₀, y₀, z₀) is F_x(x − x₀) + F_y(y − y₀) + F_z(z − z₀) = 0, with the partials evaluated at the point. To minimize a distance, minimize the squared distance instead. It has the same minimizer and much simpler derivatives, with or without Lagrange multipliers.
Key ideas
- ∇f = ⟨f_x, f_y⟩ points uphill, and its length is the maximum rate of increase.
- Directional derivative in unit direction u: D_u f = ∇f·u.
- The gradient is perpendicular to level curves.
- Critical points: ∇f = 0. Classify them with the second derivative test D = f_xx·f_yy − (f_xy)².
- Lagrange multipliers: at a constrained extremum, ∇f = λ∇g.
Formulas and rules
Common mistakes
- Using a non-unit vector for a directional derivative.
- Forgetting D = 0 is inconclusive.
Words to know
- Gradient (∇f)
- The vector of partial derivatives; points in the direction of steepest increase.
- Directional derivative formula
- D_u f = ∇f·u with u a unit vector.
- Saddle point
- A critical point with D < 0: a max in one direction, min in another.
- Lagrange multiplier condition
- ∇f = λ∇g together with the constraint g = c.
- Gradient and level curves
- ∇f is perpendicular to level curves.
- Directional derivative
- D_u f = ∇f·u, with u a unit vector.
- Maximum rate of increase
- |∇f|, in the direction of ∇f.
- Critical point (2 variables)
- Where ∇f = 0 or a partial derivative doesn't exist.
- Second derivative test (D)
- D = f_xx f_yy − (f_xy)²
- Absolute extrema on a closed region
- Check critical points inside and the boundary.
- Lagrange multiplier (λ)
- The scalar in ∇f = λ∇g at a constrained extremum.
- Tangent plane to a level surface
- Uses ∇F as the normal vector.
Sample practice questions
25 more questions like these, from level 1 to 5, are in the practice set.
Gradient of x² + y² at (1, 2).
- ⟨2, 2⟩
- 5
- ⟨2, 4⟩
- ⟨1, 2⟩
Show the answer and steps
Answer: C) ⟨2, 4⟩
- ∇(x² + y²) = ⟨2x, 2y⟩.
- At (1, 2): ⟨2, 4⟩.
∇f = ⟨3, 4⟩ at a point. Maximum rate of increase there?
- 25
- 3
- 5
- 7
Show the answer and steps
Answer: C) 5
- Maximum rate of increase =
- ∇f
- .
- √(9 + 16) = 5.
∇f = ⟨3, 4⟩. Directional derivative toward ⟨1, 0⟩.
- 5
- 7
- 3
- 4
Show the answer and steps
Answer: C) 3
- D_u f = ∇f · u.
- ⟨3, 4⟩ · ⟨1, 0⟩ = 3.