01 / 21
\(\partial\) \(f\) \(\partial x\)

Computing
Partial Derivatives

Learn how to differentiate multivariable functions with respect to one variable at a time, treating all others as constants.

Calculus 3

What Is a Partial Derivative?

When a function depends on more than one variable, we often want to know how it changes when we adjust just one of those variables. A partial derivative measures the rate of change of \( f(x, y) \) with respect to one variable while holding all others constant.

Visualizing Partial Derivatives

\(x\) \(f\) \(y\) slope = \( \frac{\partial f}{\partial x} \) slice along x (y fixed) slice along y (x fixed)

Geometric idea: slice the surface with a plane where \( y \) is constant. The resulting curve's slope at any point is the partial derivative with respect to \( x \).

Why Partial Derivatives Matter

Optimization
Finding maxima and minima of multivariable functions requires setting all partial derivatives to zero.
Gradients
The gradient vector \( \nabla f \) is built from partial derivatives and points in the direction of steepest ascent.
Applications
Physics, engineering, economics, and machine learning all rely on partial derivatives to model change.

The Formal Definition

This is the limit definition: we nudge only \( x \) by \( h \), keep \( y \) fixed at \( b \), and see how \( f \) changes. The analogous definition for \( \frac{\partial f}{\partial y} \) nudges \( y \) instead.

The Practical Rule

\( \frac{\partial}{\partial x} \)
\( y \) is a constant. Apply power rule, product rule, chain rule to \( x \) only.
\( \frac{\partial}{\partial y} \)
\( x \) is a constant. Apply the same single-variable rules, but now to \( y \).

Ordinary vs Partial Derivatives

Ordinary \( \frac{df}{dx} \) Partial \( \frac{\partial f}{\partial x} \)
Variables Single variable \( f(x) \) Multiple variables \( f(x,y,\ldots) \)
Other vars None to worry about Held constant
Notation \( f'(x),\; \frac{df}{dx} \) \( f_x,\; \frac{\partial f}{\partial x} \)
Differentiation rules Standard rules Same rules, just freeze other vars

Step-by-Step Method

1
Identify the target variable. Which variable are you differentiating with respect to?
2
Freeze other variables. Treat every other variable as if it were a numerical constant.
3
Differentiate normally. Apply power rule, product rule, quotient rule, or chain rule as needed.
4
Simplify. Combine like terms and present your result.

Notation You Will See

Leibniz
\( \frac{\partial f}{\partial x},\quad \frac{\partial^2 f}{\partial x\,\partial y} \)
Subscript
\( f_x,\quad f_{xy} \)
Operator
\( D_x f,\quad \partial_x f \)

Example 1: Polynomial

\(f_x\)
Treat \( y \) as a constant. The derivatives of \( -7y \) and \( +2 \) with respect to \( x \) are zero. $$ f_x = 6xy + 5y^3 $$
\(f_y\)
Treat \( x \) as a constant. The derivative of \( 3x^2y \) w.r.t. \( y \) is \( 3x^2 \), and the derivative of \( -7y \) is \( -7 \). $$ f_y = 3x^2 + 15xy^2 - 7 $$

Example 2: Chain Rule

\(g_x\)
The outer function is \( e^u \) where \( u = x^2 y \). By the chain rule: $$ g_x = e^{x^2 y} \cdot \frac{\partial}{\partial x}(x^2 y) = e^{x^2 y} \cdot 2xy $$
\(g_y\)
Same outer function, differentiate the inner w.r.t. \( y \): $$ g_y = e^{x^2 y} \cdot \frac{\partial}{\partial y}(x^2 y) = e^{x^2 y} \cdot x^2 $$

Example 3: Trigonometric

\(h_x\)
Chain rule on \( \sin(xy) \): derivative of outer is \( \cos(xy) \), inner w.r.t. \( x \) is \( y \). For the fraction, \( y^2 \) is constant: $$ h_x = y\cos(xy) + \frac{1}{y^2} $$
\(h_y\)
Chain rule gives \( x\cos(xy) \). For \( xy^{-2} \), use power rule on \( y \): $$ h_y = x\cos(xy) - \frac{2x}{y^3} $$

Higher-Order Partials

We can differentiate a partial derivative again. For \( f(x,y) \), the four second-order partial derivatives are:

\( f_{xx} \)
Differentiate \( f_x \) with respect to \( x \) again.
\( f_{yy} \)
Differentiate \( f_y \) with respect to \( y \) again.
\( f_{xy} \)
Differentiate \( f_x \) with respect to \( y \).
\( f_{yx} \)
Differentiate \( f_y \) with respect to \( x \).

Example: Second-Order Partials

1
\( f_x = 3x^2 + 2xy^2 \), then \( f_{xx} = 6x + 2y^2 \)
2
\( f_y = 2x^2 y - 10y^4 \), then \( f_{yy} = 2x^2 - 40y^3 \)
3
\( f_{xy} = \frac{\partial}{\partial y}(3x^2 + 2xy^2) = 4xy \)
4
\( f_{yx} = \frac{\partial}{\partial x}(2x^2 y - 10y^4) = 4xy \) ✓ Matches!

Common Mistakes

✕ Differentiating the wrong variable
Accidentally differentiating \( y \) when finding \( f_x \). Always confirm which variable to treat as the constant first.
✕ Forgetting the chain rule
With expressions like \( e^{xy} \) or \( \sin(x^2 y) \), you must differentiate the inner function too.
✕ Mishandling Constants
An additive term with only \(y\) (e.g., \(+y^2\)) has a derivative of 0 w.r.t. \(x\). But a \(y\) term that multiplies an \(x\) term (e.g., in \(x^2y^2\)) is a constant factor and remains.

Summary of Key Rules

Function type \( \frac{\partial}{\partial x} \) \( \frac{\partial}{\partial y} \)
\( x^n y^m \) \( n x^{n-1} y^m \) \( m x^n y^{m-1} \)
\( e^{xy} \) \( y\, e^{xy} \) \( x\, e^{xy} \)
\( \sin(xy) \) \( y \cos(xy) \) \( x \cos(xy) \)
\( \ln(x^2+y) \) \( \frac{2x}{x^2+y} \) \( \frac{1}{x^2+y} \)

Question 1 of 5

If \( f(x,y) = 4x^3 y^2 + 7x \), what is \( f_x \)?

Question 2 of 5

If \( g(x,y) = e^{2x + 3y} \), what is \( g_y \)?

Question 3 of 5

Let \( h(x,y) = x^2 \sin(y) \). What is \( h_{xy} \)?

Question 4 of 5

If \( f(x,y) = \ln(x^2 + y^2) \), what is \( f_x \)?

Question 5 of 5

For \( f(x,y,z) = xyz + z^2 \), what is \( \frac{\partial f}{\partial z} \)?