Вы находитесь на странице: 1из 31

(April 26, 2014) Eduardo Martin-Martinez - Math 217

Block 3

Differential calculus of multivariable


functions

3.1 Multivariable functions


Part II: Differential calculus of multivariable functions 2
In this part of the course we will analyze scalar functions of multiple variables. These functions map vectors
in Rn to real numbers. In other words, they eat up vectors and split scalars. If we consider n variables xi as
If f (·) were a function of three variables, such that w = f (x, y, z), the domain of f (·) would be a subset of the three
inputs a multivariable real-valued function accepting these n arguments is notated as f (x1 , x2 , . . . , xn ) ∈ R.
dimensional space defined by the x-, y- and z-axes. Drawing such a function would be very difficult as it would
require four axes. case
As a particular We shall mainly beweconcerned
of interest, will beginwith functions
focusing onoffunctions
two variables,
of two although the techniques
variables f (x, y) ∈ we
R. shall
These
study are
functions applicable
take two realtoinputs
functions of any
x and number
y and giveofavariables.
real number as an output. The domain of such a function
is, in general, a subset of the XY plane and its range (or image) is a subset of the real line. A typical way to
represent these functions is by assigning x
a value of the z coordinate in a 3D
x f (x) z f (x,plot
y) to the valuez
of the function.
This is z = f (x, y). In this way, every point in the XY plane will be mapped to a point in three-space whose
y
z coordinate is given by the value of the function f (x, y), for example, in Figure 3.1 we see how a particular
point (x∗ , yFigure
∗ ) in the XY is mapped to the point (x∗ , y ∗ , z ∗ ) in R3 by the function f (x, y): z ∗ = f (x∗ , y ∗ ).
2: A function f (x) of one variable (left) and a function f (x, y) of multiple variables (right).
Here, z ∗ belongs to the range of f (x, y), and (z ∗ , y ∗ ) belongs to its domain:

z*=f(x*,y*) z=f(x,y)

(x*,y*) y

x
Domain of f(x,y)

Figure 3.1: The z coordinate is given by a function of two variables f (x, y). Since z ∗ = f (x∗ , y ∗ ), the point
Figure 3: The variable z is equal to a function f (x, y) of two variables, x and y.
(x∗ , y ∗ ) in the XY is mapped to the point (x∗ , y ∗ , z ∗ ) in R3

2 ∗y2 is shown in Figure 4. Note that the intersection


