# Partial derivative

In mathematics, a partial derivative of a function of several variables is its derivative with respect to one of those variables with the others held constant (as opposed to the total derivative, in which all variables are allowed to vary). Partial derivatives are useful in vector calculus and differential geometry.

The partial derivative of a function f with respect to the variable x is written as fx, xf, or ∂f/∂x. The partial-derivative symbol is a rounded letter, distinguished from the straight d of total-derivative notation. The notation was introduced by Legendre and gained general acceptance after its reintroduction by Jacobi.

## Definition

Suppose that f is a function of more than one variable. For instance,

${\displaystyle f(x,y)=x^{2}+xy+y^{2}.\,}$

The function f can be reinterpreted as a family of functions of one variable indexed by the other variables:

${\displaystyle f(x,y)=f_{x}(y)=\,\!x^{2}+xy+y^{2}.\,}$

In other words, every value of x defines a function, denoted fx, which is a function of one real number.[1] That is,

${\displaystyle x\mapsto f_{x},\,}$
${\displaystyle f_{x}(y)=x^{2}+xy+y^{2}.\,}$

Once a value of x is chosen, say a, then f(x,y) determines a function fa which sends y to a2 + ay + y2:

${\displaystyle f_{a}(y)=a^{2}+ay+y^{2}.\,}$

In this expression, a is a constant, not a variable, so fa is a function of only one real variable, that being y. Consequently the definition of the derivative for a function of one variable applies:

