You are on page 1of 12

Unit 7

Multivariate Calculus
Next, we will be studying Multivariate Calculus, i.e., calculus applied to
functions involving 2 or more variables. We start with an introduction to
these types of functions, after which we look at calculus involving these func-
tions.
When we express a function of a single variable, x, in the form y = f(x),
i.e. y = some expression involving x, we have a second variable, y, whose
value is determined by the value of the variable x. That is, x is an indepen-
dent variable, which may take on any value in the domain of the function,
and the value of variable y depends on the value of the independent variable
x, so y is a dependent variable.
Functions involving only a single independent variable are easy to work
with, but are of limited practical use. To describe most real-world problems
more than one variable is required. Many real-world functions involve 2, 3
or even thousands of independent variables. That is, there are several (or
many) variables, each of which can assume values independently of the oth-
ers, and a function expressing how the various variables combine to produce
a value for something which depends on all these variables. For instance,
w = f(x, y, z) expresses that the dependent variable w is a function of the
independent variables x, y and z. Thus the value of w is determined by the
values of x, y and z. However, the values of x, y and z need not be related
in any way - that is, each can change independently of the others.
The following are all examples of functions of two or more variables:
f(x, y) = x
2
+ 2y g(x, y) = x 3y + x
2
y
3
h(x, y, z) = x y + 2z f(x
1
, x
2
, x
3
, x
4
) = 2x
2
1
x
2

x
3
x
4
x
2
1
We evaluate a function at a particular set of values of the independent
variables in a similar manner to that used in evaluating a function of a sin-
gle variable. We simply substitute in the value of each of the independent
variables and simplify the resulting expression.
Example 1. Find the specied values of the given functions.
(a) f(2, 3) where f(x, y) = x
2
+ 2y
(b) h(1, 1, 2) where h(x, y, z) = x y + 2z
(c) f(1, 2, 3, 4) where f(x
1
, x
2
, x
3
, x
4
) = 2x
2
1
x
2

x
3
x
4
x
2
Solution:
(a) For f(x, y) = x
2
+ 2y we have f(2, 3) = (2)
2
+ 2(3) = 4 + 6 = 10.
(b) We have h(1, 1, 2) = (1) (1) + 2(2) = 1 + 1 4 = 2.
(c) Substituting x
1
= 1, x
2
= 2, x
3
= 3 and x
4
= 4 we get:
f(1, 2, 3, 4) = 2(1)
2
(2)
_
(3)(4)
2
= 4

4
2
= 4

3
Example 2. For f(x, y) = x

ye
x
2
, nd f(t, x).
Solution: This simply says that we should replace all occurrences of x with
t and replace all occurrences of y with x in the functional expression. That
is, write t where x was and x where y was. We get f(t, x) = t