As an example of a multivariable function,
z∗ ∈ y)], of z =(xx∗ , −
a plot
Ran[f (x, y ) ∈ Dom[f (x, y)]
of this function with the planes of the form x =constant and y =constant yields a series of parabolic curves. For
example, thefunctions
Multivariable intersection of the function with the plane1y = 0 yields a parabolic curve in three dimensional
Eduardo space
Martı́n-Martı́nez
in the shape of z = x 2 .

z=4-y2
(x*,y*) y
(April 26, 2014) Eduardo Martin-Martinez - Math 217
x
Domain
Note that not all the surfaces in R3 are of f(x,y)
expressible as functions of two variables. What distinguishes a
surface formed by a function: z = f (x, y) from any other surface is that the mapping from (x, y) to z is unique.
An example of a surface which is not expressible as function of two variables is the sphere: x2 + y 2 + z 2 = 1,
obviously, each point in the XY plane maps onto two values of z.
Figure 3: The variable z is equal to a function f (x, y) of two variables, x and y.
Example 3.1.1. As an example of a surface generated by a multivariable function, let us take f (x, y) = x2 −y 2 .
This generates the surface z = x2 − y 2 . This surface is plotted in Figure 3.2. Note that the intersection of this
As an example
function with theofplanes
a multivariable
of the formfunction, a plot
x = const x 2 − yyields
of yz = const
and 2 is shown in Figure 4. Note that the intersection
a series of parabolic curves. For example,
theofintersection
this functionofwith
thethe planes of
function thethe
with formplane
x =constant and y =constant
y = 0 yields a parabolic yields a series
curve of parabolic
in three curves.
dimensional Forin
space
example, the intersection
the shape of z = x . 2 of the function with the plane y = 0 yields a parabolic curve in three dimensional space
in the shape of z = x 2 .

z=4-y2
4
z=4-y2
2 z=x2
z=-y2
z 0

-2 z=x2-4
z=x2-4
-4
2
0
1 2
-2 -1 0
-2
y x

2 y2 . f (x, y) = x2 − y 2
Figure
Figure 3.2: The surface 4: The function
generated (x,xy)−with
by z = zf=

3.2 Contour plots


Math 217 - Week 2 Fall 2012
As discussed above, in a function such as z = f (x, y) the points in the function’s domain in the XY -plane
are mapped onto the function’s range in the z-axis. We now fix a particular point in the functions range,
z = c ∈ Ran[f (x, y)], and we look for all the points in the XY -plane which are such that f (x, y) = c. The set
of all such points is called a level set of f (x, y).

In the particular case of functions of two variables, such a level set is made of curves, called a contour
lines. Clearly there is a different level set of the function (and hence a different curve in the XY -plane) for
every point c in the function’s range. For functions of three variables such as w = f (x, y, z), we no longer have
contour lines, but contour surfaces in three dimensional space, where f (x, y, z) = c, being c a constant.

Example 3.2.1. As an example, consider the function z = f (x, y) = x2 + y 2 , shown in Figure 3.3. In three-
dimensional space, this function forms a paraboloid, as shown in Figure 3.3 (left). Level sets of this function
are of the form x2 + y 2 = c. When projected onto the the XY -plane in a contour plot, shown in Figure 3.3

(right), each level set forms a circumference of radius c centred on the origin

Multivariable functions 2 Eduardo Martı́n-Martı́nez


function forms a bowl-shaped surface, as shown in Figure 5 (left). Level sets of this function are of the form
x2 + y2 = c. When√projected onto the the xy-plane in a contour plot, shown in Figure 5 (right), each level set forms
a circle of radius c, centered on the origin.
Note that as we move radially away from the origin of the26,
(April xy-plane,
2014)the circles gradually
Eduardo become closer together
Martin-Martinez - Math 217
for equally spaced values of z. What this signifies is that the sides of the bowl shown in Figure 5 (left) gradually
become steeper as the distance away from the origin of the xy-plane increases.

z=f(x,y)=x2+y2 y

z=4

z=3
z=2 x
z=1 z=4
z=3
y
x z=2
z=1

Figure 5: The function z = f (x, y) = x 2 + y2 and its contour plot showing the level surfaces of z = f (x, y), at
z = 1, 2, 3, 4.
Figure 3.3: Contour plots z = c (for various values of c) of the surface generated byz = f (x, y) with f (x, y) =
x2 + y 2
As another example, consider the plane z = x, shown in Figure 6 (left). Here, z increases as x increases. Further-
more, z is independent of y, and will therefore not increase if we change y, so long as x remains fixed. For this
reason,
Note that asthe
wecontour
move plot in Figure
radially away6 (right)
fromshows
the that the contour
origin of the lines in this function
XY -plane, are parallel
the circles to the y-axis.
gradually become closer
If we consider a particle moving on the plane illustrated in Figure 6 (left), then if the motion of the particle is in a
together for equally spaced values of z = c. Notice that what this tells us is that the sides of paraboloid
direction parallel to the y-axis, then the z coordinate of the particle will not change, and the particle will continue
become gradually
moving alongsteeper as contour
the same the distance away
line. If, on fromhand,
the other the the
origin of moves
particle the XY -plane
along increases.
the x axis, As a general
it will traverse the rule,
the smaller the distance between contour plots, the steeper the function will be. In other words,
level sets orthogonally, leading to a change in the value of z. Note that the steepness of the plane is constant. This if we are
moving along the surface,
is reflected the plot
in the contour more lines
by the factwe
thathave to cross
the contour lines in
are aequally
contour plot
spaced in the spaced
for equally direction
valuesofofincreasing
z. z,
the steeperThe
wefunction
are climbing.
and contourWe
plotwill comeinback
illustrated to7 this
Figure when
are those wefunction
of the talk about
z = x 2gradients later
− y2 . Note that on origin,
at the in the course.
Examplethe function
3.2.2 (The is locally
plane flat,
z =andx).this is reflected
, shown in the fact
in Figure 3.4that the contour
(left). Here, zlines are relatively
increases as x distant from each
increases. Furthermore,
other at that point. The steepness of the function increases along the two axis and, correspondingly, the contour
z is independent of y, thus as long as x remains
lines become closer together along the two axis.
constant, the value of z will not change. For this reason, the
contour plot in Figure 3.4 (right) shows that the contour lines in this function are parallel to the Y -axis. If
−(x2 +y2 )
we consider Theahill-shaped function z on
particle moving = ethe planeillustrated in Figure
illustrated in 8Figure
is relatively flat at the
3.4 (left), ‘footifofthe
then the hill’,
motionand this is particle
of the
illustrated
is in a direction in the fact
parallel to that
the atY points
-axis,that
thenare the
radially distant from of
z coordinate thethe
origin, the contour
particle will lines
not are far apart.
change, andThethe particle
contour lines are closest together at the sides of the hill, where the function is steepest. At the ‘top of the hill’, the
will continue moving along the same contour line. If, on the other hand, the particle moves along the x axis,
function is locally flat, which is reflected in the fact that at the origin, the contour lines are again widely spaced.
it will traverse the level of
Part II: Differential calculus sets orthogonally, functions
multivariable leading to a change in the value of z. Note that the steepness of the 4
As a further example, we consider
plane is constant. This is reflected in the contourthe three variable function
plot bywthe= f (x, = x2+
y, z)that
fact y2 +contour
the z2 . This function
lines are is difficult
equally spaced
to visualize, as it requires four axis, although some insight into its contour plot can be gained by analogy with the
for equallyexample
spacedofvalues of z. 2 2 2
Figure 5. The level sets of w = f (x, y, z) are the sets x + y + z = c, where c is fixed for each level

2
Math 217 - Week 2 Fall 2012
1.5
z=-0.5
z=-1.5

z=0.5

z=1.5

2
z=-1

z=0

z=1

1
1
0.5
z 0
y 0
-1
-0.5

-2 -1
2
2
-1.5
0
y 0
-2 -2 x -2
-2 0 2
x

Figure 6: The function z = x and its contour plot.


Figure 3.4: The function z = f (x, y) = x and its contour plots

2
4
Multivariable functions 3 1.5 Eduardo Martı́n-Martı́nez
2 1

0.5
1

z=-
z=-
z=
z=
z=
z=
z=
1
0.5
Part II: Differential calculusz of
0 multivariable functions y 0
4
-1
-0.5
(April 26, 2014) Eduardo Martin-Martinez - Math 217
-2 -1
2
2
-1.5
2
0
0
Example 3.2.3 (The saddle zy = x2-2−-2y 2 ). shownx in Figure-2 3.5. Note that at the origin, the function is locally
1.5

z=-0.5
z=-1.5
-2 0 2

z=0.5

z=1.5
2 x distant from each other at that point.
flat, and this is reflected in the fact that the contour lines1 are relatively

z=-1

z=0

z=1
1
The steepness of the function increases along the two 0.5
axis and, correspondingly, the contour lines become
closer along the two axes. z 0 Figure 6: The function z = x and its contour plot.
y 0
-1
-0.5

-2 -1
2 2
4 2
-1.5
0 1.5
y 0
-2 -2 x -2
-2 0 2
2 1 x
0.5
z 0
Figure 6: The function z = xyand0 its contour plot.
-2 -0.5

2
-1
4
-4
2 1.5
-1.5

2 0
2 1
-2
y -2 -2
0
x -2 0 2
0.5 x
z 0
y 0

-2
Figure 7: The function z = x 2 − -0.5
y2 and its contour plot.
Figure 3.5: The function z = f (x, y) = x2 − y 2 and its contour plots
-1
-4 2
2 2 2 -1.5
Example 3.2.4 (The Gaussian 0
z = ex +y ). shown in Figure1.53.6. This ‘hill-shaped’ function is asymptotitcally
flat at the ‘foot of the hill’,
y and
1
-2 this is illustrated
0 in2 the fact
-2
-2that at points
0 that are radially
2 distant from the
0.8
-2 x 1
x at the sides of the hill, where the
origin, the contour lines are far apart. The contour lines are closest together
0.5
function is steepest. At0.6the ‘top of the hill’, the function is locally flat, which is reflected in the fact that at
z 0.4 Figure 7: The function z = x 2 −yy2 and 0
its contour plot.
the origin, the contour lines are again widely spaced.
0.2 -0.5

0 -1
2
2 2
-1.5
0
0 1.5
1 y -2 -2 x -2
-2 0 2
1
0.8 x
0.6 0.5

z 0.4
Figure 8: The function z = e −(x2y+y20)
and its contour plot.
0.2 -0.5

0 -1
2
-1.5 √ 2

set. As such, the level sets of this0 function are spherical


0 surfaces-2 of radius c, centered on the origin, as shown in
y x -2 0
Figure 9. In this case, ‘steepness’ of -2the
√ function w = f (x, y, z) roughly corresponds
-2
to how2quickly w will increase
x
in response to an increase in distance c from the origin x = y = z = 0. As with the example of Figure 5, f (x, y, z)
becomes ‘steeper’ with radial distance from the origin. To see
2 this,
2 consider the two level sets of f (x, y, z):
Figure 8: The function z = e −(x +y ) and its contour plot.
2 2
2 ex +y and its contour plots
Figure 3.6: The function w1 = x2 f+(x,
z= y2 y)
+ z= = c1
2 2 2
w2 = x + y + z = c2 √
set. As
Assuch, the levelof
an example sets
a of thisset
level function
with aare spherical surfaces
three-variables of radius
function let us c,consider
centeredthe
on the origin,surfaces
contour as shown in
√of the
Figure
where 9.
c2 In
following this case,the
>function:
c1 . Let ‘steepness’ of the
radial distance functionthe
√between w =two
f (x,spheres
y, z) roughly corresponds
represented by theseto surfaces
how quicklybe !w will
, so increase
that c2 −
√ √ 2 . 0.
in response to an
c1 = ! . For increase
these two surfaces, w2 −c2wfrom
in distance = cthe
1 2 2 2 1−origin
c = 2 x!= y
c 1=+ z!= As with
Therefore the
w 2 example
− w 1 is of
an Figure
increasing 5, f (x, y,
functionz)
Example
becomes (w =radial
3.2.5 with
‘steeper’ f (x,distance
y, z) = xfrom+ ythe+origin.
z ). Visualizing
To see this, this
considerfunction
the may
two be sets
level tricky
of since
f (x, y, it
z):requires 4
of c1 , meaning that as we move away from the origin, f (x, y, z) increases at an increasing rate - that is, it becomes
spatial dimensions. However, some insight into its contour plot can be gained by analogy with the example of
‘steeper’.
Figure 3.3. The level sets of w = f (x, y, z) ware the2 sets2 x2 +
1 = x + y + z = c1
2 y 2 + z 2 = c, where c is fixed for each level surface.

Multivariable functions
w2 = x2 + y24+ z2 = c2
Eduardo Martı́n-Martı́nez
Math 217 - Week 2 Fall 2012

where
√ c2 > c1 . Let the radial distance between the two spheres represented by these surfaces be ! , so that c2 −

c1 = ! . For these two surfaces, w2 − w1 = c2 − c1 = 2! c1 + ! 2 . Therefore w 2 − w1 is an increasing function
(April 26, 2014) Eduardo Martin-Martinez - Math 217


As such, the level sets of this function are spherical surfaces of radius c centred on the origin, as shown
in Figure 3.7. In this case, the ‘steepness’ of the function w = f (x, y, z) roughly corresponds to how quickly

w will increase in response to an increase in distance c from the origin x = y = z = 0. As with the example
of Figure 3.3, f (x, y, z) becomes steeper with radial distance from the origin. To see this we look at the value
of f (x, y, z) as we increase the radius of the contour surfaces. As shown in figure 3.7, we move away from the
origin
Part II:the function calculus
Differential grows atofanmultivariable
increasing rate, becoming steeper. Indeed this function defines a 4-dimensional
functions 5
hyperparaboloid.

z z z z

w=16
w=9
w=4
w=1

x y x y x y x y

Sphere radius = 1 Sphere radius = 2 Sphere radius = 3 Sphere radius = 4

Figure 9: Level sets of the function w = x 2 + y2 + z2 .


Part II: Differential calculus of multivariable functions 5

z z
z
Figure 3.7:z Level sets of the function w = f (x, y, z) = x2 + y 2 + z 2
w=16
w=9
2 Partial derivatives w=1
w=4

x y x y x y x y

3.3 Partial
We have derivatives
used contour plots to show how functions of multiple variables vary across their domains.
Sphere radius = 1 Sphere radius = 2 Sphere radius = 3 Figure 10
Sphere radius = 4

shows the contour lines of a function f (x, y). At


Figure 9: Levelthe point
sets of (x ∗ , y∗ ),
the function w = x 2 + y2 +thez2 . function will increase in the positive x
direction and decrease in the positive y direction.
A function’s contour plots show us how functions of multiple variables Clearly therefore, any notionvary of slope across of atheir
multivariable
domains.function
Figure 3.8
will in general be a function2 of direction.
Partial derivatives ∗ ∗
shows the contour lines of a function f (x, y). At the point (x , y ), the function will increase in the positive
x direction and decrease in theusedpositive
We have contour plots toyshow
direction.
how functions ofClearly therefore,
multiple variables vary across theirany notion
domains. Figure 10 of slope of a multivariable

function will in general bedirection


a function y
shows the contour lines of a function f (x, y). At the point (x ∗ , y∗ ), the function will increase in the positive x
of direction.
f(x,y)=1
and decrease in the positive y direction. Clearly therefore, any notion of slope of a multivariable function
will in general be a function of direction.

y f(x,y)=1

f(x,y)=2 f(x,y)=2
f(x,y)=3

"y f(x,y)=4 f(x,y)=3

"y(x*,y*) "x f(x,y)=4

x
(x*,y*) "x
Figure 10: The rate of change in f (x, y) at (x ∗ , y∗ ) is dependent on direction: "x leads to an increase in f (x, y),
whilst "y leads to a decrease.

Figure 3.8: The rate of change of f (x, y) in this plot is dependent on the direction.
This gives rise to a notion of steepness of such functions. This notion is strongly related to the concept of the
derivative of a single variable function that you will already be familiar with. In this section, we shall define this
idea in a more formal way.

Unlike single variable As


has functions
the graphical interpretation of being theof
df
multiple
slope

illustrated in Figure 11, the derivative dx (also denoted f (x)) of a single variable function f (x) at any point x
functions, of the f (x) at x. variables have a multi-dimensional domain. For a
x
Multivariable functions 5 Eduardo Martı́n-Martı́nez
Figure 10: The rate of change in f (x, y) at (x ∗ , y∗ ) is dependent on direction: "x leads to an increase in f (x, y),
Math 217 - Week 2 Fall 2012
whilst "y leads to a decrease.
(April 26, 2014) Eduardo Martin-Martinez - Math 217

function of two variables f (x, y), we can therefore conceive of the change in f (x, y) in response to an increment
in x in the positive x direction and, separately, in response to an increment in y in the positive y direction (or
any other direction, for that matters). Focusing only on the rate of change of the function along the direction
defined by the X and Y axes, for f (x, y), this leads to the definition of two partial derivatives, one in the
direction of x, one in the direction of y.
Let us give a definition of partial derivative.
Definition (Partial Derivative). The partial derivative of the real function f (x1 , x2 , . . . , xn ) with respect to
the variable xi is defined as the limit
∂f f (x1 , . . . , xi + ∆xi , . . . , xn ) − f (x1 , . . . , xi , . . . , xn )
∂xi f ≡ fxi ≡ = lim
∂xi ∆xi →0 ∆xi

We say that a function f (x1 , . . . , xn ) is differentiable at a point (x∗1 , . . . , x∗n ) if all the partial derivatives
with respect to all the variables xi exist. One has to be careful when taking multidimensional limits: for
a limit to exist at a given point, all the limits approaching the point with any trajectory have to coincide
(generalization of the concept of lateral derivatives).
For example, for a two-variable function f (x, y), the partial derivative with respect to x will be
∂f f (x + ∆x, y) − f (x, y)
∂x f ≡ fx ≡ = lim (3.3.1)
∂x ∆x→0 ∆x
and the partial derivative with respect to y will be
∂f f (x, y + ∆y) − f (x, y)
∂y f ≡ fy ≡ = lim (3.3.2)
∂y ∆y→0 ∆y
These two derivatives have the following interpretation

• The partial derivative with respect to x of f (x, y) at a point (x0 , y0 ) (this is, fx (x0 , y0 )) is the slope of
the function f (x, y) at that point in the direction of increasing x, keeping y constant.

• The partial derivative with respect to y of f (x, y) at a point (x0 , y0 ) (this is, fy (x0 , y0 )) is the slope of
the function f (x, y) at that point in the direction of increasing y, keeping x constant.

This is illustrated in Figure 3.9


Example 3.3.1. Find the partial derivatives of the function
p
f (x, y) = x2 + y 3

with respect to x and y. Evaluate them at the point (1, 1). What happens at the point (0, 0)?
To find the partial derivative with respect to x we differentiate with respect to x considering y constant:
∂ x
f (x, y) = p
∂x x2 + y 3
To find the partial derivative with respect to y we differentiate with respect to y considering x constant:

∂ 3y 2
f (x, y) = p
∂y 2 x2 + y 3

Multivariable functions 6 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217
Part II: Differential calculus of multivariable functions 7

z z

#f (x0,y0,z0)
#x #f
(x0,y0,z0) #y
z=f(x,y) z=f(x,y)

y=y0 y=y0

y y
(x0,y0) (x0,y0)
x x

Figure 12: The partial derivatives of a function f (x, y) at a point (x 0 , y0 ).

Figure 3.9: The slope of a function f (x, y) in the direction of x (left) and y (right).
#f
To find #y , consider x to be a constant, and differentiate with respect to y.

At the point (1, 1) these derivatives take the values


#f 1 1
= (x2 + y3 )− 2 (3y2 )
#y 2
1 3
f2 +y(1,
Example 2. For f (x, y, z) = e−(x x
2 +z21) =
) , find √ at, (x, y, z)f=y (1,
#f
(0,
1)1).= √
0,
2
#z 2 2
#f
To find , consider x and y to be constants, and differentiate with respect to z.
At (0, 0) it is easy# z to see that the derivatives do not exist. We can see that by evaluating the limits (3.3.1),
(3.3.2) the limit of the partial derivatives when (x, # f y) → −(x
(0,2+y
0)2 +zvaries
2) depending on what direction we approach
= −2ze
the point (similar to the absolute value function). # z
#f
At (0, 0, 1), = −2. 2 +y 2 +z 2 +t2 )
z
Example 3.3.2. For f#(x, y, ez, t) find ∂t f (x, y, z, t) = e−(x at (0, 0, 0, 1).
First we compute the partial
2.1 Higher derivative
order partial with respect to t considering all the other variables constant:
derivatives

Note that a partial derivative of a∂function


f (x, y,ofz,x and
t) =y is, −(x2 +y
in general,
−2te
2 +z 2 +t2 )
itself a function of x and y as well, as shown
∂t
in the examples above. We can therefore take further partial derivatives of partial derivatives. For example, for the
function f (x, y) = sin(2x + y) the first partial derivatives are
now, evaluating them at x = y = z = 0, t = 1 we get
#f #f
#x = 2 cos(2x + y) #y = cos(2x + y)
2
The second partial derivatives are ft (0, 0, 0, 1) = −
e
! "
# #f #2 f
#x ! #x " = # x2
= fxx = −4 sin(2x + y)
Higher order partial derivatives # #f #2 f
#y ! #x " = # y# x = f yx = −2 sin(2x + y)
# #f #2 f
#x ! #y " = # x# y = f xy = −2 sin(2x + y)
We introduce the following notation for higher order # #2 f
# f partial derivatives, let us consider a function of two
= fyy = − sin(2x + y)
#y #y =
# y2
variables f (x, y). We notate its second derivatives as

In the above example, it is no coincidence,  fact, it2is always the case, that
and, in
∂ ∂ ∂ f (x, y)
f (x, y) #≡2 f # 2 2f ≡ fxx (x, y)
∂x ∂x = ∂x
 # x# y 2 # y# x
∂ ∂ ∂ f (x, y)
f (x, y) ≡ ≡ fyy (x, y)
∂y ∂y ∂y 2
 
∂ ∂ ∂ 2 f (x, y)
Math 217 - Week 2 f (x, y) ≡ ≡ fyx (x, y) Fall 2012
∂x ∂y ∂x∂y
 
∂ ∂ ∂ 2 f (x, y)
f (x, y) ≡ ≡ fxy (x, y)
∂y ∂x ∂y∂x

Multivariable functions 7 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

The mixed second partial derivatives coincide (∂x and ∂y commute) only if the function f (x, y) is differentiable
and if its second derivatives are continuous (Schwartz Theorem). That is a condition always satisfied by smooth
functions.

Example 3.3.3. Compute all the second partial derivatives of the function

f (x, y) = sin(2x + y)

Obviously the first derivatives are

fx = 2 cos(2x + y), fy = cos(2x + y)

therefore


fxx (x, y) = 2 cos(2x + y) = −4 sin(2x + y)
∂x

fyy (x, y) = cos(2x + y) = − sin(2x + y)
∂y

fyx (x, y) = cos(2x + y) = −2 sin(2x + y)
∂x

fxy (x, y) = 2 cos(2x + y) = −2 sin(2x + y)
∂y

We can see that the second order mixed partials coincide since the derivatives of f (x, y) are continuous.

3.4 Differential of multivariable functions

In a single variable function f (x) a differential variation in x, dx provokes a differential variation in f (x), df :

df
df = dx
dx

which tells us that a small variation of f would be equal to a small variation of x multiplied by the slope of
the tangent to f

In a similar fashion, we can consider the differential variation of a multivariable function f (x, y) under
differential variations dx and dy.
∂f ∂f
df = dx + dy
∂x ∂y
which tells us that a small variation of f would be equal to the small variation of x multiplied by the slope of
the tangent to f in the direction of x plus the small variation of y multiplied by the slope of the tangent to
f in the direction of y. In general for functions of n variables f (x1 , . . . , xn ) we get that the differential of the
function is
X n
∂f
df = dxi
∂xi
i

Multivariable functions 8 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

3.5 The chain rule for multivariable functions

3.5.1 Total derivatives vs. partial derivatives

Let us consider a function of four variables T (x, y, z, t), for example one can think of the temperature measured
by a thermometer placed a a position (x, y, z). The function will depend on time explicitly (the temperature is
time dependent) but it can also be the case that x, y and z are not independent variables, and they themselves
depend on time (for example, the thermometer is also moving through the room and thus varying its position
with time). This means that the variables x, y, z are not independent and instead they are themes;ves functions
of time x(t), y(t), z(t).
We notate the partial derivative of the function f (x, y, z, t) with respect to time to the rate of variation of
f (x, y, z, t) due only to the explicit time dependence

∂f
∂t

However, this does not account for all the variation of the function f (x, y, z, t) with time. The reason is
that x, y, z are functions of time, as said above. The variation of x(t), y(t), z(t) will indeed contribute to the
overall variation of f (x, y, z, t). We call this the total derivative of f with respect to time.

df ∂f
6=
dt ∂t

In general, the total derivative and the partial derivative of a function f with respect to an independent
variable t will only coincide if f does not depend on any other variables which are in themselves dependent
on t.

3.5.2 Relating partial and total derivatives

Consider the function above f (x, y, z, t). We would like to compute the total derivative of f with respect to
t. We know that the differential df is equal to
∂f ∂f ∂f ∂f
df = dx + dy + dz + dt (3.5.1)
∂x ∂y ∂z ∂t

Now, for the dependent variables, since x = x(t), y = y(t), z = z(t), we can write the respective differentials
as
∂x ∂y ∂z
dx = dt, dy = dt, dz = dt
∂t ∂t ∂t
We can ‘substitute’ these differential in (3.5.1), yielding

∂f ∂x ∂f ∂y ∂f ∂z ∂f
df = dt + dt + dt + dt
∂x ∂t ∂y ∂t ∂z ∂t ∂t

now, ‘dividing’ over dt (differentiation) we obtain the total derivative with respect to t:

df ∂f ∂x ∂f ∂y ∂f ∂z ∂f
= + + +
dt ∂x ∂t ∂y ∂t ∂z ∂t ∂t

Multivariable functions 9 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

Let us draw the distinction between ∂f df


∂t and dt . For that let us think of a physical magnitude (like
temperature) being measured by a thermometer. ∂f ∂t is the variation of f keeping x, y and z constant. It can
be interpreted as a local variation of the temperature of f with time, whereas the latter is the rate of change
of f due to the combined effect of the local changes at each point in addition to the fact that the position of
the thermometer changes with time (if the thermometer is moving) and therefore the registered temperature
will also change with the position of the thermometer.

Example 3.5.1. Let the function


t
f (x, y, t) = x2 +
y
represent the value of a physical magnitude at a point (x, y) at a given time t.
Find, using the chain rule, the total derivative of the function measured by a point like detector, taking
into account that the detector is moving in a circular trajectory parametrized by

x(t) = sin(t), y(t) = cos(t)

We know that
df ∂f ∂x ∂f ∂y ∂f
= + +
dt ∂x ∂t ∂y ∂t ∂t
Let us compute all the ingredients necessary to calculate the total derivative of f :
∂f 1 ∂f ∂f −t
= , = 2x, = 2
∂t y ∂x ∂y y
∂x ∂y
= cos(t), = − sin(t)
∂t ∂t
Substituting in the total derivative of f we get
df t 1
= 2x cos(t) + 2 sin(t) +
dt y y
we can make the answer much more elegant if we can actually rewrite this function as a function of the
coordinates x, y exclusively or as a function of t exclusively:
df 1 + t tan t
= sin(2t) +
dt cos(t)

or alternatively
df x arcsin(x) 1
= 2xy + +
dt y2 y

3.5.3 The chain rule

We saw already a multivariable version of the chain rule. Intuitively, this expression is telling us that the
variation of f due to a variation in t is due to the explicit variation of t plus the implicit variation of the
dependent variables x, y, z due to their dependence on t. Let us now consider now a function that depends on
two dependent variables f (x, y) and these two variables depend themselves on a different set of variables u, v
such that x = x(u, v), y = y(u, v). This could be the result of a change of variables, for instance). We might
want to compute the partial derivatives of f with respect to u and v.

