myLearning

Topic 2 of 7

Step 18: Multivariable calculus

Partial derivatives and gradients

Step 18 · Multivariable calculus topics

Differentiate functions of several variables one variable at a time, gather the results into the gradient, and use it for rates of change in any direction and for tangent planes.

Partial derivatives

For f(x, y), the partial derivative fxf_x is the ordinary derivative in x with y held fixed: the slope of the surface as you walk in the x direction. fyf_y works the same way in y.

fx=∂f∂xfy=∂f∂yf_x = \frac{\partial f}{\partial x} \qquad f_y = \frac{\partial f}{\partial y}

Example: A polynomial

Find fxf_x and fyf_y for f(x, y) = x³y² + 4xy − y.

  1. For fxf_x, treat y as a constant: 3x²y² + 4y.
  2. For fyf_y, treat x as a constant: 2x³y + 4x − 1.

Answerfx=3x2y2+4yf_x = 3x^{2}y^{2} + 4y and fy=2x3y+4x−1f_y = 2x^{3}y + 4x - 1

Example: With the chain rule

Find fxf_x for f(x,y)=exyf(x, y) = e^{xy}.

  1. Treat y as a constant: the inside, xy, has x-derivative y.

Answerfx=y exyf_x = y\,e^{xy}

The gradient

The gradient gathers the partial derivatives into a vector, ∇f=⟨fx,fy⟩\nabla f = \langle f_x, f_y \rangle. It points in the direction in which f increases fastest, its length is that fastest rate, and it crosses the level curves at right angles.

Level curves of f = x² + y² are circles. The gradient, drawn as short segments, points straight outward across the circles, toward higher values.

Example: Fastest increase

f(x, y) = x² + 3y. In which direction does f increase fastest at (1, 2), and how fast?

  1. ∇f = ⟨2x, 3⟩, which is ⟨2, 3⟩ at (1, 2).
  2. Its length is √13.

AnswerIn the direction ⟨2, 3⟩, at a rate of √13, about 3.61

Tangent planes and directional derivatives

The rate of change of f in the direction of a unit vector u is the directional derivative, Duf=∇f⋅uD_{\mathbf{u}}f = \nabla f \cdot \mathbf{u}. Near a point, the surface z = f(x, y) is close to its tangent plane.

z=f(a,b)+fx(a,b)(x−a)+fy(a,b)(y−b)z = f(a, b) + f_x(a, b)(x - a) + f_y(a, b)(y - b)

Example: A directional derivative

For f(x, y) = x² + 3y, find the rate of change at (1, 2) in the direction of ⟨3, 4⟩.

  1. The unit vector is ⟨0.6, 0.8⟩.
  2. ∇f = ⟨2, 3⟩, so the rate is 1.2 + 2.4.

Answer3.6

Example: A tangent plane

Find the tangent plane to z = x² + y² at (1, 2, 5).

  1. At (1, 2), fx=2x=2f_x = 2x = 2 and fy=2y=4f_y = 2y = 4.
  2. z = 5 + 2(x − 1) + 4(y − 2).

Answerz = 2x + 4y − 5

Example: Linear approximation

Use that plane to estimate f(1.1, 1.9).

  1. Put x = 1.1 and y = 1.9 into z = 2x + 4y − 5.
  2. 2.2 + 7.6 − 5 = 4.8.

Answer4.8; the true value is 4.82

Try it yourself

Work each one on paper first, then open the answer to check.

  1. Find fxf_x for f(x, y) = 5x²y − y³.

    Show answer

    10xy

  2. Find fyf_y for f(x, y) = 5x²y − y³.

    Show answer

    5x² − 3y²

  3. Find the gradient of f(x, y) = xy at (2, 3).

    Show answer

    ⟨3, 2⟩

  4. What is the largest rate of increase of f(x, y) = 3x + 4y?

    Show answer

    5

  5. For f(x, y) = xy, find the rate of change at (2, 3) in the direction ⟨1, 0⟩.

    Show answer

    3

  6. Find the tangent plane to z = xy at (1, 1, 1).

    Show answer

    z = x + y − 1

What next?