Calculus 3Partial Derivatives

Partial Derivatives

Differentiate in one variable while holding the others fixed.

Not started Jump to practice

How fast does $f(x, y)$ change? It depends on which way you move. The simplest choice is to move in the $x$-direction only, keeping $y$ fixed, or in the $y$-direction only. Each choice turns $f$ into a function of one variable, and you already know how to differentiate those, including with the chain rule.

Key idea

$$f_x(a, b) = \lim_{h \to 0} \frac{f(a + h, b) - f(a, b)}{h}, \qquad f_y(a, b) = \lim_{h \to 0} \frac{f(a, b + h) - f(a, b)}{h}.$$ To compute $f_x$, treat $y$ as a constant and differentiate with respect to $x$; for $f_y$, treat $x$ as a constant. Other notations: $\frac{\partial f}{\partial x}$, $\frac{\partial z}{\partial x}$.

Why it works

Fix $y = b$. Then $g(x) = f(x, b)$ is an ordinary function, and its graph is the curve where the vertical plane $y = b$ cuts the surface (the trace). The definition of $f_x(a, b)$ is exactly the definition of $g'(a)$. So $f_x(a, b)$ is the slope of that trace, rise in $z$ per unit step in $x$. Every rule from one-variable calculus applies, because during the computation $y$ really is just a number.
The orange curve is the trace in the plane $y = b$; its tangent line has slope $f_x$. The purple trace lies in $x = a$, with slope $f_y$. Move the point with the sliders and watch both slopes in the readout.

Worked examples

Worked example: A polynomial

Find $f_x$ and $f_y$ for $f(x, y) = x^3y^2 + 4xy - 5y$.
  1. $f_x$: $y$ is a constant. $\frac{\partial}{\partial x}(x^3y^2) = 3x^2y^2$, $\frac{\partial}{\partial x}(4xy) = 4y$, and $-5y$ has no $x$, so its derivative is ${}0$.
  2. $f_y$: $x$ is a constant. $\frac{\partial}{\partial y}(x^3y^2) = 2x^3y$, $\frac{\partial}{\partial y}(4xy) = 4x$, $\frac{\partial}{\partial y}(-5y) = -5$.

Answer: $f_x = 3x^2y^2 + 4y$, $f_y = 2x^3y + 4x - 5$

Worked example: The chain rule inside

Find $f_x$ and $f_y$ for $f(x, y) = e^{xy} + x\sin y$.
  1. $f_x$: the derivative of $e^{xy}$ with respect to $x$ is $e^{xy} \cdot y$ (the inside $xy$ has $x$-derivative $y$). $\frac{\partial}{\partial x}(x\sin y) = \sin y$.
  2. $f_y$: $e^{xy} \cdot x$ and $x\cos y$.

Answer: $f_x = ye^{xy} + \sin y$, $f_y = xe^{xy} + x\cos y$

Worked example: Slopes on a surface

For $f(x, y) = 4 - x^2 - 2y^2$, find the slopes of the surface at $(1, 1)$ in the $x$- and $y$-directions.
  1. $f_x = -2x$, so $f_x(1, 1) = -2$: stepping east, the surface drops 2 units per unit.
  2. $f_y = -4y$, so $f_y(1, 1) = -4$: stepping north, it drops twice as fast.

Answer: $-2$ and $-4$

Three variables work the same way: for $f(x, y, z) = xy^2z^3$, $f_z = 3xy^2z^2$, holding both $x$ and $y$ constant.

Common mistake

Differentiating the other variable too. When computing $\frac{\partial}{\partial x}(x^2y^3)$, the factor $y^3$ is a constant multiplier, so the answer is ${}2xy^3$, not ${}2x \cdot 3y^2$. And a term with no $x$ at all, like $-5y$, is a constant whose $x$-derivative is ${}0$. Check: replace $y$ by a number like ${}2$ in the original, differentiate the one-variable function, and compare.

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 1 XP.

Loading practice…

Builds on

Leads to

Also used in other ladders:

Sources and further reading

  • OpenStax Calculus Volume 3, 4.3 Partial Derivatives
@teddyrookbook GitHub