Concepts / Functions of Several Variables

Functions of Several Variables

A partial derivative measures the rate at which a multivariate function changes with respect to one of its variables.

  • Programming

A Quantity With Several Inputs

Many quantities depend on more than one input at the same time. A quantity might depend on a position, a temperature, and a time all at once. When a function has several inputs, a natural question arises: if only one of those inputs changes, how quickly does the output change? Partial derivatives answer exactly that question.

What do you think happens?

Let $f(x, y) = x^{2}y$ and hold y fixed at 3. At the point x = 2, if x increases by a tiny amount while y stays at 3, what is the rate of change of f?

  • 4

  • 6

  • 12

  • 18

Reveal answer
Answer:

12

With y held at 3, the function becomes 3x^{2}. Its ordinary derivative is 6x, and at x = 2 that equals 12. The same value comes from the partial derivative $\frac{\partial f}{\partial x} = 2xy$, which at (2, 3) is 2(2)(3) = 12.

Holding Every Other Input Fixed

A partial derivative measures the rate at which a multivariate function changes with respect to one of its variables. The word partial is the key. When you take the partial derivative with respect to one variable, you let that variable move and study the resulting change in the output, while every other input is held where it is.

Because only one input is allowed to move, a partial derivative is just an ordinary derivative computed along one direction of the input space. Nothing new is computed mechanically. What changes is the question being asked. Computing a partial derivative means treating every other variable as fixed, which turns the problem into a single-variable derivative.

Hold y at 3Hold x at 2Change x onlyChange y only$\frac{\partialf}{\partial x} = 2xy$equals 12 at (2, 3)$\frac{\partialf}{\partial y} =x^{2}$equals 4 at (2, 3)one input movesrate in xone input movesrate in y
Nudging only x while y is frozen gives a different rate than nudging only y while x is frozen. Both rates come from the same function f(x, y) = x^{2}y, evaluated at the point (2, 3).

Reading the Partial Derivative Notation

For a function $f(x, y)$ with two inputs, the partial derivative with respect to $x$ is written $\frac{\partial f}{\partial x}$, and the partial derivative with respect to $y$ is written $\frac{\partial f}{\partial y}$. The curly symbol $\partial$ is a reminder that the output is being watched while only one input is allowed to vary.

$\partial f$change in the outputovera ratio of changes$\partial x$the one input allowed tovarynumeratordenominator
Each part of the ratio tells you what is being measured: the output f, the single input x that is allowed to vary, and the curly symbol that signals all other inputs are held fixed.

The single-variable notation $\frac{df}{dx}$ uses a plain d because there is only one input that can change. The partial notation uses the curly $\partial$ because the function has several inputs, and the symbol signals that the others are being held where they are. The calculation is the same kind of derivative in both cases; the notation tells you which input is moving.

Computing Both Partials of x^2 y

Worked example

Partial derivatives of f(x, y) = x^{2}y

Find $\frac{\partial f}{\partial x}$ and $\frac{\partial f}{\partial y}$ for $f(x, y) = x^{2}y$.

  1. 1
    Partial with respect to x

    Treat y as a constant, so it behaves like a fixed number multiplying x^{2}. Differentiating x^{2} gives 2x, and the constant y stays in front: $\frac{\partial f}{\partial x} = 2xy$.

  2. 2
    Partial with respect to y

    Now treat x as the constant. The term x^{2} is a fixed multiplier of y, and the derivative of y with respect to y is 1, so $\frac{\partial f}{\partial y} = x^{2}$.

  3. 3
    Check the dependence

    The first result still contains y, because y scales the effect of x. The partial derivative is therefore a rate that depends on where you evaluate it, not one fixed number for the whole function.

Result

$\frac{\partial f}{\partial x} = 2xy$ and $\frac{\partial f}{\partial y} = x^{2}$

Why the Rate Depends on the Point

The two partial derivatives of $f(x, y) = x^{2}y$ are different expressions, and each depends on the point at which it is evaluated. This is why a partial derivative is best read as the rate of change in one direction, at one particular point, rather than as a single fixed number for the whole function.

Worked example