xe
t
2
.
Example 3. Suppose a company manufactures cylindrical cans where the ma-
terial for the top and bottom costs $.05 per cm
2
, and the material for the
sides costs only $.03 per cm
2
. Letting C(r, h) be the cost function (in dollars)
for a can of radius r and height h, nd an expression for C(r, h), and then
nd the cost of a can of radius 2 cm and height 6 cm.
Solution: We need to express the cost of the can in terms of the amount of
the materials used in producing it, so we need to determine the amount of
each of the 2 materials used, in terms of the radius r and the height h of the
can. We do this by considering the surface areas of the various parts of the
can. The top and bottom of the can are simply two circles of radius r (see
gure 1), so the area of each is the area of a circle of radius r, which we know
is r
2
. The material forming the sides of the can, once laid out at, is simply
a rectangle with height equal to h and width equal to the circumference of
2
the circle that makes up the top (or bottom) of the can, so the width is given
by 2r. Thus the area of the rectangle which makes up the sides is
width height = (2r)(h) = 2rh
r
r
2
r
2
2 r h
h
2 r
Figure 1:
We see that the can is formed by taking 2 circles, each using r
2
cm
2
of the
material for the top and bottom, together with one rectangle which requires
2rh cm
2
of the material for the sides. The material for the top and bottom
costs $.05 per cm
2
, so the total cost for the top and bottom will be
(2)($.05)(r
2
) = $.1r
2
The material for the sides costs $.03 per cm
2
, so the cost for the sides is
($.03)(2rh) = $.06rh
The function C(r, h) which gives the cost of a can of radius r and height h,
in dollars, is therefore
C(r, h) = .1r
2
+ .06rh
To nd the cost of a can of radius 2 cm and height 6 cm, we evaluate C(2, 6):
C(2, 6) = .1(2)
2
+ .06(2)(6) = .4 + .72 = 1.12( 3.52)
We see that a can of this size will cost approximately $3.52 in materials.
3
Partial Derivatives
In a calculus course, one of the rst questions we ask when encountering
a new kind of function is What is the derivative of this function?. That is,
What do we get when we dierentiate the function?.
When dealing with a function of a single variable, such as y = f(x),
we dierentiate with respect to x to get
dy
dx
, which is the derivative of y
with respect to x. Because we have only a single variable in the function,
i.e. because y is a function only of x, this single variable is the only one
with respect to which we might dierentiate. Thus, we can abbreviate the
derivative with respect to x to just the derivative. Even if we dont say
with respect to x, its obvious, because theres nothing else with respect
to which we might be dierentiating.
When we have a function of 2 or more variables, there are more possibil-
ities. In such a case, the appropriate response to the question What is the
derivative of this function? is Derivative with respect to what?. That is,
because there are several variables with respect to which we could dierenti-
ate, we can no longer talk about the derivative, but must be more precise
in our description.
Recall that for a function of a single variable, such as y = f(x),
dy
dx
tells
us about what is happening to the value of y as the value of x changes. That
is, we are looking at the change in y (i.e. dy) resulting from an innitesimal
change in x (i.e. dx).
For a function of 2 or more variables, there are several things aecting the
function value, so if we want to investigate how the function value changes,
we need to look at one factor at a time. For instance, for z = f(x, y), both
x and y aect the value of z. That is, the value of z changes as a result of
x changing, but the value of z also changes as a result of y changing. To
investigate these changes, we need to look at both kinds of change, and do
it in such a way that we untangle any interactions between x and y as they
aect z. Thus we look at
1. What happens to z if x changes a little bit, but y stays the same?
i.e. what happens to z as only x changes?
2. What happens to z if y changes a little bit, but x stays the same,
i.e. as only y changes?
4
We refer to these 2 dierent kinds of change in z as partial derivatives.
We use slightly dierent notation, to remind us that this kind of derivative is
dierent, i.e. that it only partially explains what is happening to the function.
Because we will be working most often with (i.e. investigating in more
detail) functions of 2 variables, we will dene our concepts and notation in
this context.
Denition 7.1. Consider a function z = f(x, y).
The partial derivative of f with respect to x is the rate of change in the function
value as only x changes, and is denoted by:
f
x
or
z
x
or f
x
(x, y).
Similarly, the partial derivative of f with respect to y is the rate of change in
the function value as only y changes and is denoted by:
f
y
or
z
y
or f
y
(x, y).
This extends in the natural way to functions of more than 2 variables,
with a partial derivative for each of (i.e. with respect to each of) the inde-
pendent variables. So for instance if we have a function of 4 variables such
as g(x
1
, x
2
, x
3
, x
4
), we have 4 partial derivatives:
g
x
1
,
g
x
2
,
g
x
3
and
g
x
4
.
How do we calculate these partial derivatives? For each partial deriva-
tive, we want to know what happens to the function as only one variable
changes. If only one of the dependent variables is changing, then the others
are all remaining constant. So to nd the partial derivative of a function
with respect to some particular variable, we dierentiate the function with
respect to that variable, treating all other variables as constants.
Theorem 7.2. Let f(x, y) be a function of 2 independent variables x and y.
To nd
f
x
, dierentiate the function with respect to x in the usual way, treat-
ing y as a constant.
To nd
f
y
, dierentiate the function with respect to y (i.e. treating y as the
variable), while treating x as a constant.
5
Again, this generalizes to functions of more variables in the natural way.
We nd a partial derivative with respect to one particular variable by ap-
plying our usual dierentiation rules to that variable, while treating all the
other variables as constants.
Example 4. For z = x
3
y
2
+ x
2
y + x y
5
, nd
z
x
and
z
y
.
Solution: For
z
x
, we treat y as if it was a constant, rather than a variable.
For instance, we see that

