Basics of Partial Differentiation: Learning Enhancement Team
Basics of Partial Differentiation: Learning Enhancement Team
Introduction
Partial differentiation is used to differentiate functions which have more than one
variable in them. It is more general than differentiating functions of one variable, which
is known as ordinary differentiation and is introduced in the study guide: What is
Differentiation? Partial differentiation can be used for finding maxima and minima in
optimisation and for describing more complicated processes in science in what are
known as partial differential equations (see the study guide: Basics of Differential
Equations).
The first functions you encounter are usually functions of one variable y f (x ) as
described in the study guide: Using Functions. For example the function y f ( x ) x 2
takes a value x as its input, squares it and outputs it. The graph of this function is given
by the x, y coordinates that satisfy the equation y x 2 and the gradient of this function
is dy / dx 2x which comes from differentiating x 2 using the power rule (see the study
guide: Differentiating using the Power Rule). In other words, the rate of change of y with
respect to x will be 2x. This sort of differentiation is called ordinary differentiation.
Functions can depend on more than one variable. A function with two variables can be
written as z f x, y and it has partial derivatives with respect to x or y.
Here you can see that partial derivatives are written with a “curly d” which looks like “ ”
and not with the Latin letter “d ” which is used to write a derivative in functions of one
variable. An alternative notation is the subscript notation where:
z f
zx and fy
x y
In this example z is a function of two variables x and y which are independent. Partial
differentiation should not be confused with implicit differentiation of the implicit
function x 2 y 2 16 0 , for example, where y is considered to be a function of x and
therefore not independent of x. See study guide: Implicit Differentiation for more on this.
Partial differentiation can be applied to functions of more than two variables but, for
simplicity, the rest of this study guide deals with functions of two variables, x and y.
z
6x
x
which is the same as the ordinary derivative since dz / dx 6x too. The function does
not depend on y and so it does not change as y changes and so:
z
0
y
z
is found by keeping y constant and differentiating as usual with respect to x.
x
z
is found by keeping x constant and differentiating as usual with respect to y.
y
To help with partial differentiation it is very useful to remember a rule from ordinary
differentiation which is discussed in the study guide: Differentiating using the Power Rule
If you are partially differentiating with respect to x, for example, then the variable y is
kept constant and so must be treated as a or b in the rules above. Also, since it is being
treated as a constant, functions of y such as y 2 , 8 y or sin y are also treated as
constants and so act as if they were the a or b in the rule above.
To find the partial derivative with respect to x you can split this into three parts:
z
And so 2x 6
x
To find the partial derivative with respect to y you can split this into three parts:
z
2xy 3 .
x
z
3x 2 y 2 .
y
Gradients
f(x,y) f(x,y)
x 5
As you have seen in the previous section a partial derivative is obtained by holding one
of the variables constant. If x is held constant, say x 5 for example (as shown in the
graph on the right), then the function is a quadratic function in y only:
z 52 6 5 y 2 4y 14 y 2 4y 9
So its graph is a 2D parabola. The graph on the right shows the cross-section of the
parabolic surface taken at x 5 . Where it intersects the surface is the 2D parabola.
The gradient of this parabola is given by z / y 2y 4 which was calculated in the
example from before. If y is held constant then the function would become a quadratic in
x with gradient z / x 2x 6 as calculated in the second example in this guide.
Higher derivatives
Just as with functions of one variable, functions of many variables can be differentiated
more than once to obtain second, third or higher partial derivatives such as:
2z 3z
or
x 2 y 3
For the function z f ( x, y ) , partially differentiating the first derivative again using the
partial differential operator gives second derivatives with respect to x and y:
z 2 z z 2 z
and
x x x 2 y y y 2
These are very similar to the ordinary differentiation case (see study guide: The
Differential Operator for an explanation of this.)
However, for multivariable functions, these are not the only kinds of second derivative.
For multivariable functions it is also possible to partially differentiate with respect to
different variables and these are called mixed derivatives. So the function z f ( x, y )
may be partially differentiated with respect x and then y or with respect to y and then x:
z 2 z z 2z
and
y x yx x y xy
Using the subscript notation, the four second order partial derivatives of z can be written
as: z xx , z yy , z xy and z yx .
Example: Find all the second order partial derivatives of the function z 5x 3 y 2 .
First find the first two partial derivatives, z / x and z / y and then partially
differentiate these with respect to x and y to find the second partial derivatives 2z / x 2 ,
2 z / yx , 2 z / xy and 2 z / y 2 . The diagram below shows how this is done.
Arrows going right are partial differentiation with respect to y and arrows going left are
partial differentiation with respect to x.
z 5x 3 y 2
z z
15 x 2 y 2 10 x 3 y
x y
You can see that the two mixed derivatives are equal. In fact, under certain conditions,
this will always be true. This is known as Schwarz’ or Young’s theorem which states that
it does not matter what order the partial differentiation is done.
There are many other resources to help you with your studies on our website.
For this topic, these include questions to practise, model solutions and a webcast.