Skip to content
10 min read

Partial Derivatives Explained: A Guide to Multivariable Calculus

Partial derivatives extend the concept of differentiation to functions of more than one variable. Instead of finding how a function changes with respect to a single input, we look at how it changes with respect to one variable while keeping all other variables constant. This idea is central to multivariable calculus and has applications in physics, engineering, economics, and machine learning.

In this guide, we cover the definition of partial derivatives, notation, computation techniques, higher-order partial derivatives, and practical applications. By the end, you will be able to compute partial derivatives confidently and understand their geometric meaning.

What Is a Partial Derivative?

Suppose you have a function of two variables, f(x,y)f(x, y). The partial derivative of ff with respect to xx measures how ff changes as xx changes, while yy is held fixed. Formally:

∂f∂x=lim⁡h→0f(x+h, y)−f(x, y)h\frac{\partial f}{\partial x} = \lim_{h \to 0} \frac{f(x + h,\, y) - f(x,\, y)}{h}

Similarly, the partial derivative with respect to yy holds xx constant:

∂f∂y=lim⁡h→0f(x, y+h)−f(x, y)h\frac{\partial f}{\partial y} = \lim_{h \to 0} \frac{f(x,\, y + h) - f(x,\, y)}{h}

The symbol ∂\partial (a curly d) distinguishes partial derivatives from ordinary derivatives. Other common notations include fxf_x, fyf_y, ∂xf\partial_x f, and DxfD_x f.

How to Compute Partial Derivatives

The key rule is simple: when differentiating with respect to one variable, treat every other variable as a constant. All the familiar derivative rules (power rule, product rule, quotient rule, chain rule) still apply.

Step-by-Step Process

  1. Identify which variable you are differentiating with respect to.
  2. Treat all other variables as constants (just like numbers).
  3. Apply the standard differentiation rules.
  4. Simplify the result.

Worked Examples

Example 1: A Polynomial Function

Find both partial derivatives of f(x,y)=3x2y+5xy3−2y+7f(x, y) = 3x^2y + 5xy^3 - 2y + 7.

Partial derivative with respect to x: Treat yy as a constant.

∂f∂x=6xy+5y3\frac{\partial f}{\partial x} = 6xy + 5y^3

The term −2y-2y becomes 0 (it is a constant with respect to xx), and 7 also vanishes.

Partial derivative with respect to y: Treat xx as a constant.

∂f∂y=3x2+15xy2−2\frac{\partial f}{\partial y} = 3x^2 + 15xy^2 - 2

Example 2: A Trigonometric Function

Find ∂f∂x\frac{\partial f}{\partial x} for f(x,y)=sin⁡(x2y)f(x, y) = \sin(x^2 y).

Using the chain rule, with u=x2yu = x^2 y:

∂f∂x=cos⁡(x2y)⋅∂∂x(x2y)=cos⁡(x2y)⋅2xy\frac{\partial f}{\partial x} = \cos(x^2 y) \cdot \frac{\partial}{\partial x}(x^2 y) = \cos(x^2 y) \cdot 2xy

So ∂f∂x=2xycos⁡(x2y)\frac{\partial f}{\partial x} = 2xy\cos(x^2 y).

Example 3: An Exponential Function

Let f(x,y)=e3x+y2f(x, y) = e^{3x + y^2}. Find both partial derivatives.

∂f∂x=3e3x+y2\frac{\partial f}{\partial x} = 3e^{3x + y^2}
∂f∂y=2ye3x+y2\frac{\partial f}{\partial y} = 2ye^{3x + y^2}

In each case, we differentiate the exponent with respect to the relevant variable and multiply by the exponential.

Example 4: A Quotient

Find ∂f∂x\frac{\partial f}{\partial x} for f(x,y)=x2x+yf(x, y) = \frac{x^2}{x + y}.

Using the quotient rule:

∂f∂x=2x(x+y)−x2⋅1(x+y)2=2x2+2xy−x2(x+y)2=x2+2xy(x+y)2\frac{\partial f}{\partial x} = \frac{2x(x + y) - x^2 \cdot 1}{(x + y)^2} = \frac{2x^2 + 2xy - x^2}{(x + y)^2} = \frac{x^2 + 2xy}{(x + y)^2}

Higher-Order Partial Derivatives