Multivariable functions 10 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

Again, it is convenient to start from the differential of the function f . We can alternatively write it in
these two forms
∂f ∂f ∂f ∂f
df = dx + dy = du + dv (3.5.2)
∂x ∂y ∂v ∂v

We can also write the differentials of x(u, v) and y(u, v) as functions of u and v:
∂x ∂x ∂y ∂y
dx = du + dv, dy = du + dv
∂u ∂v ∂u ∂v
substituting this in the differential of f (eq. (3.5.2)) we get that
   
∂f ∂x ∂x ∂f ∂y ∂y ∂f ∂f
df = du + dv + du + dv = du + dv
∂x ∂u ∂v ∂y ∂u ∂v ∂v ∂v
equating all the terms that multiply du and dv on the right-hand side and the left-hand side we get
∂f ∂f ∂x ∂f ∂y
= +
∂u ∂x ∂u ∂y ∂u
∂f ∂f ∂x ∂f ∂y
= +
∂v ∂x ∂v ∂y ∂v
which is the chain rule for multivariable (two-variable) functions.
We can trivially extend that to n variables: Consider a function f = f (x1 , . . . , xn ) and xi = xi (u1 , . . . un ),
i = 1, . . . n. The partial derivative of f with respect to the variable ui will be
n
X ∂f ∂xj
∂f
=
∂ui ∂xj ∂ui
j=1

