learn › Calculus

Several variables

lesson · about 3 minutes

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

A partial derivative at a point, or the length of ∇f.

  1. For ∂f/∂x, hold y fixed and differentiate in x: x²y becomes 2xy. For ∂f/∂y, hold x fixed.
  2. Differentiate first, then put in the point.
  3. Gradient length: √((∂f/∂x)² + (∂f/∂y)²), by Pythagoras.
worked example

Example: f(x, y) = x²y + y. What is the length of the gradient ∇f at (2, 3)?

  1. ∂f/∂x = 2xy, which is 2 × 2 × 3 = 12 at (2, 3).
  2. ∂f/∂y = x² + 1, which is 4 + 1 = 5.
  3. Length: √(144 + 25) = √169 = 13.

Answer: 13

Double integral, one at a time

Integrating f(x, y) over a rectangle a ≤ x ≤ b, c ≤ y ≤ d.

  1. Integrate in y from c to d, holding x fixed. A term with no y is multiplied by d − c.
  2. Then integrate the result in x, from a to b.
worked example

Example: What is the double integral of x² + y over the rectangle 0 ≤ x ≤ 2, 0 ≤ y ≤ 3?

  1. Over y from 0 to 3: x² becomes 3x², and y becomes 9/2.
  2. Over x from 0 to 2: 3x² gives 8, and 9/2 gives 9. Total 17.

Answer: 17

Classify with D

Classifying a critical point of f(x, y).

  1. Check it is critical: f_x and f_y (the partials) must both be 0 there. If not, it isn’t.
  2. Find the second partials f_xx, f_yy and f_xy. Then D = f_xx·f_yy − f_xy².
  3. D < 0: a saddle point. D > 0: a local minimum if f_xx > 0, a local maximum if f_xx < 0.
worked example

Example: f(x, y) = x² + 3xy + y² has a critical point at (0, 0). What is D = f_xx·f_yy − f_xy² there?

  1. f_xx = 2, f_yy = 2 and f_xy = 3.
  2. D = 2 × 2 − 9 = −5.
  3. D < 0, so (0, 0) is a saddle point.

Answer: −5

watch out for

practice

Sign in to try one

Partial derivatives

worked example

f(x, y) = 6y³ − 6x². What is ∂f/∂x at (1, −2)?

Answer: -12

  1. Treat y as a constant: ∂f/∂x = −12x.
  2. 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

  1. Integrate over y first, from 2 to 3, treating x as a constant: that gives −5/2.
  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

  1. ∇f = (∂f/∂x, ∂f/∂y) = (12, −4y + 13), which is (12, 9) at (1, 1).
  2. 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?

  1. saddle point
  2. local maximum
  3. not a critical point
  4. local minimum

Answer: local minimum

  1. f_x = 6x − 2y − 4 and f_y = −2x + 6y + 12; both are 0 at (0, −2), so it is a critical point.
  2. f_xx = 6, f_yy = 6 and f_xy = −2, so D = f_xx·f_yy − f_xy² = 6 × 6 − (−2)² = 32.
  3. D > 0 and f_xx > 0: a local minimum.

Sign in to start