MathAI Blog
Partial Derivatives 101: A Beginner's Guide
What a partial derivative is, why it matters, and how to compute it fast with power/product/chain rules and fully worked examples.
If you've learned single‑variable calculus, partial derivatives extend the same ideas to functions with multiple variables. We'll keep it approachable and practical: what they mean, how to compute them, and how they connect to gradients and tangent planes. Try anything here inside MathAI GPT to get instant step‑by‑steps.
1) What is a Partial Derivative?
Suppose f(x, y) depends on two variables. The partial derivative ∂f/∂xmeasures the rate of change of f with respect to x while keeping y fixed (treat y like a constant). Similarly for ∂f/∂y.
- Read ∂ as “partial.”
- Notation options: f_x, ∂f/∂x, or D_x f.
Limit definition (idea)
∂f/∂x(a,b) = lim_{h→0} [f(a+h,b) - f(a,b)]/h. Hold y=b fixed and take the ordinary derivative in x.
Micro‑example: if f(x,y)=x^2y and y=3, then near x=2 the slope in the x‑direction is ∂f/∂x = 2xy = 12.
2) Fast Rules You Already Know (Treat Others as Constants)
- Power rule: ∂/∂x (x^n) = n x^{n-1}; constants multiply through.
- Sum / difference: differentiate term‑by‑term.
- Product rule (two terms in x): (uv)_x = u_x v + u v_x.
- Chain rule: if u = u(x, y), then f_x = f_u u_x + f_v v_x for appropriate intermediate variables.
- Exponential / trig: as usual, but only the variable you're differentiating is “active.”
3) Worked Examples
Example A: Basic polynomial
Let f(x, y) = x^2 y + 3 x y^2 - 5y.
∂f/∂x: treat y constant → 2x y + 3 y^2.
∂f/∂y: treat x constant → x^2 + 6xy - 5.
Example B: Product + chain rule
Let f(x, y) = x\, e^{xy}.
∂f/∂x: product rule → 1 \cdot e^{xy} + x \cdot e^{xy} \cdot y =e^{xy}(1 + xy).
∂f/∂y: only the exponent depends on y →x \cdot e^{xy} \cdot x = x^2 e^{xy}.
Example C: Trig and chain rule
Let f(x, y) = sin(x^2 + y).
∂f/∂x: inner x^2 + y has derivative 2x in x → cos(x^2 + y) \cdot 2x.
∂f/∂y: inner derivative in y is 1 → cos(x^2 + y).
4) Mixed Partials and Clairaut's Theorem (Idea Only)
Mixed partials differentiate in two orders, e.g., f_{xy} = ∂/∂y (f_x) andf_{yx} = ∂/∂x (f_y). If f is “nice enough” (continuous partials nearby), these are equal: f_{xy} = f_{yx}.
5) Directional Derivatives and the Gradient
For a unit direction vector \u005E{u} (pronounced “u‑hat”), the directional derivative isD_u f = ∇f · \u005E{u}. The gradient ∇f = ⟨f_x, f_y⟩ points toward the steepest increase; its magnitude |∇f| is the steepest rate.
6) Gradient and Tangent Plane (Why Partials Matter)
The gradient collects first partials: ∇ f = ⟨ f_x, f_y ⟩. At a point (a, b), the linear approximation (tangent plane to the surface z = f(x, y)) is
L(x, y) = f(a, b) + f_x(a, b)(x - a) + f_y(a, b)(y - b)
This is useful for quick estimates and optimization methods.
Numerical example
Let f(x,y)=x^2y + y^3. Then f_x=2xy, f_y=x^2+3y^2. At (1,2): f_x(1,2)=4, f_y(1,2)=13, and f(1,2)=1· 2 + 8 = 10. So the tangent plane isL(x,y)=10 + 4(x-1) + 13(y-2).
7) Critical Points and the Second Derivative Test
Critical points satisfy f_x = 0 and f_y = 0. Let the Hessian beH = [[f_{xx}, f_{xy}], [f_{yx}, f_{yy}]] and defineD = f_{xx} f_{yy} - (f_{xy})^2.
- D > 0, f_{xx} > 0 → local minimum
- D > 0, f_{xx} < 0 → local maximum
- D < 0 → saddle point
- D = 0 → test inconclusive
Example: f(x,y)=x^2+y^2. The only critical point is (0,0). Here f_{xx}=2, f_{yy}=2, f_{xy}=0 → D=4>0 and f_{xx}>0, so it is a local (and global) minimum.
8) Multivariable Chain Rule (Quick Pattern)
Total differential: df = f_x dx + f_y dy. If x=x(t), y=y(t), thendf/dt = f_x x'(t) + f_y y'(t).
Example
f(x,y)=x^2 y, x=t^2, y=sin,t. Then f_x=2xy, f_y=x^2, x'=2t, y'=cos,t sodf/dt = (2xy)(2t) + (x^2)(cos,t) = 4txy + x^2 cos,t.
9) Tips and Common Pitfalls
- When taking ∂/∂x, treat y as a constant everywhere (and vice‑versa).
- Write one line per step for chain/product rules to avoid dropped factors.
- Check special points (zeros in factors, undefined spots) before simplifying too aggressively.
- When rules mix: do chain rule for inner functions first, then apply product rule around them.
- Mind domains: logs need positive inputs; radicals need non‑negatives (unless complex analysis is intended).
10) Practice (Answers Hidden)
- f(x, y) = x^3 + x y^2 - 4y: find f_x, f_y.
- f(x, y) = e^{x^2 y}: find f_x, f_y.
- f(x, y) = (x^2 + y)\,ln(x): find f_x (product + chain).
- Critical point classification: f(x,y)=x^2- y^2. Find critical points and use D = f_{xx} f_{yy} - (f_{xy})^2 to classify.
Show answers
1. f_x = 3x^2 + y^2, f_y = 2xy - 4.
2. f_x = e^{x^2 y} (2xy), f_y = e^{x^2 y} (x^2).
3. f_x = (2x)ln x + (x^2 + y)\cdot (1/x).
4. f_x=2x, f_y=-2y so only critical point is (0,0). f_{xx}=2, f_{yy}=-2, f_{xy}=0 → D = -4 < 0 so saddle point.
Next Step
Open the partial derivative calculator and paste a function you're studying (e.g., f(x,y) = x e^{xy} + y^3). Ask for: the first partials, the gradient at a point you choose, and the tangent plane at that point.
Bonus: Ask for a quick visual sketch description of level curves near your point.