Evaluating the partials at the point (2, 3)

Find the values of both partial derivatives of $f(x, y) = x^{2}y$ at the point where x = 2 and y = 3.

  1. 1
    Substitute into the x partial

    $\frac{\partial f}{\partial x} = 2xy = 2(2)(3) = 12$. A small increase in x here raises f at a rate of 12 per unit of x.

  2. 2
    Substitute into the y partial

    $\frac{\partial f}{\partial y} = x^{2} = 2^{2} = 4$. A small increase in y here raises f at a rate of 4 per unit of y.

  3. 3
    Compare the two rates

    At the same point the function responds more strongly to x than to y. Move to a different point and these numbers change.

Result

At (2, 3), $\frac{\partial f}{\partial x} = 12$ and $\frac{\partial f}{\partial y} = 4$

The Gradient as a Collected Vector

Once you have one partial derivative for every input, a natural next step is to keep them together. A gradient is a vector containing all of the partial derivatives of a multivariate function. For a function f with n inputs $x_{1}$ through $x_{n}$, the gradient $\nabla f$ holds one partial derivative for each input, in a fixed order.

Rule

For $f(x, y) = x^{2}y$ the gradient is $\nabla f = (2xy, \; x^{2})$. The vector has as many entries as the function has inputs, and each entry answers the single-variable question for its own input. The gradient does not add new information beyond the partial derivatives. It packages them into one object, so the rates of change for every input travel together as one quantity.

$f(x, y) = x^{2}y$$\frac{\partialf}{\partial x} = 2xy$first component$\nabla f = (2xy, \;x^{2})$one vector with allpartials$\frac{\partialf}{\partial y} =x^{2}$second componentpartial in xpartial in ycollected in ordercollected in order
The function f has one partial derivative per input. Placing those partials in a fixed order produces the gradient, a single vector whose components are the individual rates.

Mistakes Beginners Make With Partials

  • Common mistake

    Letting the other inputs change while differentiating

    What it looks like

    Taking $\frac{\partial f}{\partial x}$ of $x^{2}y$ and differentiating y as if it were a variable with respect to x.

    Why it fails

    A partial derivative holds every other input fixed. Only the variable named in the denominator is allowed to move.

    Do this instead

    Treat y as a constant multiplier, giving $\frac{\partial f}{\partial x} = 2xy$.

  • Common mistake

    Expecting a partial derivative to be a single fixed number

    What it looks like

    Concluding that $\frac{\partial f}{\partial x} = 2xy$ means the rate is always 2 times the product of x and y everywhere.

    Why it fails

    The partial derivative depends on the point where it is evaluated, so its value changes as x and y change.

    Do this instead

    Read the result as the rate in one direction at a specific point, such as 12 at (2, 3).

  • Common mistake

    Using the plain d notation for a function with several inputs

    Why it fails

    The plain d signals a single input. Using it for a multivariable function hides which input is being varied.

    Do this instead

    Use $\partial$ and name the input in the denominator, as in $\frac{\partial f}{\partial y}$.

  • Common mistake

    Treating the gradient as extra information beyond the partials

A Quick Check of Your Understanding

EASY

Let $g(x, y) = 3x + y^{2}$. Find both partial derivatives, then write the gradient of g at the point (1, 2).

Hints
  • For $\frac{\partial g}{\partial x}$, treat y as a constant. The term $y^{2}$ is then a fixed number and disappears when differentiating with respect to x.
  • For $\frac{\partial g}{\partial y}$, treat x as a constant so that 3x is a fixed number.
  • Substitute y = 2 into the y partial before forming the gradient vector.

Key Takeaways

  • A partial derivative measures how a multivariate function changes with respect to one input while every other input is held fixed.
  • Computing a partial derivative turns the problem into an ordinary single-variable derivative, and the curly $\partial$ notation signals that only one input is moving.
  • Partial derivatives depend on the point where they are evaluated; for $f(x, y) = x^{2}y$ they give 12 and 4 at (2, 3).
  • A gradient is a vector containing all of the partial derivatives of a function, in a fixed order. It collects the rates into one object without adding new information.

Related concepts

More concepts starting with F