${\displaystyle f_{a}'(y)=a+2y.\,}$

The above procedure can be performed for any choice of a. Assembling the derivatives together into a function gives a function which describes the variation of f in the y direction:

${\displaystyle {\frac {\partial f}{\partial y}}(x,y)=x+2y.\,}$

This is the partial derivative of f with respect to y. Here ∂ is a rounded d called the partial derivative symbol. To distinguish it from the letter d, ∂ is sometimes pronounced "der", "del", or "partial" instead of "dee".

In general, the partial derivative of a function f(x1,...,xn) in the direction xi at the point (a1,...,an) is defined to be:

${\displaystyle {\frac {\partial f}{\partial x_{i}}}(a_{1},\ldots ,a_{n})=\lim _{h\to 0}{\frac {f(a_{1},\ldots ,a_{i}+h,\ldots ,a_{n})-f(a_{1},\ldots ,a_{n})}{h}}.}$

In the above difference quotient, all the variables except xi are held fixed. That choice of fixed values determines a function of one variable ${\displaystyle f_{a_{1},\ldots ,a_{i-1},a_{i+1},\ldots ,a_{n}}(x_{i})=f(a_{1},\ldots ,a_{i-1},x_{i},a_{i+1},\ldots ,a_{n})}$, and by definition,

${\displaystyle {\frac {df_{a_{1},\ldots ,a_{i-1},a_{i+1},\ldots ,a_{n}}}{dx_{i}}}(a_{1},\ldots ,a_{n})={\frac {\partial f}{\partial x_{i}}}(a_{1},\ldots ,a_{n}).}$

In other words, the different choices of a index a family of one-variable functions just as in the example above. This expression also shows that the computation of partial derivatives reduces to the computation of one-variable derivatives.

An important example of a function of several variables is the case of a scalar-valued function f(x1,...xn) on a domain in Euclidean space Rn (e.g., on R2 or R3). In this case f has a partial derivative ∂f/∂xj with respect to each variable xj. At the point a, these partial derivatives define the vector

${\displaystyle \nabla f(a)=\left({\frac {\partial f}{\partial x_{1}}}(a),\ldots ,{\frac {\partial f}{\partial x_{n}}}(a)\right).}$

This vector is called the gradient of f at a. If f is differentiable at every point in some domain, then the gradient is a vector-valued function ∇f which takes the point a to the vector ∇f(a). Consequently the gradient determines a vector field.

## Examples

File:Cone 3d.png
The volume of a cone depends on height and radius

Consider the volume V of a cone; it depends on the cone's height h and its radius r according to the formula

${\displaystyle V(r,h)={\frac {\pi r^{2}h}{3}}.}$

The partial derivative of V with respect to r is

${\displaystyle {\frac {\partial V}{\partial r}}={\frac {2\pi rh}{3}}.}$

It describes the rate with which a cone's volume changes if its radius is varied and its height is kept constant. The partial derivative with respect to h is

${\displaystyle {\frac {\partial V}{\partial h}}={\frac {\pi r^{2}}{3}}}$

and represents the rate with which the volume changes if its height is varied and its radius is kept constant.

Now consider by contrast the total derivative of V with respect to r and h. They are, respectively

${\displaystyle {\frac {\operatorname {d} V}{\operatorname {d} r}}=\overbrace {\frac {2\pi rh}{3}} ^{\frac {\partial V}{\partial r}}+\overbrace {\frac {\pi r^{2}}{3}} ^{\frac {\partial V}{\partial h}}{\frac {\operatorname {d} h}{\operatorname {d} r}}}$

and

${\displaystyle {\frac {\operatorname {d} V}{\operatorname {d} h}}=\overbrace {\frac {\pi r^{2}}{3}} ^{\frac {\partial V}{\partial h}}+\overbrace {\frac {2\pi rh}{3}} ^{\frac {\partial V}{\partial r}}{\frac {\operatorname {d} r}{\operatorname {d} h}}}$

We see that the difference between the total and partial derivative is the elimination of indirect dependencies between variables in the latter.

Now suppose that, for some reason, the cone's proportions have to stay the same, and the height and radius are in a fixed ratio k:

${\displaystyle k={\frac {h}{r}}={\frac {\operatorname {d} h}{\operatorname {d} r}}}$

This gives the total derivative:

${\displaystyle {\frac {\operatorname {d} V}{\operatorname {d} r}}={\frac {2\pi rh}{3}}+k{\frac {\pi r^{2}}{3}}}$

Equations involving an unknown function's partial derivatives are called partial differential equations and are common in physics, engineering, and other sciences and applied disciplines.

## Notation

For the following examples, let f be a function in x, y and z.

First-order partial derivatives:

${\displaystyle {\frac {\partial f}{\partial x}}=f_{x}=\partial _{x}f.}$

Second-order partial derivatives:

${\displaystyle {\frac {\partial ^{2}f}{\partial x^{2}}}=f_{xx}=\partial _{xx}f.}$

Second-order mixed derivatives:

${\displaystyle {\frac {\partial ^{2}f}{\partial y\,\partial x}}=f_{xy}=\partial _{xy}f.}$

Higher-order partial and mixed derivatives:

${\displaystyle {\frac {\partial ^{i+j+k}f}{\partial x^{i}\,\partial y^{j}\,\partial z^{k}}}=f^{(i,j,k)}.}$

When dealing with functions of multiple variables, some of these variables may be related to each other, and it may be necessary to specify explicitly which variables are being held constant. In fields such as statistical mechanics, the partial derivative of f with respect to x, holding y and z constant, is often expressed as

${\displaystyle \left({\frac {\partial f}{\partial x}}\right)_{y,z}.}$

## Formal definition and properties

Like ordinary derivatives, the partial derivative is defined as a limit. Let U be an open subset of Rn and f : UR a function. We define the partial derivative of f at the point a = (a1, ..., an) ∈ U with respect to the i-th variable xi as

${\displaystyle {\frac {\partial }{\partial x_{i}}}f(\mathbf {a} )=\lim _{h\rightarrow 0}{f(a_{1},\dots ,a_{i-1},a_{i}+h,a_{i+1},\dots ,a_{n})-f(a_{1},\dots ,a_{n}) \over h}}$

Even if all partial derivatives ∂f/∂xi(a) exist at a given point a, the function need not be continuous there. However, if all partial derivatives exist in a neighborhood of a and are continuous there, then f is totally differentiable in that neighborhood and the total derivative is continuous. In this case, we say that f is a C1 function. We can use this fact to generalize for vector valued functions (f : UR'm) by carefully using a componentwise argument.

The partial derivative ${\displaystyle {\frac {\partial f}{\partial x}}}$ can be seen as another function defined on U and can again be partially differentiated. If all mixed second order partial derivatives are continuous at a point (or on a set), we call f a C2 function at that point (or on that set); in this case, the partial derivatives can be exchanged by Clairaut's theorem:

${\displaystyle {\frac {\partial ^{2}f}{\partial x_{i}\,\partial x_{j}}}={\frac {\partial ^{2}f}{\partial x_{j}\,\partial x_{i}}}.}$

## References

1. This can also be expressed as the adjointness between the product space and function space constructions.