Example 3.5.2 (Equation of state). Let us consider the density of a non-uniform distribution of gas (think
of the atmosphere, for instance. We can write it as a function of pressure and temperature (that relationship
is known as equation of state): ρ = ρ(P, T ). Since the gas is not uniformly distributed in space, pressure and
temperature will be position dependent:

P = (x, y, z), T (x, y, x)

Obtain the partial derivatives of ρ with respect to x, y and z.


using what we learned above we can readily write:
∂ρ ∂ρ ∂P ∂ρ ∂T
= +
∂x ∂P ∂x ∂T ∂x
∂ρ ∂ρ ∂P ∂ρ ∂T
= +
∂y ∂P ∂y ∂T ∂y
∂ρ ∂ρ ∂P ∂ρ ∂T
= +
∂z ∂P ∂z ∂T ∂z

3.6 The chain rule for higher order derivatives and nested dependences

One has to be careful when taking implicit second order derivatives using the chain rule. The reason can be
better understood after making the following observations. Consider the example of ρ(P, T ) shown above:

Multivariable functions 11 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

∂ρ ∂ρ
• ∂P and ∂T will be, in general explicit functions of P and T

• ∂P
∂x and ∂P
∂x will be in general explicit functions of x, y, z

∂ρ
This means, that, in general ∂x will be an explicit function of all the dependent and independent variables
∂2ρ
P, T, x, y, z. Now if we want to compute the second partial derivative of ρ with respect to x ∂x 2 one has to be
careful with the implicit dependences. To simplify notation let us notate the first derivative of ρ with respect
to x in a way that explicitly shows the dependence on all the variables:

∂ρ
= D(P, T, x, y, z)
∂x
given that the dependent variables P, T are also functions of x, y, z:

D(P, T, x, y, z) = D P (x, y, z), T (x, y, z), x, y, z

we need to make the following important distinction between

• Regarding D as a function of all the variables, dependent and independent P, T, x, y, z and computing
the partial derivative with respect to x with P, T, y, z held constant. This is denoted as
 
∂D
∂x P,T,y,z

• Regarding D as a function of only the independent variables x, y, z and computing the partial derivative
with respect to x with y, z held constant. This is denoted as
 
∂D
∂x y,z

Only the second one would be the second derivative of ρ with respect to x, since that has to account for the
whole dependence on x of ρ:
 
∂2ρ ∂D
=
∂x2 ∂x y,z

With this in mind, let us now find the second derivative of ρ using the differential approach as usual: the
differential of D would be
     
∂D ∂D ∂D ∂D ∂D
dD = dP + dT + dx + dy + dz (3.6.1)
∂P ∂T ∂x P,T,y,z ∂y P,T,x,z ∂z P,T,x,y

we also know that


∂P ∂P ∂P
dP = dx + dy + dz
∂x ∂y ∂z

∂T ∂T ∂T
dT = dx + dy + dz
∂x ∂y ∂z

Multivariable functions 12 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

Substituting this in (3.6.1) and regrouping everything that multiplies the differentials of x, y, z we get
  !   !
∂D ∂P ∂D ∂T ∂D ∂D ∂P ∂D ∂T ∂D
dD = + + dx + + + dy
∂P ∂x ∂T ∂x ∂x P,T,y,z ∂P ∂y ∂T ∂Y ∂Y P,T,y,x
|  {z } |  {z }
∂D ∂D
∂x y,z ∂y x,z
  !
∂D ∂P ∂D ∂T ∂D
+ + + dz
∂P ∂x ∂T ∂z ∂z P,T,y,z
|  {z }
∂D
∂z x,y

Therefore    
∂2ρ ∂D ∂D ∂P ∂D ∂T ∂D
= = + +
∂x2 ∂x y,z ∂P ∂x ∂T ∂x ∂x P,T,y,z

Or explicitly in terms of ρ
 2          2 
∂ ρ ∂ 2 ρ ∂P 2 ∂ 2 ρ ∂T 2 ∂ 2 ρ ∂T ∂P ∂ ∂ρ ∂P ∂ρ ∂T ∂ ρ
2
= 2 + 2
+2 + + +
∂x y,z ∂P ∂x ∂T ∂x ∂P ∂T ∂x ∂x ∂x ∂P ∂x ∂T ∂x P,T,y,z ∂x2 P,T,y,z

Notice that this result is correct only in the case that ρ does not explicitly depend on x, y or z, (as it is
the case here, since we come from the equation of state defined in example (3.5.2)). If ρ depends explicitly on
x and y there would be extra dependencies on other partial derivatives with respect to x. If that is the case
the safest option would be reserve this second derivative and take successive order-1 partial derivatives with
respect to x. Let us see this with another example:

Example 3.6.1. Consider the following equation of state

ρ = ρ(x, y, P, T )

(density explicitly depending on x and y). Compute first the general, the form of
 2 
∂ ρ
∂x2 y

for arbitrary ρ(x, y, P, T ), P (x, y) and T (x, y) and then particularize for
1
ρ(x, y, P, T ) = P x2 − xT 2 − y, T (x) = , P (x, y) = x + sin(y).
x

First we compute the first partial derivative


   
∂ρ ∂ρ ∂P ∂ρ ∂T ∂ρ
D≡ = + + (3.6.2)
∂x y ∂P ∂x ∂T ∂x ∂x P,T,y

and then we compute the second partial derivative


 2     
∂ ρ ∂D ∂D ∂P ∂D ∂T ∂D
= = + +
∂x2 y ∂x y ∂P ∂x ∂T ∂x ∂x P,T,y

Multivariable functions 13 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

Substituting D in (3.6.2), we get that the most general expression for this derivative will be
       
∂ρ ∂P ∂ρ ∂T ∂ρ ∂ρ ∂P ∂ρ ∂T ∂ρ
 2  ∂ ∂P ∂x + ∂T ∂x + ∂x ∂ ∂P ∂x + ∂T ∂x + ∂x
∂ ρ P,T,y ∂P P,T,y ∂T
= + (3.6.3)
∂x2 y ∂P ∂x ∂T ∂x
     
∂ρ ∂P ∂ρ ∂T ∂ρ
 ∂ ∂P ∂x + ∂T ∂x + ∂x P,T,y 
+ 

 (3.6.4)
∂x
P,T,y

which we can simplify as


 2          2 
∂ ρ ∂ 2 ρ ∂P 2 ∂ 2 ρ ∂T 2 ∂ 2 ρ ∂T ∂P ∂ ∂ρ ∂P ∂ρ ∂T ∂ ρ
2
= 2 + 2
+2 + + +
∂x y ∂P ∂x ∂T ∂x ∂P ∂T ∂x ∂x ∂x ∂P ∂x ∂T ∂x P,T,y ∂x2 P,T,y
"   # "   #
∂ ∂ρ ∂P ∂ ∂ρ ∂T
+ + (3.6.5)
∂P ∂x P,T,y ∂x ∂T ∂x P,T,y ∂x

where as usual, if no variables are specified in the parenthesis after a partial derivative, it is assumed that
every other variable remains constant. Notice that we assumed that the mixed-partial derivatives commute
(i.e. ρ is smooth enough).
Now let us particularize to our example:
∂ρ ∂ρ ∂ρ
ρ(x, y, P, T ) = P x2 − xT 2 − y ⇒ = −2xT, = x2 , = 2xP − T 2
∂T ∂P ∂x
which in turns means that
     
∂2ρ ∂2ρ ∂2ρ ∂2ρ ∂ ∂ρ ∂ ∂ρ
= = 0, = −2x, = 2P, = 2x, = −2T
∂P 2 ∂P ∂T ∂T 2 ∂x2 P,T,y ∂P ∂x P,T,y ∂T ∂x P,T,y

and additionally,
∂P 1 ∂T 1
P (x, y) = x + sin(y) ⇒ = 1, T (x, y) = ⇒ =− 2
∂x x ∂x x

Substituting in (3.6.5) we get


 2    
∂ ρ 1 ∂ 2 2T 2T −2 2T 2T
= −2x 4 + x + + 2P + 2x + 2 = 3 + 2x − 2 + 2P + 2x + 2
∂x2 y x ∂x x P,T,y x x x x

which simplifies to  
∂2ρ −2
= + 4x + 2P
∂x2 y x3
substituting P we get  
∂2ρ 2
= 6x + 2 sin(y) −
∂x2 y x3

We can check this is correct computing the derivative by direct substitution


1
ρ(x, y, P, T ) = P x2 − xT 2 − y = x3 + x2 sin(y) − −y
x

Multivariable functions 14 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

the second partial derivative with respect to x of this is just


 2   
∂ ρ ∂ 2 1 2
2
= 3x + 2x sin(y) + 2 = 6x + 2 sin(y) − 3
∂x y ∂x x x

The second derivative is just an example of nested variable dependence.


Let us illustrate another case of nested dependence with the following example

Example 3.6.2. Consider the functions

u(w, t) = w + t3 , w(x, t) = x + t2

suppose that we want to obtain ∂t u(t). One way to do it is to directly substitute w(t) in the expression above,
yielding
u(w, t) = x + t2 + t3
therefore, trivially
∂u
= 2t + 3t2
∂x
However, we can calculate the same thin using the chain rule, keeping in mind that these are nested functions:
=1 =2t =3t2
z }| { z}|{ z }| {

∂u ∂u dw ∂u
= + = 2t + 3t2
∂t ∂w t dt ∂t w

Let us see a slightly more involved case.

Example 3.6.3. Consider the same functions as above

u(w, t) = w + t3 , w(x, t) = x + t2

only that now


x(t) = 2t
is also a dependent variable. Obtain ∂t u(t). One way to do it is to directly substitute w(t), x(t) in the
expression above, yielding
u(w, t) = 2t + t2 + t3
therefore, trivially
∂u
= 2 + 2t + 3t2
∂x
However, we can calculate the same thing using the chain rule, keeping in mind that these are nested functions:
 
=1 =2t =1 =2 =3t2
z }| { 
z }|  { z }| { z}|{ z }| {
du ∂u   ∂w ∂w dx  ∂u
=  + + = 2 + 2t + 3t2
dt ∂w t  ∂t x ∂x t dt  ∂t w

On general grounds, we can always proceed following the systematic method illustrated in the example
below:

Multivariable functions 15 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

Example 3.6.4. Consider a function f (x, y, t) = 3x + y 2 + t3 and the following nested dependences:

x(y, t, s) = y 2 + t3 − s
y(t, s) = t − s
s(t) = t2

df
We want to compute .
dt
To simplify notation, if not indicated, it is assumed that in a partial derivative, all the other variables are
kept constant.

1. Looking at f (x, y, t), at first level, f can vary through a change of t, a change of x, and a change of y,
so there are going to be three big terms, one per dependence:

   
df ∂f ∂f ∂f
= + +
dt ∂x ∂y ∂t
notice that the partial with respect to t does not multiply anything else because t is the independent
variable with respect of which we are deriving

2. At second level, x can vary because y varies, because s varies and because t varies. Similarly, y can vary
because s varies or because t varies:
         
df ∂f ∂x ∂x ∂x ∂f ∂y ∂y ∂f
= + + + + +
dt ∂x ∂y ∂s ∂t ∂y ∂s ∂t ∂t

3. At third level, y can again vary because either s varies or t varies, whereas s can vary because t varies,
so        
df ∂f ∂x ∂y ∂y ∂x ds ∂x ∂f ∂y ds ∂y ∂f
= + + + + + +
dt ∂x ∂y ∂s ∂t ∂s dt ∂t ∂y ∂s dt ∂t ∂t

4. at fourth and final level, we have to take into account that s varies due to variations of t:
     
df ∂f ∂x ∂y ds ∂y ∂x ds ∂x ∂f ∂y ds ∂y ∂f
= + + + + + + (3.6.6)
dt ∂x ∂y ∂s dt ∂t ∂s dt ∂t ∂y ∂s dt ∂t ∂t

So we found the expression for the total derivative of f with respect to t. Now, we can compute this
derivative in two different ways

1. Substitution: f (x, y, t) can be written just as a function of t by substituting x, y and s:

f (t) = 3[y 2 + t3 − s] + y 2 + t3 = 3[(t − s)2 + t3 − s] + (t − s)2 + t3 = t2 − 4t3 + 4t4

then trivially
df
= 16t3 − 12t2 + 2t
dt

Multivariable functions 16 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

2. evaluating the chain rule expression (3.6.6):

3 2y −1 2t 1 −1 2t 3t2 2y −1 2t 1 3t2
z}|{  z}|{  z}|{ z}|{ z}|{  z}|{ z}|{ z}|{  z}|{  z}|{ z}|{ z}|{  z}|{
df ∂f ∂x ∂y ds ∂y ∂x ds ∂x ∂f ∂y ds ∂y ∂f
= + + + + + +
dt ∂x ∂y ∂s dt ∂t ∂s dt ∂t ∂y ∂s dt ∂t ∂t

multiplying:
df
= 3(2y(−2t + 1) − 2t + 3t2 ) + 2y(−2t + 1) + 3t2
dt
Since y = (t − t2 ):

df
= 3(2(t − t2 )(−2t + 1) − 2t + 3t2 ) + 2(t − t2 )(−2t + 1) + 3t2 = 16t3 − 12t2 + 2t
dt
which coincides with the previous result

3.7 Gradients

We remember from our single variable calculus courses that the concept of derivatives. In multivariable
calculus, the steepness of a function depends on the direction we move in its graph.
In one dimensional functions, the derivative was linked to the slope of the tangent straight line at the point
where the derivative was taken. Similarly to the usual derivative, the gradient represents the slope of and the
tangent of the graph of the function. More precisely, the gradient points in the direction of the greatest rate
of increase of the function and its magnitude is the slope of the graph in that direction (we will prove this
statement in the next section). This implies that a vector can be used to quantify the direction and magnitude
of the maximum rate of change of a multivariable function at each point in its domain.
To formally write the gradient vector, let us first introduce the Nabla operator
 ∂ 
∂x1
 
∇ =  ... 

∂xn

which in R3 would be  

 ∂x 
 
 ∂ 
∇=



 ∂y 
 ∂ 
∂z
A priory, and within the math we have seen so far, this operator does not have a meaning unless it is acting
on some object. In particular it can act on scalar multivariable scalar functions f (x, y, z). Acting on them,
the nabla operator will yield a vector whose components will be the partial derivatives of the function with
respect to x, y, z.
∂f ∂f ∂f
∇f (x, y, z) = i+ j+ k
∂x ∂y ∂z

Multivariable functions 17 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

In general, in Rn :
 ∂f 
∂x1
 
∇f (x1 , . . . , xn ) =  ... 
∂f
∂xn

Let us first think of functions of two variables f (x, y). The gradient ∇f (x, y) will always point in the
direction of maximum increase of slope, and therefore it will be vectors orthogonal to the level curves. Let us
see it with an example
Example 3.7.1.PartGiven the function
II: Differential calculus of multivariable x2 + y 2 (positive paraboloid plotted in example
f (x, y) =functions 15 3.2.1)

1. Calculate the gradient of f (x, y)


Example 3. Given the function f (x, y) = x 2 + y2 ,
√ √
2. Evaluate the gradient at the points (1, 0), ( 2, 2) and (0, 3).
1 Sketch the level curves of the function f (x, y) = 1, f (x, y) = 4 and f (x, y) = 9.
√ √
3. Sketch the2 level curves
Calculate of the
the gradient of function
f (x, y) at thefpoints
(x, y)(1,=
0), 1, f (x,
( 2, 2) y)
and=
(0,43)and f (x,
and plot y) =representing
arrows 9 the
directions of the gradient at each of these points.√ √
4. Draw the gradient vector at the points (1, 0), ( 2, 2) and (0, 3)
See Figure 16. Note that & f (x, y) is a vector perpendicular to the level curves of f (x, y).

y
f(x,y)=9
f(x,y)=4 &f=6j
f(x,y)=1 (0,3)

&f=2'2(i+j)
('2,'2)

(0,1)
x
&f=2i

Figure 16: Level curves and gradients of the function f (x, y) = x 2 + y2 .

Figure
Example 4. 3.10:
Find theLevel curves
tangent vector T toand gradient
the curve of the
C at the point (1, 0,paraboloid
0), formed by thefintersection x2 + ythe
(x, y) = between 2
2 2 2
surfaces x + y + z = 1 and z = 0.

1. The gradient vector


The sphere x2 +isy2 + z2 = 1 is a level surface of the function w = x 2 + y2 + z2 − 1, when
 w =0, whilst the plane
z = 0 is the level surface of the function v = z, ∂f ∂fgradients of each of these functions
at v = 0. The 2x are normal to their
∇f (x,
level surfaces in three-dimensional y) =
space: i+ j = 2x i + 2y j ≡
∂x ∂y 2y
&w = 2xi + 2yj + 2zk is normal to the surface x 2 + y2 + z2 = 1
2. Therefore, at the requested&vpoints
=k is normal to the surface z = 0
√ √  √
The curve C, lies on both of the level surfaces, and therefore the the vectors &w and &v are both normal to the
∇f (1, 0) = 2i, ∇f 2, 2 = 2 2(i + j), ∇f (0, 3) = 6j
curve C. The tangent vector T to the curve C is tangent to both level surfaces and therefore perpendicular to both
gradient vectors. Given two vectors in three dimensional space, a third vector perpendicular to both is given by
3. The level curves
their crossrequested are the tangent vector T to the curve C is given by
product. Therefore
! !
! i 2 j k2 !
x2 +T y=2&v=×1, ! x +y = ! 4,
&w = ! 0 0 1 !! = −2yi + 2xj
! x2 + y 2 = 9
! 2x 2y 2z !
which are the circumferences of radii 1, 2 and 3 respectively. They are plotted in Fig. 3.10
At the point (1, 0, 0), T = 2j.

Multivariable Figure 17 illustrates how the tangent vector to the curve18


functions C is obtained from the gradients of the twoEduardo
intersecting Martı́n-Martı́nez
surfaces. The surface w = 0 is the unit sphere, centered on the origin, whilst the surface v = 0 is the xy-plane.

Math 217 - Week 3 Fall 2012


(April 26, 2014) Eduardo Martin-Martinez - Math 217

4. The gradient vectors are plotted in Fig. 3.10, they are all attached to the point where they are evaluated

As illustrated in the example we saw that the gradient is orthogonal to the level curves of a function of
two variables. Now remembering that a function of three variables f (x, y, z) generates a 4-dimensional object
w = f (x, y, z) (remember for example Example 3.2.5). The sets c = f (x, y, z) with constant c represent the
level surfaces of the plot w = f (x, y, z). In the same manner as the gradient was orthogonal to the contour
curves of two dimensional functions, the gradient will be orthogonal to the level surfaces of f (x, y, z), this is
to say, given a surface defined by
f (x, y, z) = c, c∈R
the vector ∇f will be orthogonal to that surface at every point.
This is esay to prove by considering a curves running along the surface c = f (x, y, z). Consider that this
curve will be parametrized by a parameter t, such that the position vector of a point in this curve as a function
of t is given by
r(t) = x(t)i + y(t)i + z(t)k

Now we can ask how c = f (x, y, z) varies along the path of the curve. We know the answer a priori, of
course: since the curves are in a level set of f (x, y, z), c is constant, c cannot vary with t, this is

dc
=0 (3.7.1)
dt
But we can still use the chain rule to compute this total derivative, doing so:
 
dx
 dt 
 
dc ∂f dx ∂f dy ∂f dz  dy  dr
= + + = ∇f ·  
 dt  = ∇f · dt = ∇f · v(t) (3.7.2)
dt ∂x dt ∂y dt ∂z dt  
 dz 
dt
So, equating the right-hand sides of (3.7.1) and (3.7.2) we get that

∇f · v(t) = 0

this is, the velocity vector (which is tangent to the curve) is orthogonal to the gradient of f (x, y, z). Since
this is true for ANY curve contained in the level surface f (x, y, z) = c, the conclusion is that the gradient is
orthogonal to all the curves in the level surface, ergo it is orthogonal to the surface itself.

Tangent plane to a surface

As an interesting first application of the gradient, if we consider the surface defined by f (x, y, z) = c with c
a real constant, the tangent plane to the surface at a given point will have as normal vector ∇f (x, y, z), as
illustrated in Figure 3.11.
Remember that the gradient was perpendicular to the level curves of a two variable function c = f (x, y).
In the same fashion, the gradient is perpendicular to the level surfaces of a thee-variable function. Let us
illustrate with an example

Multivariable functions 19 Eduardo Martı́n-Martı́nez


# f dx # f dy # f dz ! #f #f #f
"∗

dt
dy ⎦
+ + = #x #y #z dt
(7)
# x dt # y dt # z dt dz
dt 2014) Eduardo Martin-Martinez - Math 217
(April 26,

L1 &f

Tangent
x plane
y y
ce S: Surface S:
z)=c f(x,y,z)=c

