Chuyển đến nội dung

Bài 14 · Partial Derivatives

Implicit Differentiation with Partial Derivatives

Use F(x, y) = 0 and F(x, y, z) = 0 to find dy/dx and partial derivatives of implicit functions with the implicit function formulas and sympy.

Many curves and surfaces are given by equations such as x³ + y³ = 6xy rather than y = f(x). You can still find slopes without solving for y. Partial derivatives give a clean formula that replaces the messy implicit differentiation steps you may have learned before.

One equation, two variables

Suppose F(x, y) = 0 defines y as a function of x near a point, and F_y ≠ 0 there. Differentiating F(x, y(x)) = 0 with the chain rule gives F_x + F_y (dy/dx) = 0, so

Text
dy/dx = - F_x / F_y

Worked example: x³ + y³ = 6xy. Write F = x³ + y³ - 6xy. Then F_x = 3x² - 6y, F_y = 3y² - 6x, so

Text
dy/dx = -(3x² - 6y)/(3y² - 6x) = (2y - x²)/(y² - 2x)

At (3, 3), which satisfies 27 + 27 = 54 = 6·9, the slope is (6 - 9)/(9 - 6) = -1.

Python Slope of an implicit curve

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.

One equation, three variables

If F(x, y, z) = 0 defines z as a function of x and y, and F_z ≠ 0, then

Text
∂z/∂x = - F_x / F_z,     ∂z/∂y = - F_y / F_z

Worked example: the sphere x² + y² + z² = 14. F = x² + y² + z² - 14, so ∂z/∂x = -x/z, ∂z/∂y = -y/z. At (1, 2, 3): ∂z/∂x = -1/3, ∂z/∂y = -2/3. The tangent plane there is z = 3 - (1/3)(x - 1) - (2/3)(y - 2), i.e. x + 2y + 3z = 14. Notice the coefficients ⟨1, 2, 3⟩, the point itself, are the plane's normal: for a sphere the normal at a point points along the radius.

Python Partial derivatives of an implicit surface

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.

Why the formula works, and when it fails

The implicit function theorem says: if F has continuous partials and F(a, b) = 0 with F_y(a, b) ≠ 0, then near (a, b) the curve F = 0 is the graph of a differentiable function y = g(x). When F_y = 0 the curve may have a vertical tangent, and y cannot be a function of x there; but F_x ≠ 0 might still make x a function of y.

Example: the circle x² + y² = 1 at (1, 0). F_y = 2y = 0, so we cannot write y as a function of x near that point (the circle has a vertical tangent). But F_x = 2 ≠ 0, so x is a function of y near there.

The same formula appears in economics (indifference curves: dy/dx = -F_x/F_y is the marginal rate of substitution) and in thermodynamics (relationships among pressure, volume and temperature).

A more involved example

Find dy/dx for sin(xy) + y² = x. Let F = sin(xy) + y² - x. Then F_x = y cos(xy) - 1 and F_y = x cos(xy) + 2y, so

Text
dy/dx = (1 - y cos(xy)) / (x cos(xy) + 2y)

The point (1, 0) is not on the curve, since sin 0 + 0 = 0 but x = 1. The point (0, 0) is on it. There the formula gives (1 - 0)/(0 + 0): the denominator is zero, so the tangent is vertical. Always check that the point satisfies the equation before computing.

Python Check a point on the curve before using the formula

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.

Implicit formulas

Curve F(x, y) = 0 dy/dx = -F_x / F_y
Surface F(x, y, z) = 0 z_x = -F_x / F_z
1 / 2

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. For F(x, y) = x² + y² - 25 = 0, dy/dx equals

    dy/dx = -F_x/F_y = -2x/(2y) = -x/y.
  2. 2. For x² + y² + z² = 9, ∂z/∂y at (2, 1, 2) is

    ∂z/∂y = -y/z = -1/2.
  3. 3. The formula dy/dx = -F_x/F_y requires

    We divide by F_y; if it is zero the curve may have a vertical tangent there.
  4. 4. Before applying the formula at a point you should check that

    The formula describes slopes of the curve; the point must lie on it.

Summary

  • For F(x, y) = 0, dy/dx = -F_x/F_y (needs F_y ≠ 0).
  • For F(x, y, z) = 0, z_x = -F_x/F_z and z_y = -F_y/F_z.
  • These formulas yield slopes and tangent planes of implicitly defined curves and surfaces.
  • Always check that the point lies on the curve and that the denominator is nonzero.

Next: The Gradient

Theo dõi tiến độ của bạn

Tạo tài khoản miễn phí để đánh dấu bài đã học và tiếp tục từ chỗ bạn dừng lại trên mọi thiết bị.