x
(x
3
y
2
) = y
2
_

x
(x
3
)

= y
2
_
d
dx
(x
3
)

So we get:
z
x
= y
2
_
d
dx
_
x
3
_
_
+ y
_
d
dx
_
x
2
_
_
+
d
dx
(x) y
5
d
dx
(1)
= y
2
_
3x
2
_
+ y(2x) + 1 y
5
(0) = 3x
2
y
2
+ 2xy + 1
Similarly, we have
z
y
=

y
_
x
3
y
2
+ x
2
y + x y
5

= x
3
_

y
_
y
2
_
_
+ x
2
_

y
(y)
_
+ x

y
(1)

y
_
y
5
_
= x
3
(2y) + x
2
(1) + x(0) 5y
4
= 2x
3
y + x
2
5y
4
Example 5. For f(x, y, z) = e
x
2
y
3
z
+
3

x
yz
2
y ln(xz), nd f
x
(x, y, z), f
y
(x, y, z)
and f
z
(x, y, z).
Solution:
f
x
(x, y, z) =

x
_
e
(y
3
z)x
2
_
+

x
__
3
yz
2
_

x
_


x
[y ln ((z)x)]
Notice:
d
dx
_
e
kx
2
_
= e
kx
2
_
d
dx
(kx
2
)

= 2kxe
kx
2
. For

x
_
e
(y
3
z)x
2
_
we have
k = y
3
z and we get

x
_
e
(y
3
z)x
2
_
= 2xy
3
ze
x
2
y
3
z
.
Also,
d
dx
[k

x] = k
_
1
2

x
_
so that

x
__
3
yz
2
_

x
_
=
_
3
yz
2
__
1
2

x
_
=
3
2

xyz
2
.
And
d
dx
[c ln(kx)] = c
__
1
kx
_
d
dx
(kx)

= c
_
1
kx
(k)

=
c
x
, so

x
[y ln(z)x] =
y
x
.
6
Therefore we have
f
x
(x, y, z) = 2xy
3
ze
x
2
y
3
z
+
3
2

xyz
2

y
x
Similarly, we see that
f
y
(x, y, z) =

y
_
e
x
2
y
3
z
+
3

x
yz
2
y ln(xz)
_
= e
x
2
y
3
z
_
x
2
z
_ _
3y
2
_
+
3

x
z
2
_

1
y
2
_
(ln(xz)) (1)
= 3x
2
y
2
ze
x
2
y
3
z

x
y
2
z
2
ln(xz)
Finally,
f
z
(x, y, z) =

z
_
e
x
2
y
3
z
+
3

x
yz
2
y ln(xz)
_
= e
x
2
y
3
z
__
x
2
y
3
_
(1)

+
3

x
y
_

2
z
3
_
y
_
1
z
_
= x
2
y
3
e
x
2
y
3
z

x
yz
3

y
z
Suppose we wish to nd the value of a partial derivative at a specic point.
For instance, suppose we want to nd f
x
(a, b) for some function f(x, y) and
some values a and b. One approach is to nd f
x
(x, y) and then evaluate this
expression at x = a, y = b. However, since we wish to know the value of f
x
when y = b and were going to treat y as a constant when we dierentiate
with respect to x, we could substitute y = b before we dierentiate with re-
spect to x. That is, we can evaluate f(x, b) and then dierentiate this, which
is now a function only of x.
Example 6. For f(x, y) = 5x
2
y, nd f
x
(1, 3) by two dierent approaches:
(a) by nding f
x
(x, y) (b) by nding f(x, 3) and then dierentiating.
Solution:
(a) f
x
(x, y) =

x
(5x
2
y) = 5y
_

x
x
2

= (5y)(2x) = 10xy.
So f
x
(1, 3) = 10xy|
x=1,y=3
= 10(1)(3) = 30.
(b) f(x, 3) = 5x
2
y|
y=3
= 5x
2
(3) = 15x
2
, so f
x
(x, 3) =

x
(15x
2
) = 30x and
we get f
x
(1, 3) = 30x|
x=1
= 30.
7
Example 7. For f(x, y) = ye
x
2
2x