The gradient & f of the function w = f (x, y, z) at the point P.


Figure 3.11: Tangent plane to a surface f (x, y, z) = c and gradient of the surface at the touching point

Example 3.7.2. Given the paraboloid x2 + y 2 − z = 8, find the tangent plane at the point (2,2,0).
! "∗
The f (x, y, z) # f defines
which # f this#paraboloid
f is f (x, y, z) = x2 + y 2 − z, We know that the normal vector to
& f (x, y, z) = # x # y # z
that plane will be given by ∇f (2, 2, 0). Let us compute first the gradient

unction f (x, y, z). For a function of n variables,


∇f the
= 2xgradient is a vector of dimension
i + 2y j − k

The gradient at (2,2,0) will therefore be

ny point on the line L 1 is r(t) = x(t)i + y(t)j ∇f (2,


+2,z(t)k,
0) = 4iwe − k seen previously that
+ 4jhave
dr
line L 1 therefore
at that point. From
the tangent (7),will
plane thebedot product
of the form between & f and dt is zero on lines
herefore say that for any point on L 1 , the vector 4x +&4yf −atz the
= C point is perpendicular to

we find C knowing that the plane has to contain the contact point (2, 2, 0), which yields
nts on L 2 , and of any other line running4along
· 2 + 4 ·the
2 − surface
0 = C ⇒ S.
C = 16

