Chapter 15
Hard

Partial Derivatives

00 · Symbol Glossary

$f(x,y)$f of x, y — function of two variables

A rule assigning one output number to each pair of inputs (x,y)(x,y). Extends Chapter 01's single-variable f(x)f(x) to two independent inputs; its graph is a surface in three dimensions rather than a curve in two.

$\dfrac{\partial f}{\partial x}$partial f partial x — partial derivative

The rate of change of ff with respect to xx alone, holding every other variable fixed. The rounded \partial (distinct from Chapter 02's straight dd) signals that other variables are present but frozen during this differentiation.

$f_x,\ f_y$f sub x, f sub y — subscript notation for partials

Compact alternatives to fx\dfrac{\partial f}{\partial x} and fy\dfrac{\partial f}{\partial y}, used when writing many partial derivatives becomes cumbersome.

$f_{xx},\ f_{xy}$second-order partial derivatives

fxxf_{xx} differentiates with respect to xx twice in a row. fxyf_{xy} (a mixed partial) differentiates first with respect to yy, then with respect to xx — order matters in the notation, though Section 03 shows it usually doesn't matter in the result.

$\nabla f$del f, or grad f — gradient

The directed quantity (Chapter 14) f=fx,fy\nabla f = \langle f_x, f_y\rangle, built from all of ff's first partial derivatives. Points in the direction ff increases fastest at a given point.

$D_{\hat u}f$directional derivative of f in direction u-hat

The rate of change of ff in an arbitrary direction u^\hat u (a unit vector, Chapter 14), not just along the xx- or yy-axis. Generalizes fxf_x and fyf_y, which are the special cases u^=ı^\hat u = \hat\imath and u^=ȷ^\hat u=\hat\jmath.


01 · Functions of Several Variables and Partial Derivatives

A function like f(x,y)=x2+y2f(x,y) = x^2+y^2 assigns a number to every point in the plane, not just to every point on a line. Its graph is a surface hovering over the xyxy-plane. Differentiating such a function requires picking one direction to move in at a time.

Definition — Partial Derivative
fx=limh0f(x+h,y)f(x,y)hfy=limh0f(x,y+h)f(x,y)h\frac{\partial f}{\partial x} = \lim_{h\to0}\frac{f(x+h,y)-f(x,y)}{h} \qquad \frac{\partial f}{\partial y} = \lim_{h\to0}\frac{f(x,y+h)-f(x,y)}{h}

Each is Chapter 02's difference-quotient definition, applied to only one variable at a time, with the other variable frozen as if it were a constant.

Step-by-step — Find $f_x$ and $f_y$ for $f(x,y) = x^3y^2 + 4xy$
1
Compute fxf_x — differentiate with respect to xx, treating yy as a constant: the term x3y2x^3y^2 becomes 3x2y23x^2y^2 (power rule on x3x^3, Chapter 02; y2y^2 is just a constant multiplier). The term 4xy4xy becomes 4y4y (xx's coefficient is 4y4y, a constant with respect to xx).
2
Assemble fxf_x: fx=3x2y2+4yf_x = 3x^2y^2+4y.
3
Compute fyf_y — differentiate with respect to yy, treating xx as a constant: the term x3y2x^3y^2 becomes 2x3y2x^3y (power rule on y2y^2; x3x^3 is a constant multiplier). The term 4xy4xy becomes 4x4x.
4
Assemble fyf_y: fy=2x3y+4xf_y = 2x^3y+4x.
5
Evaluate both at (x,y)=(1,2)(x,y)=(1,2): fx(1,2)=3(1)(4)+4(2)=12+8=20f_x(1,2) = 3(1)(4)+4(2) = 12+8=20. fy(1,2)=2(1)(2)+4(1)=4+4=8f_y(1,2) = 2(1)(2)+4(1)=4+4=8.
Geometric meaning — slicing the surface

Fixing y=y0y=y_0 and letting xx vary slices the surface z=f(x,y)z=f(x,y) with a vertical plane, producing an ordinary curve z=f(x,y0)z=f(x,y_0) in that slice. fx(x0,y0)f_x(x_0,y_0) is exactly the slope of that sliced curve at x=x0x=x_0 — an ordinary single-variable derivative (Chapter 02), just computed on the curve left behind by one particular slice. fyf_y is the same idea, slicing the other way.

❌ Forgetting to hold the other variable fixed

For f(x,y)=x2yf(x,y)=x^2y, computing fxf_x by treating yy as if it were also varying with xx — e.g. mistakenly applying the product rule to x2x^2 and yy as if y=y(x)y=y(x), giving 2xy+x2dydx2xy + x^2\dfrac{dy}{dx}.

Why it breaks: the entire point of a partial derivative is that yy is treated as a fixed constant while differentiating with respect to xx — there is no dydx\dfrac{dy}{dx} term at all, because yy is not being allowed to change during this computation.

Consequence: the correct partial derivative is simply fx=2xyf_x = 2xy (power rule on x2x^2, with yy as a constant multiplier) — no product rule needed, since only one factor (x2x^2) actually depends on the variable being differentiated.


02 · Higher-Order Partial Derivatives

Definition — Second-Order Partial Derivatives
fxx=x(fx)fyy=y(fy)fxy=x(fy)fyx=y(fx)f_{xx} = \frac{\partial}{\partial x}\left(\frac{\partial f}{\partial x}\right) \qquad f_{yy} = \frac{\partial}{\partial y}\left(\frac{\partial f}{\partial y}\right) \qquad f_{xy} = \frac{\partial}{\partial x}\left(\frac{\partial f}{\partial y}\right) \qquad f_{yx} = \frac{\partial}{\partial y}\left(\frac{\partial f}{\partial x}\right)

Reading order for mixed partials: fxyf_{xy} means differentiate with respect to yy first, then xx — the rightmost subscript is applied first, since it's the inner operation.

Step-by-step — Find all second-order partials of $f(x,y)=x^3y^2$
1
First partials (Section 01's method): fx=3x2y2f_x = 3x^2y^2; fy=2x3yf_y = 2x^3y.
2
fxxf_{xx} — differentiate fxf_x with respect to xx again: 6xy26xy^2 (power rule, y2y^2 constant).
3
fyyf_{yy} — differentiate fyf_y with respect to yy again: 2x32x^3 (power rule, x3x^3 constant).
4
fxyf_{xy} — differentiate fy=2x3yf_y=2x^3y with respect to xx: 6x2y6x^2y.
5
fyxf_{yx} — differentiate fx=3x2y2f_x=3x^2y^2 with respect to yy: 6x2y6x^2y.
6
Compare steps 4 and 5: fxy=fyx=6x2yf_{xy}=f_{yx}=6x^2y — the two mixed partials agree, despite being computed in opposite orders.
Clairaut's Theorem

Step 6 is not a coincidence: if fxyf_{xy} and fyxf_{yx} are both continuous near a point, they are guaranteed equal there. This holds for essentially every function built from polynomials, and from exe^x, sinx\sin x, cosx\cos x, lnx\ln x (Chapter 02) combined by sums, products, and composition — order of mixed partial differentiation almost never matters in practice, though the continuity hypothesis is technically required.


03 · The Gradient

Bundling both partial derivatives into a single directed quantity (Chapter 14) produces the gradient — the tool that identifies the single best direction to move in.

Definition — Gradient
f(x,y)=fx(x,y), fy(x,y)\nabla f(x,y) = \langle f_x(x,y),\ f_y(x,y)\rangle

At each point, f\nabla f is a directed quantity (Chapter 14) pointing in the direction ff increases most rapidly, with magnitude f\lVert\nabla f\rVert equal to that maximum rate of increase.

Step-by-step — Find $\nabla f$ at $(1,2)$ for $f(x,y) = x^2+3xy$
1
Compute fxf_x: treating yy as constant, fx=2x+3yf_x = 2x+3y.
2
Compute fyf_y: treating xx as constant, fy=3xf_y = 3x.
3
Assemble the gradient as a directed quantity (Chapter 14 component form): f=2x+3y, 3x\nabla f = \langle2x+3y,\ 3x\rangle.
4
Evaluate at (1,2)(1,2): f(1,2)=2(1)+3(2), 3(1)=8,3\nabla f(1,2) = \langle2(1)+3(2),\ 3(1)\rangle = \langle8,3\rangle.

04 · The Directional Derivative

fxf_x and fyf_y measure the rate of change only along the two axis directions. The directional derivative generalizes this to any direction at all, using the dot product (Chapter 14) to combine the gradient with a chosen direction.

Definition — Directional Derivative

For a unit vector u^\hat u (Chapter 14: u^=1\lVert\hat u\rVert=1):

Du^f=fu^D_{\hat u}f = \nabla f \cdot \hat u

Du^fD_{\hat u}f is the rate of change of ff as position moves in the direction u^\hat u.

Step-by-step — Find the directional derivative of $f(x,y)=x^2+3xy$ at $(1,2)$ in the direction of $\vec v=\langle3,4\rangle$
1
**Recall f(1,2)=8,3\nabla f(1,2) = \langle8,3\rangle from Section 03.
2
Normalize v\vec v into a unit vector (Chapter 14, Section 02's magnitude formula): v=32+42=25=5\lVert\vec v\rVert = \sqrt{3^2+4^2}=\sqrt{25}=5; u^=vv=35,45\hat u = \dfrac{\vec v}{\lVert\vec v\rVert} = \left\langle\dfrac35,\dfrac45\right\rangle.
3
Apply the dot product formula (Chapter 14, Section 03): Du^f=fu^=8,335,45=8(35)+3(45)=245+125=365D_{\hat u}f = \nabla f\cdot\hat u = \langle8,3\rangle\cdot\left\langle\dfrac35,\dfrac45\right\rangle = 8\left(\dfrac35\right)+3\left(\dfrac45\right) = \dfrac{24}{5}+\dfrac{12}{5}=\dfrac{36}{5}.
4
Conclude: moving from (1,2)(1,2) in the direction of 3,4\langle3,4\rangle, ff increases at rate 365=7.2\dfrac{36}{5}=7.2 per unit distance traveled.
❌ Using a non-unit vector directly in the directional derivative formula

On the same problem, skipping step 2 and computing fv=8,33,4=24+12=36\nabla f\cdot\vec v = \langle8,3\rangle\cdot\langle3,4\rangle = 24+12=36 directly.

Why it breaks: the directional derivative's definition (Section 04) explicitly requires u^\hat u to be a unit vector — a direction of length exactly 11, carrying no scaling of its own. Using v=3,4\vec v=\langle3,4\rangle directly (with v=51\lVert\vec v\rVert=5\neq1) mixes the direction together with an extra factor of 55 from its own length.

Consequence: 3636536 \neq \dfrac{36}{5} (the correctly normalized answer from step 3) — the un-normalized result is exactly 5×5\times too large, since it silently multiplied the true directional derivative by v=5\lVert\vec v\rVert=5. Always normalize the direction vector to length 11 before applying the dot product with f\nabla f.


05 · The Tangent Plane and the Multivariable Chain Rule

Definition — Tangent Plane

At a point (x0,y0)(x_0,y_0) where ff is differentiable, the plane tangent to the surface z=f(x,y)z=f(x,y) is

z=f(x0,y0)+fx(x0,y0)(xx0)+fy(x0,y0)(yy0)z = f(x_0,y_0) + f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0)

directly extending Chapter 02, Section 02's tangent-line formula (y=f(a)+f(a)(xa)y=f(a)+f'(a)(x-a)) with one extra term for the second variable.

Definition — Multivariable Chain Rule (along a parametrized path)

If x=x(t)x=x(t) and y=y(t)y=y(t) (Chapter 13's parametric functions), and z=f(x,y)z=f(x,y), then

dzdt=fxdxdt+fydydt\frac{dz}{dt} = f_x\cdot\frac{dx}{dt} + f_y\cdot\frac{dy}{dt}

Each term applies Chapter 03's single-variable chain rule along one "slice" direction, and the two contributions add — the total rate of change from both xx and yy moving simultaneously.

Step-by-step — Find $\dfrac{dz}{dt}$ for $z=x^2y$, $x(t)=t$, $y(t)=t^2$, at $t=2$
1
Compute the partials of zz: fx=2xyf_x = 2xy; fy=x2f_y = x^2.
2
Compute dxdt\dfrac{dx}{dt} and dydt\dfrac{dy}{dt} (Chapter 02): dxdt=1\dfrac{dx}{dt}=1; dydt=2t\dfrac{dy}{dt}=2t.
3
At t=2t=2: find x,yx,y: x(2)=2x(2)=2, y(2)=4y(2)=4.
4
Evaluate the partials at (x,y)=(2,4)(x,y)=(2,4): fx(2,4)=2(2)(4)=16f_x(2,4)=2(2)(4)=16; fy(2,4)=22=4f_y(2,4)=2^2=4.
5
Evaluate dxdt\dfrac{dx}{dt}, dydt\dfrac{dy}{dt} at t=2t=2: dxdt=1\dfrac{dx}{dt}=1; dydt=2(2)=4\dfrac{dy}{dt}=2(2)=4.
6
Apply the chain rule formula: dzdt=fxdxdt+fydydt=16(1)+4(4)=16+16=32\dfrac{dz}{dt} = f_x\cdot\dfrac{dx}{dt}+f_y\cdot\dfrac{dy}{dt} = 16(1)+4(4) = 16+16=32.

06 · Exercises

EXERCISE 15.1

Differentiate with respect to one variable while treating the other as a fixed constant, exactly as in Section 01.

f(x,y)=4x2y32yf(x,y)=4x^2y^3-2y. fx=8xy3f_x = 8xy^3 (power rule, y3y^3 constant). fy=12x2y22f_y = 12x^2y^2-2 (power rule on y3y^3 and yy; 4x24x^2 constant).

Find fxf_x and fyf_y for f(x,y)=4x2y32yf(x,y)=4x^2y^3-2y.

EXERCISE 15.2

Compute both first partials first, then differentiate each of those again with respect to the appropriate variable.

f(x,y)=x4y2f(x,y)=x^4y^2. fx=4x3y2f_x=4x^3y^2, fy=2x4yf_y=2x^4y. fxx=12x2y2f_{xx}=12x^2y^2. fyy=2x4f_{yy}=2x^4. fxy=x(2x4y)=8x3yf_{xy}=\frac{\partial}{\partial x}(2x^4y)=8x^3y. fyx=y(4x3y2)=8x3yf_{yx}=\frac{\partial}{\partial y}(4x^3y^2)=8x^3y. The two mixed partials match, as Clairaut's theorem (Section 02) guarantees.

Find all four second-order partial derivatives of f(x,y)=x4y2f(x,y)=x^4y^2, and confirm fxy=fyxf_{xy}=f_{yx}.

EXERCISE 15.3

Compute both first partials, evaluate them at the given point, and assemble the result as a directed quantity in component form.

f(x,y)=xy2x2f(x,y)=xy^2-x^2 at (2,1)(2,1). fx=y22xf_x=y^2-2x, fy=2xyf_y=2xy. At (2,1)(2,1): fx=14=3f_x=1-4=-3; fy=4f_y=4. f(2,1)=3,4\nabla f(2,1) = \langle-3,4\rangle.

Find f\nabla f at (2,1)(2,1) for f(x,y)=xy2x2f(x,y)=xy^2-x^2.

EXERCISE 15.4

Normalize the direction vector to a unit vector before taking the dot product with the gradient.

Using f(2,1)=3,4\nabla f(2,1)=\langle-3,4\rangle from Exercise 15.3 and direction v=1,0\vec v=\langle1,0\rangle: v=1\lVert\vec v\rVert=1 already (it's already a unit vector). Du^f=3,41,0=3(1)+4(0)=3D_{\hat u}f = \langle-3,4\rangle\cdot\langle1,0\rangle = -3(1)+4(0)=-3.

Using the gradient from Exercise 15.3, find the directional derivative of ff at (2,1)(2,1) in the direction v=1,0\vec v=\langle1,0\rangle.

EXERCISE 15.5

Compute the two partial derivatives, evaluate at the given point, then plug into the tangent plane formula.

f(x,y)=x2+y2f(x,y)=x^2+y^2 at (1,1)(1,1): f(1,1)=2f(1,1)=2. fx=2xf_x=2x, fy=2yf_y=2y; at (1,1)(1,1): fx=2f_x=2, fy=2f_y=2. Tangent plane: z=2+2(x1)+2(y1)=2+2x2+2y2=2x+2y2z = 2+2(x-1)+2(y-1) = 2+2x-2+2y-2 = 2x+2y-2.

Find the equation of the tangent plane to z=x2+y2z=x^2+y^2 at (1,1)(1,1).

EXERCISE 15.6

Compute the partials of the value function and the parametric derivatives of each input, then combine using the multivariable chain rule.

A portfolio's value is V(x,y)=50x+30yV(x,y)=50x+30y dollars where x,yx,y are two asset prices, both changing with time: x(t)=10+2tx(t)=10+2t, y(t)=20ty(t)=20-t. Vx=50V_x=50, Vy=30V_y=30. dxdt=2\dfrac{dx}{dt}=2, dydt=1\dfrac{dy}{dt}=-1. dVdt=50(2)+30(1)=10030=70\dfrac{dV}{dt} = 50(2)+30(-1) = 100-30=70. Portfolio value is increasing at 7070 dollars per unit time.

A portfolio's value is V(x,y)=50x+30yV(x,y)=50x+30y dollars, where x(t)=10+2tx(t)=10+2t and y(t)=20ty(t)=20-t are two asset prices changing with time tt. Find dVdt\dfrac{dV}{dt} using the multivariable chain rule.


07 · Chapter Summary

ConceptFormula / Rule
Partial derivativefx=limh0f(x+h,y)f(x,y)hf_x = \lim_{h\to0}\frac{f(x+h,y)-f(x,y)}{h}; other variable held fixed
Mixed partialsfxy=fyxf_{xy}=f_{yx} when both are continuous (Clairaut's Theorem)
Gradientf=fx,fy\nabla f = \langle f_x, f_y\rangle; points toward steepest increase
Directional derivativeDu^f=fu^D_{\hat u}f = \nabla f\cdot\hat u, u^\hat u a unit vector
Tangent planez=f(x0,y0)+fx(x0,y0)(xx0)+fy(x0,y0)(yy0)z=f(x_0,y_0)+f_x(x_0,y_0)(x-x_0)+f_y(x_0,y_0)(y-y_0)
Multivariable chain ruledzdt=fxdxdt+fydydt\dfrac{dz}{dt} = f_x\dfrac{dx}{dt}+f_y\dfrac{dy}{dt}

Next: Chapter 16 — Multiple Integrals, which extends the definite integral from area under a curve to volume under a surface.