y, nd:
(a) f
x
(1, 2) (b) f
x
(1, 4) (c) f
y
(0, 3)
Solution: Since we need to evaluate f
x
(x, y) at 2 dierent y-values in (a) and
(b), we can start by nding f
x
(x, y) in general.
f
x
(x, y) =

x
ye
x
2


x
(2

yx) = 2xye
x
2
2

y
(a) f
x
(1, 2) =
_
2xye
x
2
2

y
_
x=1,y=2
= 2(1)(2)e
(1)
2
2

2 = 4e 2

2.
(b) f
x
(1, 4) =
_
2xye
x
2
2

y
_
x=1,y=4
= 2(1)(4)e
(1)
2
2

4 = 8e 4.
(c) Since we need to evaluate f
y
(x, y) only at x = 0, we can nd f
y
(0, y)
instead of nding the general form f
y
(x, y).
We have f(0, y) = ye
0
2(0)

y = y, so we see that f
y
(0, y) =

y
(y) = 1 and
f
y
(0, 3) = 1|
y=3
= 1.
Interpreting Partials at a Specic Point
We have seen that to nd f
x
(a, b) we can take either of 2 approaches:
f
x
(a, b) = f
x
(x, y)|
x=a,y=b
or f
x
(a, b) =
_

x
f(x, b)

x=a
. We look at this sec-
ond approach not only because it is sometimes arithmetically easier, but also
because it helps us to understand what these partial derivatives mean.
Recall that: Given some function y = f(x), we have two ways of inter-
preting the derivative
dy
dx
:
(1) Intuitively,
dy
dx
measures the rate of change of the dependent variable y
with respect to the independent variable x.
(2) Geometrically, the function y = f(x) denes a curve in the x-y plane,
i.e. a collection of points (x, y) = (x, f(x)), and in this context
dy
dx
can be
interpreted as a formula which gives the slope of a tangent line to this curve
y = f(x).
Similarly, there are two ways we can interpret a partial derivative:
Intuitive interpretation: We may interpret a partial derivative as a rate of
change. For example suppose we have a function f(x, y) where f
x
(2, 3) = 10
and f
y
(2, 3) = 2. This can then be interpreted as saying that at the point
8
(2,3), a unit increase in x (while y is held constant) will result in an approx-
imate increase of 10 units in the value of f, whereas, at the same point, a
unit increase in y (while x is held constant) will result in an approximate
increase of only 2 units in the value of f. Note: We say approximate because
this is the rate at which the function is changing (with respect to x or to y)
right at the point (2,3). However, as soon as we move away from this point,
even while holding one variable constant, this rate of change (i.e., the value
of the partial derivative) changes.
Geometric Interpretation: A function z = f(x, y) denes a surface in
3-space, i.e. a collection of points (x, y, z) = (x, y, f(x, y)). If we hold y
constant at some value b, the function f(x, b) gives the intersection of the
surface z = f(x, y) with the plane y = b, i.e., the trace of the surface in the
plane y = b, which is a curve in the x-z plane (see Figure 2.) The partial
derivative f
x
(x, b) can be interpreted as a formula which gives the slope of a
tangent line to this curve z = f(x, b). So f
x
(a, b) gives us the slope of the
tangent line to the trace f(x, b) at the point with x = a. Similarly, holding
x constant at some value a gives f(a, y) which is the trace of the surface
z = f(x, y) in the plane x = a and the partial derivative f
y
(a, y) gives the
slopes of the tangent lines to this curve, so f
y
(a, b) is the slope of the tangent
line to the curve z = f(a, x) at the point with y = b.
Figure 2: The Geometric Interpretation of Partials
9
Example 8. Suppose P = f(L, K) = 90L
2
3
K
1
3
is the production function for
a certain manufacturing process where:
P = the number of units produced,
L = the number of units of labour used,
K = the number of units of capital required.
Calculate P
L
(8, 27) and P
K
(8, 27) and interpret the results.
Note: P
L
and P
K
are known as the marginal productivity of labour and
marginal productivity of capital , respectively.
Solution: First, we take the partial derivatives.

L
_
90L
2
3
K
1
3
_
= 90
_
2
3
L

1
3
_
K
1
3
= 60L

