Several variables
Partial derivatives, gradients, and double integrals.
Pen and paper is fine · no calculator needed why?
Opens at level 51. You're level 1. You can read and practice here now.
the idea
A function of two variables, f(x, y), is a surface. Its partial derivative ∂f/∂x is the slope in the x-direction: differentiate in x, holding y fixed. ∂f/∂y swaps the roles.
The gradient ∇f = (∂f/∂x, ∂f/∂y) aims uphill; its length is the steepest slope. A double integral adds f up over an area. Where both partials are 0, the surface can peak, dip or saddle.
techniques
Partials and the gradient
- For ∂f/∂x, hold y fixed and differentiate in x: x²y becomes 2xy. For ∂f/∂y, hold x fixed.
- Differentiate first, then put in the point.
- Gradient length: √((∂f/∂x)² + (∂f/∂y)²), by Pythagoras.
worked example
f(x, y) = x²y + y. What is the length of the gradient ∇f at (2, 3)?
- ∂f/∂x = 2xy, which is 2 × 2 × 3 = 12 at (2, 3).
- ∂f/∂y = x² + 1, which is 4 + 1 = 5.
- Length: √(144 + 25) = √169 = 13.
Answer: 13
Double integral, one at a time
- Integrate in y from c to d, holding x fixed. A term with no y is multiplied by d − c.
- Then integrate the result in x, from a to b.
worked example
What is the double integral of x² + y over the rectangle 0 ≤ x ≤ 2, 0 ≤ y ≤ 3?
- Over y from 0 to 3: x² becomes 3x², and y becomes 9/2.
- Over x from 0 to 2: 3x² gives 8, and 9/2 gives 9. Total 17.
Answer: 17
Classify with D
- Check it is critical: f_x and f_y (the partials) must both be 0 there. If not, it isn’t.
- Find the second partials f_xx, f_yy and f_xy. Then D = f_xx·f_yy − f_xy².
- D < 0: a saddle point. D > 0: a local minimum if f_xx > 0, a local maximum if f_xx < 0.
worked example
f(x, y) = x² + 3xy + y² has a critical point at (0, 0). What is D = f_xx·f_yy − f_xy² there?
- f_xx = 2, f_yy = 2 and f_xy = 3.
- D = 2 × 2 − 9 = −5.
- D < 0, so (0, 0) is a saddle point.
Answer: −5
watch out for
- Putting the point into f instead of its partial derivative.
- Adding the gradient’s two parts. Square them, add, then take the square root.
- Leaving a term with no y unchanged when integrating over y. It is multiplied by d − c.
- Calling a point a minimum after looking along x alone. D < 0 means a saddle.
practice
Partial derivatives
worked example
f(x, y) = 6y³ − 6x². What is ∂f/∂x at (1, −2)?
Answer: -12
- Treat y as a constant: ∂f/∂x = −12x.
- At (1, −2): −12(1) = −12.
Double integrals
worked example
What is the double integral of f(x, y) = −y over the rectangle 0 ≤ x ≤ 1, 2 ≤ y ≤ 3? Enter a whole number or a decimal.
Answer: -2.5
- Integrate over y first, from 2 to 3, treating x as a constant: that gives −5/2.
- Then integrate that over x from 0 to 1: −5/2 = −2.5.
Gradient
worked example
f(x, y) = −2y² + 12x + 13y. What is the length of the gradient ∇f at (1, 1)?
Answer: 15
- ∇f = (∂f/∂x, ∂f/∂y) = (12, −4y + 13), which is (12, 9) at (1, 1).
- Its length is √(12² + 9²) = √(144 + 81) = √225 = 15.
Classify a critical point
worked example
f(x, y) = 3x² − 2xy + 3y² − 4x + 12y. What kind of point is (0, −2) for f?
- saddle point
- local maximum
- not a critical point
- local minimum
Answer: local minimum
- f_x = 6x − 2y − 4 and f_y = −2x + 6y + 12; both are 0 at (0, −2), so it is a critical point.
- f_xx = 6, f_yy = 6 and f_xy = −2, so D = f_xx·f_yy − f_xy² = 6 × 6 − (−2)² = 32.
- D > 0 and f_xx > 0: a local minimum.