Partial Derivatives Formula
Partial derivatives explained with notation, rules, and examples.
Learn how to differentiate multivariable functions with respect to one variable.
The Formula
A partial derivative measures how a multivariable function changes when one variable changes while all others are held constant. Where ordinary derivatives apply to functions of one variable, partial derivatives extend differentiation to functions of two or more variables — essential in physics, engineering, economics, and machine learning.
Notation
| Symbol | Meaning | Read as |
|---|---|---|
| ∂f/∂x | Partial derivative of f with respect to x | "partial f, partial x" |
| ∂f/∂y | Partial derivative of f with respect to y | "partial f, partial y" |
| fx | Shorthand notation for ∂f/∂x | "f sub x" |
| ∇f | Gradient — vector of all partial derivatives | "del f" or "grad f" |
How to Compute
To find ∂f/∂x: treat every variable except x as a constant, then differentiate normally using standard derivative rules.
Example 1 — Simple Polynomial
f(x, y) = 3x²y + 5y³ − 2x
∂f/∂x: treat y as constant → differentiate with respect to x
∂f/∂x = 6xy − 2
∂f/∂y: treat x as constant → differentiate with respect to y
∂f/∂y = 3x² + 15y²
Example 2 — Trigonometric Function
f(x, y) = x² sin(y) + e^x y
∂f/∂x: y is constant → d/dx[x² sin(y)] + d/dx[e^x y]
∂f/∂x = 2x sin(y) + e^x y
∂f/∂y: x is constant → d/dy[x² sin(y)] + d/dy[e^x y]
∂f/∂y = x² cos(y) + e^x
Second-Order Partial Derivatives
You can differentiate a partial derivative again to get second-order partials:
∂²f/∂y∂x — differentiate ∂f/∂x with respect to y (mixed partial)
Clairaut's Theorem: For most smooth functions, mixed partials are equal: ∂²f/∂y∂x = ∂²f/∂x∂y.
The Gradient
The gradient ∇f collects all partial derivatives into a vector that points in the direction of steepest ascent:
When to Use Partial Derivatives
- Optimising multivariable functions (set all partials to zero to find critical points)
- Gradient descent in machine learning and neural network training
- Heat equations, wave equations, and fluid dynamics in physics
- Marginal analysis in economics (marginal cost, marginal utility)
- Error propagation in experimental science
- Computer graphics — surface normals and shading calculations