Skip to content
Tutorials Center
My learning

Topics

Lesson 12 of 39 · Partial Derivatives

Tangent Planes and Linear Approximation

Find the tangent plane to z = f(x, y), use it for linear approximation and differentials, and see when a function is differentiable, with Python checks.

Zoom far enough into a smooth curve and it looks like a straight line. Zoom into a smooth surface and it looks like a plane. This tangent plane is the best linear approximation of the function near a point, and it is the multivariable version of the tangent line.

The tangent plane

For a surface z = f(x, y) with continuous partial derivatives at (a, b), the tangent plane at the point (a, b, f(a, b)) is

Text
z = f(a, b) + f_x(a, b)(x - a) + f_y(a, b)(y - b)

Why this works: the plane passes through the point, has slope f_x in the x direction and f_y in the y direction, and these two slopes determine a plane completely.

Worked example: f(x, y) = x² + y² at (1, 2). Here f(1, 2) = 5, f_x = 2x = 2, f_y = 2y = 4. The tangent plane is z = 5 + 2(x - 1) + 4(y - 2) = 2x + 4y - 5.

Worked example: f(x, y) = e^x ln y at (0, 1): f(0, 1) = 0, f_x = e^x ln y = 0 there, f_y = e^x / y = 1. Tangent plane: z = y - 1.

Python Tangent plane by sympy

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Linear approximation

The tangent-plane function is called the linearization L(x, y) of f at (a, b). For (x, y) near (a, b), f(x, y) ≈ L(x, y).

Worked example: estimate √(3.02² + 3.97²). Let f(x, y) = √(x² + y²) and use (3, 4), where f = 5. Then f_x = x/√(x² + y²) = 3/5, f_y = 4/5. So L = 5 + 0.6(0.02) + 0.8(-0.03) = 5 + 0.012 - 0.024 = 4.988. The exact value is √(9.1204 + 15.7609) = √24.8813 ≈ 4.98812. The approximation is accurate to about four significant digits.

Python Compare linearization with the true value

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The farther from the base point, the larger the error, and the error shrinks much faster than the distance as you get closer.

Differentials

The differential of z = f(x, y) is

Text
dz = f_x dx + f_y dy

where dx and dy are small changes of the inputs. It estimates the change Δz. This is used for error propagation.

Worked example: a cylinder has radius r = 5.0 cm and height h = 12.0 cm, each measured within ±0.1 cm. The volume is V = π r² h. Then V_r = 2π r h, V_h = π r², so dV ≈ 2π(5)(12)(0.1) + π(25)(0.1) = 12π + 2.5π = 14.5π ≈ 45.5 cm³. The volume V = 300π ≈ 942.5 cm³ is uncertain by about ±45.5 cm³, around 4.8 percent.

Python Error estimate with a differential

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Differentiability

A function is differentiable at (a, b) if the tangent plane is a good approximation in the sense that

Text
f(a + h, b + k) = f(a, b) + f_x h + f_y k + ε₁ h + ε₂ k

with ε₁, ε₂ → 0 as (h, k) → (0, 0). A useful sufficient condition: if f_x and f_y exist near (a, b) and are continuous at (a, b), then f is differentiable there. Differentiable functions are continuous. The weird function xy/(x² + y²) from earlier lessons has partials at the origin, but it is not continuous there, so it is not differentiable.

When a problem says "approximate", always write the point, the linearization formula and the values you plug in. It makes errors easy to find.

Plotting the tangent plane

Python A surface and its tangent plane

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

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

    z = 5 + 2(x - 1) + 4(y - 2) = 2x + 4y - 5.
  2. 2. The differential of z = xy is

    z_x = y and z_y = x.
  3. 3. If f_x and f_y exist near a point and are continuous there, then f is

    Continuous partial derivatives guarantee differentiability, which implies continuity.
  4. 4. Linear approximation is most accurate

    The tangent plane matches the surface to first order near the point of tangency.

Summary

  • Tangent plane: z = f(a, b) + f_x(a, b)(x - a) + f_y(a, b)(y - b).
  • Linearization L(x, y) approximates f near (a, b); the differential dz = f_x dx + f_y dy estimates changes and errors.
  • Continuous partials imply differentiability; partials existing alone is not enough.

Next: The Chain Rule for Several Variables