so the tangent plane will be (after simplification)


the tangent plane to the level surface S at the point P is tangential all the lines
d passing through P. But since & f is perpendicular 1 all these lines at P, we can
x + y − to
z = 4.
4
e point P is perpendicular to the tangent plane to the surface S at point P.
3.8 Directional derivatives
Fall 2012
Given that multivariable functions can vary at different rates depending on the direction along which we
consider the rate of variation, to have a complete analogue to the usual single-variable function derivatives,
we need to be able to analyze the rate of change of the function in any arbitrary direction.

Multivariable functions 20 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

We have learnt that the rate of variation of a function with respect of the direction of the axes is precisely
given by the partial derivatives. We would like to generalize this to be able to find the rate of variation of a
function at any point in any direction of space. The directional derivative is, as the name suggests, a derivative
along a given arbitrary direction. If we move in a particular direction given by the vector u an infinitesimally
small magnitude, the directional derivative tells us how much will the function f change in the process. It is
defined as
∂f u
≡ ∇u f = · ∇f = T̂u · ∇f
∂u |u|
where T̂u is a unit vector in the direction of v.

Example 3.8.1. Find the directional derivative of

f (x, y, z) = 3x2 − sin(3z) + 6y

in the direction of u = (1, 2, 2)T .


We are going to need to compute the gradient of the function and the unit vector in the direction of v
i + 2j + 2k 1
∇f = 6x i + 6j − 3 cos(3z)k, T̂u = √ = (i + 2j + 2k)
2 2
1 +2 +2 2 3
then the directional derivative will be
1
∇u f = T̂u · ∇f = [6x + 12 − 6 cos(3z)] = 3x − 2 cos(3z) + 4.
3

To understand the concept of directional derivative and to prove that it is indeed the variation of a function
along a given direction, let us formulate it as follows: Suppose that for some function f (x, y), there exists
a parameterized curve r(t) on the XY -plane (the domain of the function). We want to determine how the
function changes along the curve. This will be given by the directional derivative along the direction of the
curve at every single point, ascalculus
Part II: Differential shown in Fig. 3.12.
of multivariable functions 17


(x*,y*)
f(x,y)=c4
f(x,y)=c3
f(x,y)=c2
r(t)
f(x,y)=c1
Figure 18: The directional derivative along a parameterized curve r(t) with tangent vector T̂.

Figure 3.12: The directional derivative of a f (x, y) along the direction of a curve parametrized by r(t), with
tangent vector T̂
where s is a measure of arc length along the curve. Now the directional derivative of f (x, y) along the tangent
vector T̂ is
# r # f dx # f dy # f dz d f
& f · T̂ = & f · = + + = (8)
ds # x ds # y ds # z ds ds
We saw in Block 2 that the velocity vector is always tangent to the curve at every single point, and that
this was equal toTherefore the directional
the derivative of derivative of f (x, y) along
r with respect the variation
to the direction of the
df
oftangent vector T̂Remembering
arclength. is the rate of changethe
of result derived
f (x, y) with respect to distance s traversed in the direction of T̂, ds .

If the angle between & f