1
3
K
1
3
= 60
_
K
L
_1
3
= 60
3
_
K
L

K
_
90L
2
3
K
1
3
_
= 90L
2
3
_
1
3
K

2
3
_
= 30L
2
3
K

2
3
= 30
_
L
K
_2
3
= 30
_
3
_
L
K
_
2
So we have P
L
(L, K) = 60
3
_
K
L
and P
K
(L, K) = 30
_
3
_
L
K
_
2
.
Therefore P
L
(8, 27) = 60
3

27
3

8
= 60
_
3
2
_
= 90,
andP
K
(8, 27) = 30
_
3

8
3

27
_
2
= 30
_
2
3
_
2
=
40
3
.
Interpretation: If labour and capital are currently at 8 and 27 respectively,
then an increase of one unit of labour (from 8 to 9), while capital remains
constant at 27, will result in an approximate increase in production by 90
units. A unit increase in capital however, from 27 to 28 units, while labour
remains at 8 units, will result in an approximate increase in production by
only 13.3 units.
Higher Order Partial Derivatives
With a function of a single variable such as y = f(x), we know that the
derivative
dy
dx
= f

(x) is often referred to as the rst derivative and that if we


dierentiate repeatedly we get the second derivative
d
2
y
dx
2
= f

(x), the third


derivative
d
3
y
dx
3
= f

(x), etc., which are referred to as higher derivatives of


the function.
We have the analogous situation for multivariate functions. For a func-
tion f(x, y), the partial derivatives f
x
(x, y) and f
y
(x, y) are often referred to
10
as rst partials. If we dierentiate again, we get the second partials. Since
we may dierentiate each of the rst partials either with respect to x or with
respect to y, for a function of 2 variables we get four second partials.
Denition 7.3. Let f be a function of both x and y and let f have rst
partials
f
x
= f
x
and
f
y
= f
y
. We dene the:
Second partial of f with respect to x as:

2
f
x
2
=

x
(
f
x
) or f
xx
= (f
x
)
x
Second partial of f with respect to y as:

2
f
y
2
=

y
(
f
y
) or f
yy
= (f
y
)
y
Mixed (second) partials of f as:

2
f
xy
=

x
(
f
y
) or f
yx
= (f
y
)
x
and

2
f
yx
=

y
(
f
x
) or f
xy
= (f
x
)
y
The third, fourth, and n
th
partials are dened in the natural way.
Example 9. Consider f(x, y) = x
2
y
3
+ ye
y
. Find
(a) f
xx
(x, y)
(b) f
yy
(x, y)
(c) f
xy
(x, y)
(d) f
yx
(x, y)
Solution: In order to nd the second partials of f we need to nd the rst
partials. We have:
f
x
(x, y) =

x
_
x
2
y
3
+ ye
y

= (2x)(y
3
) + 0 = 2xy
3
and
f
y
(x, y) =

y
_
x
2
y
3
+ ye
y

= (x
2
)(3y
2
)+[(1)(e
y
) + (y)(e
y
)] = 3x
2
y
2
+e
y
+ye
y
(a) f
xx
(x, y) =

x
[f
x
(x, y)] =

x
[2xy
3
] = 2y
3
(b) f
yy
(x, y) =

y
[f
y
(x, y)] =

y
(3x
2
y
2
+ e
y
+ ye
y
)
= (3x
2
)(2y) + e
y
+ (e
y
+ ye
y
) = 6x
2
y + e
y
(2 + y)
(c) f
xy
(x, y) =

y
[f
x
(x, y)] =

y
(2xy
3
) = (2x)(3y
2
) = 6xy
2
(d) f
yx
(x, y) =

x
[f
y
(x, y)] =

x
[3x
2
y
2
+ e
y
+ ye
y
] = (3y
2
)(2x)+0+0 = 6xy
2
11
Notice: In this example, we found that f
xy
(x, y) = f
yx
(x, y) = 6xy
2
. This is
no coincidence, as the following Theorem tells us.
Theorem 7.4.
For any continuous function f(x, y), it is always true that f
xy
= f
yx
.
That is, if f is a continuous function of 2 variables, then the 2 mixed
partials are identical. So we do not need to nd both separately, we can just
nd either of them and we have found both.
12

You might also like