So far in calculus you have mostly differentiated functions of one variable. But many real quantities depend on several variables at once: the temperature of a metal plate depends on both \( x \) and \( y \), and the volume of a gas depends on pressure and temperature. Partial derivatives tell you how such a function changes when you vary one variable at a time.
What Is a Partial Derivative?
For a function \( f(x, y) \), the partial derivative with respect to \( x \) measures the rate of change of \( f \) as \( x \) changes while \( y \) is held constant. Similarly, the partial derivative with respect to \( y \) holds \( x \) constant.
Formally:
$$ \frac{\partial f}{\partial x} = \lim_{h \to 0} \frac{f(x + h, y) - f(x, y)}{h} $$
In practice, you never need the limit. You simply differentiate as normal, treating the other variable like a number.
Notation
You will see several equivalent notations:
- \( \frac{\partial f}{\partial x} \), \( f_x \) or \( \partial_x f \) for the partial with respect to \( x \)
- \( \frac{\partial f}{\partial y} \), \( f_y \) or \( \partial_y f \) for the partial with respect to \( y \)
The curly symbol \( \partial \) (read "partial" or "del") reminds you that other variables are being held fixed.
The Golden Rule
When finding \( f_x \), treat \( y \) exactly as if it were a constant like 5. All the usual rules (power, product, quotient, chain) still apply.
For instance, if \( f = 5x^2 \), then \( f_x = 10x \). So if \( f = y x^2 \), then \( f_x = 2xy \), with \( y \) carried along as a constant multiplier. And a term with no \( x \) at all, like \( y^3 \), differentiates to 0 with respect to \( x \).
Worked Example 1: A Polynomial in Two Variables
Find \( f_x \) and \( f_y \) for \( f(x, y) = x^3 y^2 + 4xy - 5y \).
Finding \( f_x \) (treat \( y \) as constant):
- \( x^3 y^2 \to 3x^2 y^2 \)
- \( 4xy \to 4y \)
- \( -5y \to 0 \) (no \( x \))
$$ f_x = 3x^2 y^2 + 4y $$
Finding \( f_y \) (treat \( x \) as constant):
- \( x^3 y^2 \to 2x^3 y \)
- \( 4xy \to 4x \)
- \( -5y \to -5 \)
$$ f_y = 2x^3 y + 4x - 5 $$
Worked Example 2: Exponentials and Trig
Find \( f_x \) and \( f_y \) for \( f(x, y) = e^{2x}\sin(3y) \).
\( f_x \): \( \sin(3y) \) is a constant multiplier, and \( \frac{d}{dx}e^{2x} = 2e^{2x} \):
$$ f_x = 2e^{2x}\sin(3y) $$
\( f_y \): \( e^{2x} \) is a constant multiplier, and by the chain rule \( \frac{d}{dy}\sin(3y) = 3\cos(3y) \):
$$ f_y = 3e^{2x}\cos(3y) $$
Worked Example 3: Chain Rule and Evaluating at a Point
Find \( f_x \) and \( f_y \) for \( f(x, y) = \ln(x^2 + y^2) \), then evaluate both at \( (1, 2) \).
Step 1: Use the chain rule. The derivative of \( \ln(u) \) is \( \frac{1}{u} \cdot \frac{\partial u}{\partial x} \).
$$ f_x = \frac{2x}{x^2 + y^2}, \qquad f_y = \frac{2y}{x^2 + y^2} $$
Step 2: Substitute \( (1, 2) \). Here \( x^2 + y^2 = 1 + 4 = 5 \).
$$ f_x(1, 2) = \frac{2}{5}, \qquad f_y(1, 2) = \frac{4}{5} $$
Interpretation: at \( (1, 2) \), \( f \) increases about twice as fast when you move in the \( y \)-direction as in the \( x \)-direction.
Second-Order Partial Derivatives
You can differentiate a partial derivative again. For \( f(x, y) \) there are four second-order partials:
- \( f_{xx} = \frac{\partial^2 f}{\partial x^2} \): differentiate with respect to \( x \) twice
- \( f_{yy} = \frac{\partial^2 f}{\partial y^2} \): differentiate with respect to \( y \) twice
- \( f_{xy} \): differentiate with respect to \( x \), then \( y \)
- \( f_{yx} \): differentiate with respect to \( y \), then \( x \)
The last two are called mixed partial derivatives.
Clairaut's Theorem
If the mixed partials are continuous (true for almost every function you will meet), then:
$$ f_{xy} = f_{yx} $$
This is a great way to check your work.
Worked Example 4: Second Partials
Using \( f(x, y) = x^3 y^2 + 4xy - 5y \) from Example 1, where \( f_x = 3x^2y^2 + 4y \) and \( f_y = 2x^3y + 4x - 5 \):
$$ f_{xx} = \frac{\partial}{\partial x}(3x^2 y^2 + 4y) = 6xy^2 $$
$$ f_{yy} = \frac{\partial}{\partial y}(2x^3 y + 4x - 5) = 2x^3 $$
$$ f_{xy} = \frac{\partial}{\partial y}(3x^2 y^2 + 4y) = 6x^2 y + 4 $$
$$ f_{yx} = \frac{\partial}{\partial x}(2x^3 y + 4x - 5) = 6x^2 y + 4 $$
The mixed partials agree, exactly as Clairaut's theorem predicts.
Where Partial Derivatives Are Used
- Physics: heat and wave equations, thermodynamics, electric fields.
- Economics: marginal cost and marginal utility with several inputs.
- Optimisation: finding maxima and minima of surfaces by solving \( f_x = 0 \) and \( f_y = 0 \).
- Machine learning: gradients, which are vectors of partial derivatives, drive gradient descent.
Common Mistakes
- Forgetting that a constant term becomes zero. In \( f_x \), any term with no \( x \) vanishes.
- Treating the held variable as zero instead of constant. In \( f = x^2 y \), \( f_x = 2xy \), not \( 2x \) or 0.
- Missing the chain rule in expressions like \( \sin(3y) \) or \( \ln(x^2 + y^2) \).
- Mixing up the order in mixed partial notation. Check your textbook's convention, though for nice functions the result is the same.
Key Takeaways
- A partial derivative measures change in one variable while all others are held constant.
- To find \( f_x \), differentiate normally and treat \( y \) like a number; do the reverse for \( f_y \).
- There are four second-order partials, and for well-behaved functions \( f_{xy} = f_{yx} \).
- Partial derivatives are the foundation of multivariable optimisation, gradients and physics equations.
Working on multivariable calculus homework or a university assignment? Amathify's experts and PhD scholars can provide detailed step-by-step solutions. Message us on WhatsApp or submit your problem through the "Ask a Question" form.
Stuck on a problem or assignment?
Our experts and PhD scholars solve maths, physics and chemistry — step by step.