Multivariable functions and T̂ is ( , the directional derivative
21 is then Eduardo Martı́n-Martı́nez
& f · T̂ = |& f ||T̂| cos (
= |& f | cos ( since T̂ is a unit vector
(April 26, 2014) Eduardo Martin-Martinez - Math 217

in Block 2, the unit vector T̂ tangent to the curve will be given by

v dr
T̂ = =
|v| ds

where s is a measure of the arc length of the curve. Now remembering that

dx dy ∂f ∂f
T̂ = i+ , ∇f = i+ j
ds ds ∂x ∂y

The directional derivative along the direction of the tangent vector to the curve will be

∂f dx ∂f dy df
∇T̂ f = T̂ · ∇f = + =
∂x ds ∂y ds ds

So the directional derivative along the direction of the curve is nothing but the rate of variation of f per unit
of distance (arc lenght) transversed along the curve parametrized by r. This shows that indeed the directional
derivative is telling us how the function varies as we move along the direction of the curve.

The gradient as the direction of maximum variation

Notice that the directional derivative of some f (x1 , . . . , xn )is defined as the dot product of the gradient of the
function and the unit vector in the direction we are computing the derivative. As such, we know from the
properties of the dot product that
∇u f = T̂u · ∇f = |∇f | cos θ
since |T̂u | = 1. θ is the angle between the vector u (on which direction we are taking the derivative) and the
gradient of the function f .
The directional derivative will be maximum when θ = 0. This is, the directional derivative is maximum
in the direction of the gradient. This proves that the gradients is pointing on the direction of the maximum
rate of increase. Obviously, the direction of maximum decrease will be opposite to the gradient θ = π.
The directional derivative is zero in the direction perpendicular to the gradient θ = π/2. This is not
surprising: remember that the gradient was perpendicular to the level sets, and on a level set the function
remains constant.

Example 3.8.2. Figure 3.13 shows the contour line of the paraboloid f (x, y) = x2 + y 2 with f (x, y) = 1, Fig.
3.14 shows the graph of the function z = f (x, y) Notice the following:
 
• At the point √12 , √12 the directional derivative along the direction T̂1 (perpendicular to the contour
line and parallel to the gradient of f ) is 2. This is the direction of maximum increase at that point.
 
• At the point √ −1 √
2
, −1
2
the directional derivative along the direction T̂2 (tangent to the contour line,
thus orthogonal to the gradient of f ) is 0. This is, f (x, y) does not vary along that direction at that
point.
 
• At the point √12 , √12 the directional derivative along the direction T̂3 (perpendicular to the contour
line and anti-parallel to the gradient of f ) is -2. This is the direction of maximum decrease at that point.

Multivariable functions 22 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

Part II: Differential calculus of multivariable functions 18

y
T̂1

√ √
f (x, y) = 1 & f ( √12 , √12 ) = 2i + 2j
f (x, y) = x 2 + y2
& f (x, y) = 2xi + 2yj
T̂3
T̂1 = √12 i + √12 j & f ( √12 , √12 ) · T̂1 = 1 +1=2 x
T̂2 = − √12 i + √12 j & f (− √12 , − √12 ) · T̂2 = 0
T̂3 = − √Part
1
2
i +II:−Differential
√1 j
2
& calculus T̂3 = −1 -1=-2
f ( √12 , √12of) ·multivariable functions T̂2 18

√ √ y
& f (− √12 , − √12 ) = − 2i − 2j
T̂1

Figure 19: Three different directional derivatives of the function f1(x,1y) =√ x 2 +√y .
2
f (x, y) = 1 & f ( √ , √ ) = 2i + 2j
Figure 3.13:f (x,The
y) = xdirectional
2 + y2
derivative of the paraboloid f (x, y) = x2 + y 2 in 2several 2
directions along and
& f (x, y) = 2xi + 2yj
perpendicular to√1 the√1 contour line f (x, y) = 1. T̂ 3
T̂1 = 2 i + 2 j √1 √1
& f ( 2 , 2 ) · T̂1 = 1 x
T̂2 = − √12 i + √12 j z=f(x,y)=x2+y2
& f (− √12 , − √12 ) · T̂2 = 0
ˆ1
&f·T
T̂3 = − √12 i + − √12 j z=1
& f ( √12 , √12 ) · T̂3 = −1 T̂2
(Maximal increase in z)
√ √
& f (− √12 , − √12 ) = − 2i − 2j
ˆ
&f·T
Figure 19: Three2different directional derivatives of the function f (x, y) = x 2 + y2 .
(No increase in z)

y
z=f(x,y)=x2z+y2
ˆ1
&f·T
z=1
ˆ
A(Maximal increase in z)
T
1

ˆ22 x
&f·T B
(No increase in z)

z x2+y
y 2=1

Figure 20: The directional derivative of the function z = f (x, y) ˆ 1direction of a vector T̂1 , parallel to & f , gives
A in the
T
the maximal rate of change of z. InT ˆthe
2 direction T̂2 , orthogonal tox& f (and hence tangential to the contour line of
f (x, y)), the directional derivative is zero,Bindicating no change in the value of z.
x2+y2=1
Figure 20: The directional derivative of the function z = f (x, y) in the direction of a vector T̂1 , parallel to & f , gives
per unit the
area, q, in rate
maximal the of
direction
change ofofz. unit
In thevector n,T̂along
direction which we measure distance s, is given by
2 , orthogonal to & f (and hence tangential to the contour line of
Figuref (x,
3.14: The
y)), the directional
directional derivative
derivative of the no
is zero, indicating paraboloid
change in thef value z. x2 + y 2 along several directions.
(x, y)of=
dT
q = −)
ds
per unit area, q, in the direction of unit vector n, along which we measure distance s, is given by
where ) is the thermal conductivity of the material from which the plate is made. This is illustrated in Figure 21,
where the contour lines represent isotherms, whichq = dT of constant temperature across the plate. As in (8), the
are−)lines
heat flow per ds
unit area q can be rewritten as the directional
Multivariable functions 23 derivative Eduardo Martı́n-Martı́nez
where ) is the thermal conductivity of the material from which the plate is made. This is illustrated in Figure 21,
where the contour lines represent isotherms, which qare=lines
(−)of&T ) · n temperature across the plate. As in (8), the
constant (9)
heat flow per unit area q can be rewritten as the directional derivative
(April 26, 2014) Eduardo Martin-Martinez - Math 217

Example 3.8.3. Consider a hot surface (a dish, a circuit,...) on which we define a co-ordinate system (x, y).
At each point on the surface, the temperature is given by a function T (x, y). Fourier’s law of heat conduction
says that the heat flow per unit area φ in the direction of a unit vector n along which we measure distance s,
is given by
dT
φ = −λ
Part II: Differential calculus of multivariable functions
ds 19
where λ is the thermal conductivity of the material of which the surface is made. As we did above, this equation
can be rewritten in terms of of the directional derivative of T in the direction along which we measure the
heat flux
φ = −λ∇T · n ⇔ φ = −λ∇n T
The minus sign tells us that the heat flow goes from the hot to the cold areas. From the properties of the dot
product we know that the heat flux will be maximized when the direction on which we measure it is parallel
to the gradient of temperatures.
We also see that there is no flux at all in the direction perpendicular to the temperature gradient. that’s
precisely what defines the isothermal curves (level sets of the temperature function). Figure 3.15 shows the
contour lines (isotherms) and the gradient vector at different points on a hot surface with an inhomogeneous
temperature distribution.

q=*[)&T]·n=*) #T
#s

&T HOT

n
s q
&T T(x,y)=T4
T(x,y)=T3
COLD
T(x,y)=T2

T(x,y)=T1
Figure 21: The heat flow per unit area q, in the direction n, across a flat, hot plate. Contour lines are isotherms
(lines of constant temperature).
Figure 3.15: Heat flux in the direction of n across a flat surface. Contour lines are isotherms.

3.9 Taylor series for multivariable functions

The Taylor series provide a means of representing a function around a point in its domain using a (possibly
infinite) power series. For a single variable function f (x), the Taylor series of f (x) around the point x = x0 is
given by
1 1
f (x) = f (x0 ) + (x − x0 )f 0 (x0 ) + (x − x0 )2 f 00 (x0 ) + (x − x0 )3 f 000 (x0 ) + . . .
2! 3!
Let us call S to the set of points x0 for which this infinite series converges. We say that the function f (x) is
analytic in S. Outside this set, the function is not analytic.
Math 217 - Week 3 Fall 2012
The Taylor series gives an approximation of how a function behaves around the point x0 . Extremely useful
for the calculation of limits and the approximation of analytic functions. Shown in Figure 3.16 it is shown how

Multivariable functions 24 Eduardo Martı́n-Martı́nez


1
f (x) = f (x0 ) + (x − x0) f ′ (x0 ) + (x − x0 )2 f ′′ (x0 ) + · · ·
2!
Truncating this series gives an approximation of how(April 26, behaves
a function 2014) Eduardo
around the point of interest. Note that-aMath 217
Martin-Martinez
first order approximation is given by
f (x) ≈ f (x0 ) + (x − x0) f ′ (x0 )
considering different powers of the taylor series approximates better and better the function f (x) = sin(x) near
which is a linear approximation to the function at the point x 0 , shown in Figure 22 as a line approximating the
the point x =yπ.
function Asxwe
= sin nearincrease
the pointthe
x =number of powers
+ . As Figure toshows,
22 also whichhigher
we truncate the series,
order truncations givewe obtain increasingly
increasingly
accurate approximations.
accurate approximations of the function y = sin x near the point x = + .

Function y=sin(x)
1.5
First order approx
Third order approx
1 Fifth order approx

0.5

0
y

−0.5

−1

−1.5

−2
0 1 2 3 4 5 6
x

Figure 22: Taylor series approximations of the single variable function y = sin x.
Figure 3.16: The function sin(x) and increasingly higher order taylor approximations around x = π.
Taylor series extend to multivariable functions. For the two-variable function z = f (x, y), at the point (x 0 , y0 ), the
series
The takes the
Taylor formextends to multivariable functions taking into account that there are possibilities of
series
variation of the function along # f different #directions.
f 1 For
# 2 finstance, for a two # 2 f variables
1 function
#2 f f (x, y), the
f (x, y) = f (x0 , y0 ) + (x − x0) + (y − y0) + (x − x0)2 2 + (x − x0)(y − y0 ) + (y − y0 )2 2 + · · ·
Taylor series around the point# x(x0 , y0 ) is #given y 2!by #x # x# y 2! #y
(10)
where all the partial derivatives are evaluated at∂f (x 0 , y0 ). ∂f 1 2
∂ f
f (x, y) =f (x0 , y0 ) + (x − x0 ) + (y − y0 ) + (x − x0 )2
∂x ∂y 2! 2
∂xapproxima-
As with the single variable case, the Taylor series ofxa0 ,ymultivariable
0 functionx0truncated
,y0 to its first order x0 ,y0
tion gives a linear approximation of the of interest. For the function z2 = f (x, y), the truncated, first
function order
1 2 ∂ f
2 ∂ f
Taylor series near the + point (y − fy(x
z0 = 0 )0 , y0 ) is given +
by (x − x )(y − y ) + · · ·
∂y 2 ∂x∂y
0 0
2! x0 ,y0 x0 ,y0
#f #f
= z0 + (x − x0) (x0 , y0 ) + (y − y0) (x0 , y0 )
If we truncate this expansion to zthe first order# we
x obtain #y

which can be re-written as ∂f ∂f
f (x, y) = f (x0 , y0 ) + (x − x0 ) + (y − y0 )
! ∂x " x⎡0 ,yx0− x0 ⎤ ∂y x0 ,y0
− ## xf (x0 , y0 ) − ## yf (x0 , y0 ) 1 ⎣ y − y0 ⎦ = 0 (11)
which is the plane that best approximate f (x, y) at (x0 , y0 ). z − z0