Just as you can take second and third derivatives of single-variable functions, you can take higher-order partial derivatives. For a function f(x,y)f(x, y), there are four second-order partial derivatives:

  • fxx=∂2f∂x2f_{xx} = \frac{\partial^2 f}{\partial x^2} (differentiate twice with respect to xx)
  • fyy=∂2f∂y2f_{yy} = \frac{\partial^2 f}{\partial y^2} (differentiate twice with respect to yy)
  • fxy=∂2f∂y ∂xf_{xy} = \frac{\partial^2 f}{\partial y\, \partial x} (first with respect to xx, then yy)
  • fyx=∂2f∂x ∂yf_{yx} = \frac{\partial^2 f}{\partial x\, \partial y} (first with respect to yy, then xx)

Clairaut's Theorem

If the mixed partial derivatives fxyf_{xy} and fyxf_{yx} are both continuous, then they are equal:

fxy=fyxf_{xy} = f_{yx}

This is a powerful result that simplifies many calculations, as you only need to compute one of the mixed partials.

Example: Second-Order Partials

Let f(x,y)=x3+2x2y−y3f(x, y) = x^3 + 2x^2 y - y^3. First-order partials:

fx=3x2+4xy,fy=2x2−3y2f_x = 3x^2 + 4xy, \quad f_y = 2x^2 - 3y^2

Second-order partials:

fxx=6x+4y,fyy=−6y,fxy=4x,fyx=4xf_{xx} = 6x + 4y, \quad f_{yy} = -6y, \quad f_{xy} = 4x, \quad f_{yx} = 4x

As expected by Clairaut's theorem, fxy=fyx=4xf_{xy} = f_{yx} = 4x.

The Gradient Vector

The gradient of a function f(x,y)f(x, y) collects all partial derivatives into a vector:

∇f=(∂f∂x, ∂f∂y)\nabla f = \left(\frac{\partial f}{\partial x},\, \frac{\partial f}{\partial y}\right)

The gradient points in the direction of steepest increase of ff, and its magnitude gives the rate of change in that direction. This concept is fundamental in optimisation and machine learning, where gradient descent uses the gradient to find minima of cost functions.

For three or more variables, the gradient extends naturally:

∇f(x,y,z)=(∂f∂x, ∂f∂y, ∂f∂z)\nabla f(x, y, z) = \left(\frac{\partial f}{\partial x},\, \frac{\partial f}{\partial y},\, \frac{\partial f}{\partial z}\right)

The Chain Rule for Partial Derivatives

When a multivariable function depends on variables that are themselves functions of other variables, the chain rule becomes essential. If z=f(x,y)z = f(x, y) where x=x(t)x = x(t) and y=y(t)y = y(t), then:

dzdt=∂f∂xdxdt+∂f∂ydydt\frac{dz}{dt} = \frac{\partial f}{\partial x}\frac{dx}{dt} + \frac{\partial f}{\partial y}\frac{dy}{dt}

This generalises to functions of multiple independent variables in a natural way.

Applications of Partial Derivatives

Optimisation

To find the critical points of f(x,y)f(x, y), set both partial derivatives to zero:

∂f∂x=0and∂f∂y=0\frac{\partial f}{\partial x} = 0 \quad \text{and} \quad \frac{\partial f}{\partial y} = 0

The second derivative test uses the Hessian determinant D=fxxfyy−(fxy)2D = f_{xx}f_{yy} - (f_{xy})^2 to classify critical points as local maxima, local minima, or saddle points.

Physics and Engineering

Partial derivatives appear throughout physics. The heat equation, wave equation, and Laplace equation are all expressed using partial derivatives. For example, the two-dimensional Laplace equation is:

∂2u∂x2+∂2u∂y2=0\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} = 0

Economics

In economics, partial derivatives represent marginal effects. If a production function Q(L,K)Q(L, K) depends on labour LL and capital KK, then ∂Q∂L\frac{\partial Q}{\partial L} gives the marginal product of labour: how much additional output one more unit of labour produces, holding capital fixed.

Common Mistakes to Avoid

  • Forgetting to hold other variables constant. When differentiating with respect to xx, every yy is treated as a number. Do not differentiate yy terms.
  • Confusing notation. ∂f∂x\frac{\partial f}{\partial x} is not the same as dfdx\frac{df}{dx}. The curly d specifically indicates a partial derivative.
  • Neglecting the chain rule. For compositions like sin⁡(xy)\sin(xy), you must apply the chain rule when differentiating with respect to either variable.
  • Assuming commutativity without checking continuity. While fxy=fyxf_{xy} = f_{yx} holds for most functions encountered in practice, it requires continuity of the mixed partials.

Try It Yourself

Compute partial derivatives instantly with our free Partial Derivative Calculator. Enter any multivariable function, choose the variable, and see the result step by step. You can also explore related tools like our Derivative Calculator for single-variable differentiation and our Integral Calculator for antiderivatives.

Related Articles