06-03 - Partial Derivatives
Phase: 6 | Subject: 06-03 Prerequisites: 06-02-limits-and-continuity-in-rn.md (limits in ℝⁿ), 04-04-differentiation-rules.md (single-variable differentiation), 06-01-functions-of-several-variables.md (f(x,y) basics) Next subject: 06-04-tangent-planes-and-linear-approximation.md
Learning Objectives
By the end of this subject, you will be able to:
- Define partial derivatives ∂f/∂x and ∂f/∂y using limit definitions
- Compute first-order partial derivatives treating other variables as constants
- Interpret partial derivatives geometrically as slopes of tangent lines in coordinate directions
- Compute higher-order partial derivatives (∂²f/∂x², ∂²f/∂y², ∂²f/∂x∂y, ∂²f/∂y∂x)
- Apply Clairaut's theorem to verify equality of mixed partials
Core Content
Definition — First-Order Partial Derivatives
⚠️ CRITICAL FOUNDATION: The partial derivative concept is the gatekeeper for all of multivariable calculus. The key mechanic — treating all other variables as constants while differentiating one — underlies tangent planes, gradients, chain rules, optimization, and everything that follows.
For f(x,y), the partial derivative with respect to x is:
$∂f/∂x = fₓ(x,y) = lim_{h→0} [f(x+h, y) - f(x,y)] / h
$
It measures the instantaneous rate of change of f as x changes while y is held constant.
The partial derivative with respect to y is:
$∂f/∂y = fᵧ(x,y) = lim_{h→0} [f(x, y+h) - f(x,y)] / h
$
It measures the instantaneous rate of change as y changes while x is held constant.
Notation: ∂f/∂x, fₓ, Dₓf, ∂ₓf all mean the same thing.
What This Means
- ∂f/∂x: differentiate f with respect to x, treating y as if it were a constant
- ∂f/∂y: differentiate f with respect to y, treating x as if it were a constant
Crucial distinction from ordinary derivatives: In single-variable calculus, dy/dx tells you the slope of the tangent line. ∂f/∂x tells you the slope of the tangent line when you slice the surface with a plane y = constant — it's the slope in the x-direction only.
Geometric Interpretation
For z = f(x,y), the partial derivative ∂f/∂x at (a,b) is the slope of the tangent line to the curve of intersection of the surface z = f(x,y) with the plane y = b.
Similarly, ∂f/∂y at (a,b) is the slope of the tangent line to the curve of intersection with the plane x = a.
These two tangent lines span the tangent plane (more in 06-04).
Example: f(x,y) = 4 - x² - y² (a downward paraboloid, peak at (0,0,4)).
At (1, 1, 2): - ∂f/∂x = -2x. At x=1: ∂f/∂x = -2. This is the slope of the curve z = 4 - x² - 1 = 3 - x² at x=1. - ∂f/∂y = -2y. At y=1: ∂f/∂y = -2.
Computing Partial Derivatives — Rules
The rules are identical to single-variable differentiation. You just treat all other variables as constants.
Basic Examples
f(x,y) = x³y + x²y² + y³
∂f/∂x: Treat y as constant. - ∂/∂x[x³y] = 3x²y - ∂/∂x[x²y²] = 2x y² - ∂/∂x[y³] = 0 - ∂f/∂x = 3x²y + 2xy²
∂f/∂y: Treat x as constant. - ∂/∂y[x³y] = x³ - ∂/∂y[x²y²] = 2x²y - ∂/∂y[y³] = 3y² - ∂f/∂y = x³ + 2x²y + 3y²
f(x,y) = eˣ sin(y)
∂f/∂x = eˣ sin(y) (treat sin(y) as constant) ∂f/∂y = eˣ cos(y) (treat eˣ as constant)
f(x,y) = ln(x² + y²)
∂f/∂x = (1/(x²+y²)) · 2x = 2x/(x² + y²) ∂f/∂y = (1/(x²+y²)) · 2y = 2y/(x² + y²)
More Complex Examples
f(x,y) = x^y (x > 0)
∂f/∂x: Treat y as constant. Power rule: ∂/∂x[x^y] = y·x^(y-1).
∂f/∂y: Treat x as constant. Exponential rule: d/dy[a^y] = a^y ln(a). So ∂/∂y[x^y] = x^y ln(x).
f(x,y) = arctan(y/x)
∂f/∂x: Chain rule with derivative of arctan(u) = 1/(1+u²). ∂/∂x[arctan(y/x)] = 1/(1+(y/x)²) · ∂/∂x[y/x] = 1/(1+y²/x²) · (-y/x²) = (x²/(x²+y²)) · (-y/x²) = -y/(x² + y²)
∂f/∂y: ∂/∂y[arctan(y/x)] = 1/(1+(y/x)²) · 1/x = (x²/(x²+y²)) · 1/x = x/(x² + y²)
Pitfalls
- Forgetting the chain rule: ∂/∂x[sin(xy)] ≠ cos(xy). It's cos(xy) · y.
- Forgetting product rule: ∂/∂x[x·e^y] = e^y (treating e^y as constant). But ∂/∂x[x·e^(xy)] requires product rule: e^(xy) + x·ye^(xy).
- Confusing which variable is held constant: ∂/∂x[f(x,y)] treats y as constant; ∂/∂y[f(x,y)] treats x as constant.
- Not recognizing when variables are independent: In inverse trig functions like arctan(y/x), both x and y are independent variables.
Higher-Order Partial Derivatives
We can differentiate partial derivatives again:
Second-Order Pure Partials
∂²f/∂x² = ∂/∂x[∂f/∂x] — differentiate ∂f/∂x with respect to x (y still constant) ∂²f/∂y² = ∂/∂y[∂f/∂y] — differentiate ∂f/∂y with respect to y (x still constant)
Notation: f_{xx}, f_{yy}
Mixed Partials
∂²f/∂y∂x = ∂/∂y[∂f/∂x] — take ∂f/∂x, then differentiate with respect to y ∂²f/∂x∂y = ∂/∂x[∂f/∂y] — take ∂f/∂y, then differentiate with respect to x
Notation: f_{xy}, f_{yx}
Reading convention: ∂²f/∂y∂x means differentiate first with respect to x, then y. Read right-to-left: "∂²f over ∂y∂x" = ∂/∂y (∂f/∂x).
Example: Computing All Second Partials
f(x,y) = x³y² + x²sin(y)
∂f/∂x = 3x²y² + 2x sin(y) ∂f/∂y = 2x³y + x²cos(y)
∂²f/∂x² = ∂/∂x[3x²y² + 2x sin(y)] = 6x y² + 2 sin(y) ∂²f/∂y² = ∂/∂y[2x³y + x²cos(y)] = 2x³ - x² sin(y) ∂²f/∂y∂x = ∂/∂y[3x²y² + 2x sin(y)] = 6x²y + 2x cos(y) ∂²f/∂x∂y = ∂/∂x[2x³y + x²cos(y)] = 6x²y + 2x cos(y)
Notice: ∂²f/∂y∂x = ∂²f/∂x∂y. This is not a coincidence.
Clairaut's Theorem (Equality of Mixed Partials)
Theorem: If f(x,y) has continuous second partial derivatives on an open set, then at every point in that set:
$∂²f/∂y∂x = ∂²f/∂x∂y $
or equivalently: f_{xy} = f_{yx}.
Intuition: The rate at which the x-slope changes as you move in the y-direction equals the rate at which the y-slope changes as you move in the x-direction.
Conditions: The MIXED second partials must be continuous. If they're not continuous, they might differ (rare in practice).
Verification on polynomials and most elementary functions: Clairaut's theorem always holds because these functions have continuous partials of all orders on their domains.
Counterexample (when Clairaut fails)
A pathological example where f_{xy}(0,0) ≠ f_{yx}(0,0):
f(x,y) = { xy(x² - y²)/(x² + y²) if (x,y) ≠ (0,0); 0 if (x,y) = (0,0) }
It can be shown that f_{xy}(0,0) = -1 and f_{yx}(0,0) = 1. This happens because the second partials are discontinuous at (0,0). In practice with "nice" functions, you rarely encounter this.
Third-Order and Higher Partials
∂³f/∂x³ = f_{xxx} ∂³f/∂x²∂y = f_{xxy} = f_{xyx} = f_{yxx} (all equal if continuous)
For n-th order: any permutation of the differentiation order gives the same result, provided all n-th order partials are continuous.
Key Terms
- 06 03 Partial Derivatives
- Basic Examples
- Clairaut's Theorem (Equality of Mixed Partials)
- Common Pitfalls
- Computing Partial Derivatives — Rules
- Correct: B)
- Correct: C)
- Counterexample (when Clairaut fails)
- Definition — First-Order Partial Derivatives
- Example 1: First-Order Partials
- Example 2: All Second Partials
- Example 3: Geometric Interpretation
Worked Examples
Example 1: First-Order Partials
Problem: Find ∂f/∂x and ∂f/∂y for f(x,y) = √(x² + y²).
Solution:
Step 1: f = (x² + y²)^(1/2).
Step 2: ∂f/∂x = (1/2)(x² + y²)^(-1/2) · 2x = x/√(x² + y²). (Chain rule, treat y as constant.)
Step 3: ∂f/∂y = (1/2)(x² + y²)^(-1/2) · 2y = y/√(x² + y²).
Note: These are undefined at (0,0) — the function has a cusp there.
Example 2: All Second Partials
Problem: Compute all second partials of f(x,y) = e^(x²y).
Solution:
Step 1: ∂f/∂x = e^(x²y) · 2xy = 2xy e^(x²y).
Step 2: ∂f/∂y = e^(x²y) · x² = x² e^(x²y).
Step 3: ∂²f/∂x² = ∂/∂x[2xy e^(x²y)] = 2y e^(x²y) + 2xy · e^(x²y) · 2xy = 2y e^(x²y) + 4x²y² e^(x²y) = e^(x²y)(2y + 4x²y²).
Step 4: ∂²f/∂y² = ∂/∂y[x² e^(x²y)] = x² · e^(x²y) · x² = x⁴ e^(x²y).
Step 5: ∂²f/∂y∂x = ∂/∂y[2xy e^(x²y)] = 2x e^(x²y) + 2xy · e^(x²y) · x² = 2x e^(x²y) + 2x³y e^(x²y) = 2x e^(x²y)(1 + x²y).
Step 6: ∂²f/∂x∂y = ∂/∂x[x² e^(x²y)] = 2x e^(x²y) + x² · e^(x²y) · 2xy = 2x e^(x²y) + 2x³y e^(x²y) = 2x e^(x²y)(1 + x²y).
Matches Clairaut: f_{xy} = f_{yx}.
Example 3: Geometric Interpretation
Problem: For f(x,y) = x² + xy + y², find ∂f/∂x at (2, -1) and interpret.
Solution:
Step 1: ∂f/∂x = 2x + y (treat y as constant, derivative of xy is y).
Step 2: At (2, -1): ∂f/∂x = 2(2) + (-1) = 4 - 1 = 3.
Step 3: Interpretation: If we fix y = -1 and vary x near 2, the function z = f(x,-1) = x² - x + 1 has instantaneous slope 3 at x = 2. Geometrically, this is the slope of the tangent line in the x-direction on the surface z = x² + xy + y² at the point (2, -1, 3).
Practice Problems
-
Find ∂f/∂x and ∂f/∂y for f(x,y) = x³y² - 2x²y + xy³.
-
Find all second partials of f(x,y) = sin(xy).
-
For f(x,y) = x ln(y), find ∂²f/∂x∂y.
-
Compute ∂f/∂x for f(x,y) = arctan(x/y).
-
Verify Clairaut's theorem for f(x,y) = x²e^y + y³cos(x).
-
Find f_{xxy} for f(x,y) = x⁴y².
Answers (click to expand)
**Problem 1:** ∂f/∂x = 3x²y² - 4xy + y³. ∂f/∂y = 2x³y - 2x² + 3xy². **Problem 2:** fₓ = y cos(xy), f_y = x cos(xy). f_{xx} = -y² sin(xy), f_{yy} = -x² sin(xy), f_{xy} = cos(xy) - xy sin(xy), f_{yx} = cos(xy) - xy sin(xy) ← equal per Clairaut. **Problem 3:** ∂f/∂y = x/y. ∂²f/∂x∂y = ∂/∂x[x/y] = 1/y. **Problem 4:** ∂f/∂x = 1/(1 + x²/y²) · 1/y = y/(x² + y²). **Problem 5:** fₓ = 2x e^y - y³ sin(x). f_y = x² e^y + 3y² cos(x). f_{xy} = ∂/∂y[2x e^y - y³ sin(x)] = 2x e^y - 3y² sin(x). f_{yx} = ∂/∂x[x² e^y + 3y² cos(x)] = 2x e^y - 3y² sin(x). Match confirmed. **Problem 6:** fₓ = 4x³y². f_{xx} = 12x²y². f_{xxy} = 24x²y.Summary
Key takeaways:
- Partial derivatives measure rate of change in one direction while holding other variables fixed
- ∂f/∂x: differentiate with respect to x, treat y as constant (and vice versa)
- Geometric interpretation: slopes of tangent lines in coordinate directions on the surface z = f(x,y)
- Higher-order partials: differentiate repeatedly; mixed partials are equal if continuous (Clairaut's theorem)
- All single-variable differentiation rules apply (power, product, quotient, chain) — just keep track of which variable you're differentiating
Quiz
Q1: ∂/∂x[x²y³] equals: - A) x²y³ - B) 2x·3y² - C) 2xy³ - D) 3x²y² Correct: C) - If you chose C: Treat y³ as constant. ∂/∂x[x²] = 2x, so result is 2x·y³ = 2xy³. Correct! - If you chose A: That's just the original function — you didn't differentiate. - If you chose B: You incorrectly took ∂/∂x of x² times ∂/∂y of y³. You're not differentiating w.r.t. y. - If you chose D: You differentiated with respect to y instead of x.
Q2: ∂/∂y[sin(x)e^y] equals: - A) cos(x)e^y - B) sin(x)e^y - C) sin(x)·ye^(y-1) - D) cos(x)·e^y + sin(x)·e^y Correct: B) - If you chose B: sin(x) is constant when differentiating w.r.t. y. ∂/∂y[e^y] = e^y. Correct! - If you chose A: You differentiated sin(x) — but you're differentiating w.r.t. y, not x. - If you chose C: You applied power rule to e^y. e^y is not y^e. - If you chose D: You applied product rule unnecessarily; sin(x) is constant w.r.t. y.
Q3: For f(x,y) = x² + y², ∂²f/∂x∂y equals: - A) 2x + 2y - B) 0 - C) 2 - D) 4xy Correct: B) - If you chose B: ∂f/∂x = 2x. Then ∂/∂y[2x] = 0 (2x has no y-dependence). Correct! - If you chose A: That looks like the gradient components combined. - If you chose C: ∂²f/∂x² = 2, not ∂²f/∂x∂y. - If you chose D: That's not a second partial of this function.
Q4: Clairaut's theorem states that f_{xy} = f_{yx} provided: - A) f is differentiable once - B) f is a polynomial - C) f_{xy} and f_{yx} are continuous - D) f has a tangent plane Correct: C) - If you chose C: The continuity of the mixed second partials is the precise condition. Correct! - If you chose A: First-order differentiability isn't sufficient. - If you chose B: It's true for polynomials, but the theorem applies more broadly. - If you chose D: Existence of a tangent plane relates to differentiability, not directly to mixed partial equality.
Q5: The geometric meaning of ∂f/∂x at (a,b) is: - A) The slope of the surface in the y-direction - B) The slope of the tangent line to the curve f(x,b) at x = a - C) The height of the surface above (a,b) - D) The curvature of the surface at (a,b) Correct: B) - If you chose B: ∂f/∂x is the slope of the cross-section curve f(x,b) — the surface sliced by y = b. Correct! - If you chose A: That would be ∂f/∂y. - If you chose C: That's f(a,b) itself. - If you chose D: Partial derivatives measure slope, not curvature (second partials relate to curvature).
Q6: For f(x,y) = ln(x²y), with x>0 and y>0, ∂f/∂x is: - A) 1/(x²y) - B) 2x/(x²y) - C) 2/x - D) 1/x Correct: C) - If you chose C: f = ln(x²) + ln(y) = 2ln(x) + ln(y). ∂f/∂x = 2/x. Correct! - If you chose A: That's 1/f(x,y), which is not the derivative of ln. - If you chose B: That's 1/(x²y) · 2xy / y... partially applying chain rule incorrectly. Simplifies to 2/x which is correct but overcomplicated. - If you chose D: You forgot the factor of 2 from x².
Q7: ∂³f/∂x²∂y of f(x,y) = x⁴y² equals: - A) 12x²y² - B) 24x²y - C) 8x³y² - D) 48xy Correct: B) - If you chose B: fₓ = 4x³y² → f_{xx} = 12x²y² → f_{xxy} = 24x²y. Correct! - If you chose A: That's f_{xx} (second partial w.r.t. x), not the third-order mixed partial. - If you chose C: That's differentiating w.r.t. y first, which gives a different expression. - If you chose D: That's f_{xyx} or similar, not f_{xxy}.