Math 217 - Week 4 Fall 2012


3.10 Implicit partial differentiation

3.10.1 Implicit derivatives of single variable functions

Let us recall the idea of implicit differentiation: if you have an equation that relates two variables x and y
you could treat y (or x) as an implicit function of x (or y) and differentiate implicitly to find the derivative
dy/dx.

Multivariable functions 25 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

For instance, given the equation of a circumference

x2 + y 2 = R 2 ,

we want to find the slope of the line tangent to the circumference (or how much does y increase under
infinitesimally small variations of x). Of course, we could proceed as usual brute-forcing the derivative by
solving for y first and deriving later:
p dy −x x
y= R 2 − x2 ⇒ =√ =−
dx R 2 − x2 y

Equivalently we could have obtained this derivative by implicit differentiation:

dx dy x −x
x2 + y 2 = R2 ⇒ 2xdx + 2ydy = 0 ⇒ 2x + 2y = 0 ⇒ =− = √
dy dx y R 2 − x2

Notice that the derivative is not well defined when y = 0. (The slope of the tangent is actually infinite).
This is particularly useful when we face transcendental equations (so we cannot solve for y as a function
of x), for instance, the curve defined by
y sin x − x cos y = 0
we cannot obtain y(x), but we could differentiate implicitly. Massaging the expression above and differentiating
    sin x cos x
sin x cos y cos x sin x cos y sin y dy x2
− x
− =0⇒ − 2 dx + + dy = 0 ⇒ = cos y sin y
x y x x y2 y dx +
y2 y

3.10.2 Implicit differentiation for multivariable functions

Let us consider an equation given by some multivariable function equated to zero, for instance:

F (x, y, z) = 0

This is an implicit relation between x, y and z. Sometimes it might be possible to separate individual variables
and obtain relationships of the form

x = f1 (y, z)
y = f2 (x, z)
z = f3 (x, y).

However, this is not something that can always be done. If the function F (x, y, z) is transcendental it is not
possible to separate variables.
One example relevant in Physics and in Chemistry is the equation of state, which relate density, tem-
perature and pressure, and which in the case of a gas can be expressed as an implicit equation of volume,
temperature and pressure. In general the equation of state will be given by

F (P, V, T ) = 0

Multivariable functions 26 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

In the case of simple models, like the ideal gas, it is easy to isolate the variables P, V and T , but in more
complicated equations of state, e.g. Van der Waals gas, it may be difficult, or even not possible, to find
closed-form expressions for these functions. This is where implicit differentiation is useful.
Let us illustrate how to take implicit derivatives of a multivariable expression using the equation of state
of an ideal gas
Example 3.10.1. (Equation of state of an ideal gas)
Consider the following equation of state

F (P, V, T ) = P V − RT = 0
∂P ∂P
Find the partial derivatives ∂T and ∂V by direct and implicit differentiation.
In this case it is easy to isolate P and therefore compute the partial derivatives:
RT ∂P R ∂P RT P
P = ⇒ = , =− 2 =−
V ∂T V ∂V V V

However, we want to compute them using implicit differentiation. Since we want first to compute the
partial derivative of P with respect to V , if we assume that we cannot directly serrate P, we want to use
the chain rule to find out the relationship between this derivative and the derivatives of F (P, V, T ). Let us
compute the derivative of F with respect to V at T constant. Same as with the previous examples we proceed
by different levels of dependence:

1. At constant T , F can vary because V varies of because P varies:


       
∂F ∂F ∂F
= +
∂V T ∂P T,V ∂V P,T

2. Now, at constant T , P can vary because V varies:


       
∂F ∂F ∂P ∂F
= +
∂V T ∂P T,V ∂V T ∂V P,T

Now, since F (P, V, T ) = 0 then we know that


       
∂F ∂F ∂P ∂F
=0 ⇒ + =0
∂V T ∂P T,V ∂V T ∂V P,T

Now we can solve for the partial derivative we are looking for
 
∂F
  −
∂P ∂V P,T P
=   =−
∂V T ∂F V
∂P T,V

Similarly, we can compute the derivative of F with respect to T at V constant:

1. At constant V , F can vary because P varies of because T varies:


       
∂F ∂F ∂F
= +
∂T V ∂P T,V ∂T P,V

Multivariable functions 27 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

2. Now, at constant V , P can vary because T varies:


       
∂F ∂F ∂P ∂F
= +
∂T V ∂P T,V ∂T V ∂T P,V

Now, since F (P, V, T ) = 0 then we know that


       
∂F ∂F ∂P ∂F
=0 ⇒ + =0
∂T V ∂P T,V ∂T V ∂T P,V
Now we can solve for the partial derivative we are looking for
 
∂F
  −
∂P ∂T P,V R
=   =
∂T V ∂F V
∂P T,V
Example 3.10.2. Consider the following implicit relationship that defines z as a function of x, y:
x2 y 2 z 3 + zx sin(y) = 5
∂z
Find .
∂x
We could apply the same method discussed above: Defining an F (x, y, z) such that equated to zero gives
the same equation as before
F (x, y, z) = x2 y 2 z 3 + zx sin(y) − 5 = 0
and proceed in a similar way. However, for the sake of simplicity and teach you a more straightforward way
to apply implicit differentiation, let us start with
x2 y 2 z 3 + zx sin(y) = 5
and directly differentiate with resepect to x taking into account that z is a function of x, thus
∂z ∂z
2xy 2 z 3 + x2 y 2 3z 2 + z sin(y) + x sin(y) = 0
∂x ∂x
and solving for the partial of z with respect to x we get
∂z 2xy 2 z 3 + z sin(y)
=− 2 2 2
∂x 3x y z + x sin(y)
which is the same solution they obtain in the book (example 12.20) using fancy formulas that they intend you
to memorize. Just straightforward differentiation does the trick.
Example 3.10.3. (Revisiting the implicit differentiation of the equation of state of an ideal gas)
Indeed, we could have used the same trick in the equation of state to derive implicitly: Let us start from
P V − RT = 0
and differentiate implicitly with respect to V taking into account that P is a function of V :
∂P ∂P P
V +P =0⇒ =−
∂V ∂V V
Similarly, differentiating with respect to T we get
∂P ∂P R
V −R=0⇒ =
∂T ∂T V
which gives the same solution as above.

Multivariable functions 28 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

3.10.3 Some relations between partial derivatives of implicit functions

Let us consider the implicit relationship between x, y, z given by

F (x, y, z) = 0 (3.10.1)

and let us differentiate this expression in three different cases:

• z = z(x, y)

Let us for a moment consider z as a function of x, y (it could equivalently be considered that x is a function
of y, z or y a function of x, z). Let us study the partial derivatives
   
∂z ∂z ∂z ∂z
≡ , ≡
∂x ∂x y ∂y ∂y x

note that, as there are no other dependent variables, both notations (explicitly saying what is constant or not)
are completely equivalent in this case, and we will use them throughout this section interchangeably at our
convenience. Now, differentiating F with respect to both x and y we get, (keeping in mind that we consider
z a function of x and y)
       
∂F ∂F ∂F ∂z
= +
∂x y ∂x y,z ∂z x,y ∂x y
       
∂F ∂F ∂F ∂z
= + .
∂y x ∂y x,z ∂z x,y ∂y x

Now, since we know from (3.10.1) that


   
∂F ∂F
= =0
∂x y ∂y x

Substituting this above and solving for the derivatives of z in each case we get
   
∂z Fx ∂z Fy
=− , =− . (3.10.2)
∂x y Fz ∂y x Fz

where Fa conforms to the usual notation  


∂F
Fa ≡
∂a b,c

with the different a, b, c being cyclicly interchangeably x, y or z.

• x = x(y, z)

Now, notice that assuming that z was a function of x and y was an arbitrary choice. As mentioned above, we
could have equivalently considered x as a function of y, x. In that case, differentiating F with respect to both

Multivariable functions 29 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

y and z we would get


       
∂F ∂F ∂F ∂x
= +
∂y z ∂y x,z ∂x y,z ∂y z
       
∂F ∂F ∂F ∂x
= + .
∂z y ∂z x,y ∂x y,z ∂z y

Now, since we know from (3.10.1) that


   
∂F ∂F
= =0
∂y z ∂z y

Substituting this above and solving for the derivatives of x in each case we get
   
∂x Fy ∂x Fz
=− , =− . (3.10.3)
∂y z Fx ∂z y Fx

• y = y(x, z)

Of course, we can repeat the same exercise once again, now considering y as a function of x and z. Repeating
the same reasoning again we get
       
∂F ∂F ∂F ∂y
= +
∂x z ∂x z,y ∂y x,z ∂x z
       
∂F ∂F ∂F ∂y
= + .
∂z x ∂z x,y ∂y x,z ∂z x

Now, since we know from (3.10.1) that


   
∂F ∂F
= =0
∂x z ∂z x

Substituting this above and solving for the derivatives of x in each case we get
   
∂y Fx ∂y Fz
=− , =− . (3.10.4)
∂x z Fy ∂z x Fy

Now, comparing the first equation in (3.10.3) and (3.10.4), we readily observe that
 
∂x 1
= 
∂y z ∂y
∂x z

Multivariable functions 30 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

If we make all the possible comparisons using (3.10.2), (3.10.3), (3.10.4) we realize of the following identity
 
∂a 1
= 
∂b c ∂b
∂a c

This is often known as ‘Maxwell relations’, and are very useful in thermodynamics.
Notice also that from the same equations we can see that
         
∂x ∂y ∂z Fy Fz Fx
= − − − = −1
∂y z ∂z x ∂x y Fx Fy Fz

If, for example, we particularize to the equation of state of a gas: x = P , y = V and z = T , we get that
     
∂P ∂V ∂T
= −1
∂V T ∂T P ∂P V

which holds in general, of course. It is extremely easy to verify this is true in particular for the ideal gas,
where F (P, V, T ) = P V − RT = 0.

Multivariable functions 31 Eduardo Martı́n-Martı́nez

Вам также может понравиться