Sunteți pe pagina 1din 29

Calculus 2 Chapter 3 Applications of partial differentiation 1

3 Applications of partial differentiation

3.1 Stationary points

Higher derivatives

Let U ⊆ R2 and f : U → R. The partial derivatives fx and fy


are functions of x and y and so we can find their partial deriva-
tives. We write fxy to denote fy differentiated with respect to x.
Similarly fxx denotes fx differentiated with respect to x, and fyx
and fyy denote fx and fy , respectively, differentiated with respect
to y. The functions fxx , fxy , fyx and fyy are the second partial
derivativesµ of f¶. For the other notation for µ partial
¶ derivatives, we
∂ ∂f ∂ 2f ∂ ∂f ∂2f
write or just for fxx , or just for
∂xµ ∂x ¶ ∂x2 ∂x ∂yµ ¶ ∂x∂y
∂ ∂f ∂ 2f ∂ ∂f ∂ 2f
fxy , or just for fyx and or just for
∂y ∂x ∂y∂x ∂y ∂y ∂y 2
fyy .
We can also differentiate the second partial derivatives to get the
∂3f
third partial derivatives, and so on. For example, fxyy , or ∂x∂y 2 , is

the third partial derivative obtained from differentiating fyy with


respect to x.

Example 1 Let f (x, y) = 3x3 y + 2xy 2 − 4x2 y. Then

fx (x, y) = 9x2 y + 2y 2 − 8xy;


fy (x, y) = 3x3 + 4xy − 4x2 ;
fxx (x, y) = 18xy − 8y;
fyx (x, y) = 9x2 + 4y − 8x;
fyy (x, y) = 4x;
fxy (x, y) = 9x2 + 4y − 8x.

Note that, in Example 1, fyx = fxy . This is true for all well-behaved
functions. In particular, if fxy and fyx are both continuous on R2
(or an open subset U of R2 ) then fyx = fxy on R2 (U ).
Calculus 2 Chapter 3 Applications of partial differentiation 2

Example 2 Let z = x cos 2y. Then


∂z
= cos 2y,
∂x
∂z
= −2x sin 2y,
∂y
∂ 2z
= 0,
∂x2
∂ 2z
= −2 sin 2y,
∂y∂x
∂ 2z
= −2 sin 2y,
∂x∂y
∂ 2z
= −4x cos 2y.
∂y 2

xe2x
Example 3 Let z = . Find all the possible values of n given
yn
that
∂ 2z 2
2∂ z
3x − xy = 12z.
∂x2 ∂y 2
xe2x
For z = we have
yn

∂z e2x + 2xe2x
= ,
∂x yn
e2x (1 + 2x)
= ,
yn
∂z nxe2x
= − n+1 ,
∂y y
2
∂ z 2e (1 + 2x) + e2x × 2
2x
= ,
∂x2 yn
4e2x (x + 1)
= ,
yn
∂ 2z n(n + 1)xe2x
= .
∂y 2 y n+2
Thus
∂ 2z 2
2∂ z 12xe2x (x + 1) n(n + 1)x2 e2x xe2x
3x −xy = − = (12(x + 1) − n(n + 1)x) ,
∂x2 ∂y 2 yn yn yn
Calculus 2 Chapter 3 Applications of partial differentiation 3

and so
∂ 2z 2
2∂ z xe2x 12xe2x
3x − xy = 12z ⇔ (12(x + 1) − n(n + 1)x) = ,
∂x2 ∂y 2 yn yn
⇔ 12(x + 1) − n(n + 1)x = 12,
(Since the result is true for all x and y.)
⇔ 12x + 12 − n(n + 1)x = 12,
⇔ 12 − n(n + 1) = 0,
(Since the result is true for all x.)
⇔ n2 + n − 12 = 0,
⇔ (n + 4)(n − 3) = 0,
⇔ n = −4 or n = 3.

Stationary points

Let U ⊆ R2 , and let f : U → R. Then (a, b) is a stationary point


of f if the tangent plane at (a, b) is horizontal. That is, the tangent
plane is parallel to the (x, y)-plane, and so has the form z = c for
some constant c.
Since the tangent plane at (a, b) passes through the point (a, b, f (a, b)),
then if it is horizontal it has the form

z = f (a, b).

Recall from Chapter 1 that the equation of the tangent plane at


(a, b) is

f (a, b) − z + fx (a, b)(x − a) + fy (a, b)(y − b) = 0.

Now, if (a, b) is a stationary point then f (a, b) − z = 0, and so

fx (a, b)(x − a) + fy (a, b)(y − b) = 0.

The last equation is true for all x and y. Putting x = a and y any
value other than b into this equation gives fy (a, b) = 0. Similarly,
putting y = b and x any value other than a into this equation
gives fx (a, b) = 0. Hence, if (a, b) is a stationary point of f then
fx (a, b) = 0 and fy (a, b) = 0. It is straightforward to establish the
converse of this result. Thus, to find the stationary points of f , we
have to find the solutions of the equations

fx (a, b) = 0,
fy (a, b) = 0.

Example 4 Find all of the stationary points of

f (x, y) = x2 y + 3xy 2 − 3xy.


Calculus 2 Chapter 3 Applications of partial differentiation 4

The partial derivatives of f are


fx (x, y) = 2xy + 3y 2 − 3y = y(2x + 3y − 3);
fy (x, y) = x2 + 6xy − 3x = x(x + 6y − 3).
Putting fx (x, y) = fy (x, y) = 0 gives
y(2x + 3y − 3) = 0, (1)
x(x + 6y − 3) = 0. (2)
From equation (1) either y = 0 or 2x + 3y = 3. If y = 0 then
equation 2 gives x(x − 3) = 0, and so x = 0, 3. If 2x + 3y = 3 then
6y = 6 − 4x. Thus, in this case, equation 2 gives x(3 − 3x) = 0, and
so x = 0, 1 and y = 1, 31 , respectively. Thus the stationary points
of f are (0, 0), (3, 0), (0, 1) and (1, 31 ).

Types of stationary points

There are three main types of stationary point: a local minimum,


a local maximum and a saddle point. The following diagrams show
a typical graph and contour-plot of these three types.
A local minimum

1
4

3
0 y
2 -2 -1 0 1
x
-2
1
-1 -1
00 y
2 1 0 -1 -2
1
x
2
-2

A local maximum

-2 -2
-1 xy -1
00 1
0
1 1
2 -1 2
x
-2 -2 -1 0 1
0 y
-3

-4

-5
-1

-2
Calculus 2 Chapter 3 Applications of partial differentiation 5

A saddle point

1.5

-2 1 -2
0.5
-10.5 -1
x y
00 0 y 0
-1.5 -1 -0.5 0 0.5 1 1.5
1 -0.5 1
x
2 -1 2 -0.5

-1

-1.5

Classifying stationary points

To determine the nature of a stationary point (a, b) of f we first


find the Hessian matrix,
µ ¶
fxx fxy Here we are assuming that
.
fxy fyy
fxy = fyx .

We then evaluate the determinant ∆ of the Hessian matrix at the


point at (a, b). That is, we find the value, at (a, b), of
µ ¶
fxx fxy
∆ = det = fxx fyy − (fxy )2 .
fxy fyy

If ∆ > 0 and fxx > 0 then (a, b) is a local minimum;

If ∆ > 0 and fxx < 0 then (a, b) is a local maximum;

If ∆ < 0 then (a, b) is a saddle point.

If ∆ = 0 then this test provides no information about the nature


of the stationary point. Other methods are required to classify the
stationary point in this case.

Example 5 Find all of the stationary points of

f (x, y) = x2 y + 3xy 2 − 3xy,

and determine their nature.


From Example 4 the stationary points of f are (0, 0), (3, 0), (0, 1)
and (1, 13 ), fx (x, y) = 2xy + 3y 2 − 3y = y(2x + 3y − 3) and
Calculus 2 Chapter 3 Applications of partial differentiation 6

fy (x, y) = x2 + 6xy − 3x = x(x + 6y − 3). Now


fxx = 2y,
fxy = 2x + 6y − 3(= fyx ),
fyy = 6x.
Thus
µ ¶
2y 2x + 6y − 3
∆ = det = 12xy − (2x + 6y − 3)2 .
2x + 6y − 3 6x
When x = y = 0, ∆ = −9 < 0, and so (0, 0) is a saddle point.
When x = 3 and y = 0, ∆ = −9 < 0, and so (3, 0) is a saddle point.
When x = 0 and y = 1, ∆ = −9 < 0, and so (0, 1) is a saddle point.
When x = 1 and y = 13 , ∆ = 3 > 0, fxx = 23 > 0, and so (1, 13 ) is a
local minimum.

Example 6 Find and classify the stationary points of


f (x, y) = xyex+y .

First we find the partial derivatives of f .


fx (x, y) = yex+y + xyex+y = y(x + 1)ex+y ,
fy (x, y) = x(y + 1)ex+y .
(Since f is symmetrical in x and y.)
Putting fx (x, y) = fy (x, y) = 0, and using the fact that ex+y 6= 0,
gives
y(x + 1) = 0, (3)
x(y + 1) = 0. (4)
From equation (3) either y = 0 or x = −1. If y = 0 then equa-
tion (4) gives x = 0. If x = −1 then equation (3) gives y = −1.
Thus the stationary points of f are (0, 0), and (−1, −1). Now
fxx = yex+1 + y(x + 1)ex+y = y(x + 2)ex+y ,
fxy = (y + 1)ex+y + x(y + 1)ex+y = (y + 1)(x + 1)ex+y ,
fyy = x(y + 2)ex+y .
Thus
µ ¶
y(x + 2)ex+y (y + 1)(x + 1)ex+y
∆ = det
(y + 1)(x + 1)ex+y x(y + 2)ex+y
¡ ¢
= e2(x+y) xy(x + 2)(y + 2) − (y + 1)2 (x + 1)2 .

When x = y = 0, ∆ = −1 < 0, and so (0, 0) is a saddle point.

When x = y = −1 , ∆ = e−4 > 0, fxx = −e−2 < 0, and so (−1, −1)


is a local maximum.
Calculus 2 Chapter 3 Applications of partial differentiation 7

Examples when ∆ = 0

We now consider the problem of classifying a stationary point (a, b)


when ∆ = 0 at (a, b). There is no single method for determining
the nature of (a, b) in this case, although it is often useful to find
f (x, y)−f (a, b) in order to determine the behaviour of f near (a, b);
an alternative method is to consider how f varies along curves (nor-
mally straight lines) passing through (a, b).

Example 7 Find and classify the stationary points of


f (x, y) = x2 + y 4 + 1.

First we find the partial derivatives of f .


fx (x, y) = 2x,
fy (x, y) = 4y 3 .
Putting fx (x, y) = fy (x, y) = 0, gives x = 0, y = 0. Thus the only
stationary points of f is (0, 0). Now
fxx = 2,
fxy = 0,
fyy = 12y 2 .
Thus
µ ¶
2 0
∆ = det
0 12y 2
= 24y 2 .
Thus, at (0, 0), ∆ = 0, and so the Hessian gives us no information
about the nature of this stationary point. However, for (x, y) 6=
(0, 0), note that
f (x, y) − f (0, 0) = x4 + y 4 + 1 − 0 − 0 − 1,
= x2 + y 4 > 0.
Thus f (x, y) > f (0, 0) for all (x, y) 6= (0, 0). Hence (0, 0) is a local
minimum.

Example 8 Find and classify the stationary points of


f (x, y) = xy 2 − x2 y 2 + x4 + 3.

First we find the partial derivatives of f .


∂f
= y 2 − 2xy 2 + 4x3 ,
∂x
∂f
= 2xy − 2x2 y.
∂y
Calculus 2 Chapter 3 Applications of partial differentiation 8

∂f ∂f
Putting = = 0 gives
∂x ∂y

y 2 − 2xy 2 + 4x3 = 0, (5)


2xy(1 − x) = 0. (6)

From equation (6) x = 0, y = 0 or x = 1. If either x = 0 or y = 0


then equation (5) gives y = 0 and x = 0, respectively. If x = 1
then equation (5) gives y 2 = 4, and so y = 2 or y = −2. Thus the
stationary points of f are (0, 0), (1, 2) and (1, −2). Now

∂ 2f
= −2y 2 + 12x2 ,
∂x2
∂ 2f
= 2y − 4xy,
∂x∂y
∂ 2f
2
= 2x − 2x2 .
∂y
At the stationary point (0, 0), each of the second derivatives is zero.
Thus ∆ = 0 at (0, 0), and so the Hessian gives no information about
the nature of this stationary point. However, for (x, y) 6= (0, 0),
note that
f (x, y) − f (0, 0) = xy 2 − x2 y 2 + x4 .
In particular, for x = y we get

f (x, x) − f (0, 0) = x3 − x4 + x4 = x3 .

Since the sign of x3 is the same as the sign of x, it follows that


f (x, x) − f (0, 0) > 0, when x > 0, and f (x, x) − f (0, 0) < 0, when
x < 0. Thus (0, 0) is a saddle point.
The nature of the other stationary points of f can be determined
using the Hessian. This is left as an exercise.

2 −y 2
Example 9 Find the stationary points of z = (x2 + y 2 )e−x ,
and determine their nature.
The partial derivatives of z are
∂z 2 2 2 2 2 2
= 2xe−x −y + (x2 + y 2 )(−2x)e−x −y = 2xe−x −y (1 − x2 − y 2 ),
∂x
∂z 2 2
= 2ye−x −y (1 − x2 − y 2 ).
∂y
(Since z is symmetrical in x and y.)
∂z ∂z 2 2
Putting = = 0, and using the fact that e−x −y 6= 0 gives
∂x ∂y

x(1 − x2 − y 2 ) = 0, (7)
y(1 − x2 − y 2 ) = 0. (8)
Calculus 2 Chapter 3 Applications of partial differentiation 9

From equation (7) either x = 0 or x2 + y 2 = 1. If x = 0 then


equation (8) gives y(1 − y 2 ) = 0, and so y = 0, −1 or 1. Thus (0, 0),
(0, 1) and (0, −1) are all stationary points of z. If x2 + y 2 = 1 then
equation (8) always holds. Thus every point on the circle x2 +y 2 = 1
is stationary points of z.
From equation (8) either y = 0 or x2 + y 2 = 1. The second possi-
bility has already been covered above; if y = 0 then equation (7)
gives x(1 − x2 ) = 0, and so x = 0, −1 or 1. Thus (0, 0), (1, 0) and
(−1, 0) are all stationary points of z.
Note that all of the points (0, 1), (0, −1), (1, 0) and (−1, 0) lie on
the circle x2 + y 2 = 1. Thus the stationary points of z are (0, 0)
and every point on the circle x2 + y 2 = 1.
Finding the second derivatives of z we get:

∂ 2z 2 2 2 2 2 2

2
= (2e−x −y + 2x(−2x)e−x −y )(1 − x2 − y 2 ) + 2xe−x −y (−2x),
∂x
2 2 ¡ ¢
= 2e−x −y (1 − 2x2 )(1 − x2 − y 2 ) − 2x2 ,
2 2 ¡ ¢
= 2e−x −y 1 − x2 − y 2 − 2x2 + 2x4 + 2x2 y 2 − 2x2 ,
2 2 ¡ ¢
= 2e−x −y 1 − 5x2 − y 2 + 2x4 + 2x2 y 2 ,
2 2 ¡ ¢
= 2e−x −y 1 − 5x2 − y 2 + 2x4 + 2x2 y 2 ,
2 2 ¡ ¢
= 2e−x −y 1 − 4x2 − (x2 + y 2 ) + 2x2 (x2 + y 2 ) ,
∂ 2z 2 2 2 2
= (−2y)2xe−x −y (1 − x2 − y 2 ) + 2xe−x −y (−2y),
∂x∂y
2 2
= −4xye−x −y (2 − x2 − y 2 ),
∂2z −x2 −y 2
¡ 2 2 2 2 2 2
¢
= 2e 1 − 4y − (x + y ) + 2y (x + y ) ,
∂y 2
(Since z is symmetrical in x and y.)

If x2 + y 2 = 1 then

∂2z 2 −y 2 ¡ ¢
= 2e−x 1 − 4x2 − (x2 + y 2 ) + 2x2 (x2 + y 2 ) ,
∂x2 ¡ ¢
= 2e−1 1 − 4x2 − 1 + 2x2 ,
= −4x2 e−1 ,
2
∂ z 2 −y 2
= −4xye−x (2 − x2 − y 2 ),
∂x∂y
= −4xye−1 ,
2 ¡ ¢
2
∂ z 2
= 2e−x −y 1 − 4y 2 − (x2 + y 2 ) + 2y 2 (x2 + y 2 ) ,
∂y 2
¡ ¢
= 2e−1 1 − 4y 2 − 1 + 2y 2 ,
= −4y 2 e−1 .
Calculus 2 Chapter 3 Applications of partial differentiation 10

Thus, in this case,


µ 2 ¶2
∂ 2z ∂ 2z ∂ z
∆ = 2 2
− ,
∂x ∂y ∂x∂y
¡ ¢¡ ¢ ¡ ¢2
= −4x2 e−1 −4y 2 e−1 − −4xye−1 ,
= 16x2 y 2 e−2 − 16x2 y 2 e−2 = 0.

Thus the Hessian gives us no information about the nature of the


stationary points on the circle x2 +y 2 = 1. To determine the nature
of these stationary points, we consider the behaviour of z on the
lines y = ax, where a ∈ R. On such a line

z(x, y) = z(x, ax),


2 −a2 x2
= (x2 + a2 x2 )e−x ,
−(a2 +1)x2
= (a2 + 1)x2 e .
2 +1)x2
Let g(x) = (a2 +1)x2 e−(a . We make the following observations
about g.

• Since g can be expressed as a function of x2 it is symmetrical


about x = 0. That is, g(x) = g(−x).
2 2
• Since a2 + 1 > 0, x2 ≥ 0 and e−(a +1)x > 0, g(x) ≥ 0 for all
x ∈ R. Furthermore, g(x) = 0 if and only if x = 0.
• As x → ±∞, g(x) → 0.

From these observations we can deduce that g(x) takes its minimum
value at x = 0. The value of g(x) then increases as we move away
from x = 0 until g reaches a maximum; the value then decreases
and approaches 0 as x approaches ±∞. The following diagram
shows g for a typical value of a.

From this we can see that every point on the circle x2 + y 2 = 1 is


a local maximum of z. We also get that (0, 0) is a local minimum.
Calculus 2 Chapter 3 Applications of partial differentiation 11

The following diagram illustrates the graph of f that clearly shows


the local maxima on the circle x2 + y 2 = 1.

0.35

0.3

0.25
0.2
0.15

0.1
-2
0.05
-1
00 y -2
-1
0 1
1
2 x 2

Genralization to functions of several variables

We can generalize the idea of a stationary point to a function


of several variables. Let U ⊆ Rn , and let f : U → R. Then
(a1 , a2 , . . . , an ) ∈ U is a stationary point of f if

fx1 (a1 , a2 , . . . , an ) = fx2 (a1 , a2 , . . . , an ) = · · · = fxn (a1 , a2 , . . . , an ) = 0.

It is also possible to classify the stationary points, but this is beyond


the scope of the course.

Example 10 Find the stationary points of

f (x, y, z) = (x + y + z)2 − 6xyz.

The partial derivatives of f are

fx (x, y, z) = 2(x + y + z) − 6yz,


fy (x, y, z) = 2(x + y + z) − 6xz,
fz (x, y, z) = 2(x + y + z) − 6xy.

Putting fx (x, y, z) = fy (x, y, z) = fz (x, y, z) gives

x + y + z = 3yz, (9)
x + y + z = 3xz, (10)
x + y + z = 3xy. (11)

Combining equations (9) and 10) gives

3yz = 3xz.
Calculus 2 Chapter 3 Applications of partial differentiation 12

Thus either z = 0 or x = y.
If z = 0 then equations (9)–(11) reduce to x+y = 0 and x+y = 3xy.
From this we get x = y = 0, and so (0, 0, 0) is a stationary point
of f .
If x = y then equations (9)–(11) reduce to 2x + z = 3xz and
2x + z = 3x2 . From this we get xz = x2 , and so either x = 0 or
x = z. If x = 0 we get x = y = z = 0, giving the stationary point
found earlier. If x = z and x 6= 0 then 2x+z = 3xz and 2x+z = 3x2
reduce to x = x2 , and so x = 1. This gives x = y = z = 1, and so
(1, 1, 1) is a stationary point of f .
Thus the stationary points of f are (0, 0, 0) and (1, 1, 1).

Exercises 3.1

∂2f
1. Let f (x, y) = 3x3 y 2 − 5xy 3 + 3x2 y 4 − y 5 . Find ∂x∂y
.

2. Determine all of the values of n such that z = 2xy + xn y 2n


satisfies
∂ 2z ∂2z
2x2 2 − y 2 2 + 18z = 36xy.
∂x ∂y
3. Find, and classify, the stationary points of
1 2
g(x, y) = x2 y − 2xy + y 3 .
2 3

4. Determine the nature of the non-zero stationary points of the


function f given in Example 8.

5. Find the stationary points of

f (x, y, z) = x3 − 3x + y 3 − 3yz + 2z 2 .

3.2 Lagrange multipliers

Let U ⊆ R2 and let f, g : U → R. We now consider the problem


of finding the maximum and minimum values of f subject to the
constraint g(x, y) = 0.

Method 1 Suppose we can rewrite g(x, y) = 0 in the form y =


h(x), for some function h. Then we can just find the maximum and
minimum values of F (x) = f (x, h(x)) using the method for calculus
of functions of one variable.
Calculus 2 Chapter 3 Applications of partial differentiation 13

Example 11 Find the maximum and minimum values of

f (x, y) = x3 + 3xy 2 + 2xy,

subject to the constraint x + y = 4.


Here g(x, y) = x + y − 4, and g(x, y) = 0 gives y = 4 − x. (So
h(x) = 4 − x.) Thus

F (x) = f (x, 4 − x),


= x3 + 3x(4 − x)2 + 2x(4 − x),
= x3 + 3x(16 − 8x + x2 ) + 8x − 2x2 ,
= 4x3 − 26x2 + 56x.

Differentiating F with respect to x we get F 0 (x) = 12x2 − 52x + 56,


and so

F 0 (x) = 0 ⇔ 12x2 − 52x + 56 = 0,


⇔ 3x2 − 13x + 14 = 0,
⇔ (3x − 7)(x − 2) = 0,
⇔ x = 2, 73 .

For x = 2, y = 2 and F (2) = 40, and for x = 73 , y = 53 and


F ( 37 ) = 39 25
27
. Thus the maximum and minimum values of f (x, y) =
3 2
x + 3xy + 2xy, subject to the constraint x + y = 4, are 40 and
25
39 27 , respectively.

Method 2 The local maximum and minimum of f (x, y) subject


to the constraint g(x, y) = 0 correspond to the stationary points of

L(x, y, λ) = f (x, y) − λg(x, y).

The variable λ is call a Lagrange multiplier.

Example 12 Consider the problem from Example 11. Here


f (x, y) = x3 + 3xy 2 + 2xy and g(x, y) = x + y − 4. So we let

L(x, y, λ) = x3 + 3xy 2 + 2xy − λ(x + y − 4).

Now
∂L
= 3x2 + 3y 2 + 2y − λ,
∂x
∂L
= 6xy + 2x − λ,
∂y
∂L
= −(x + y − 4).
∂λ
Calculus 2 Chapter 3 Applications of partial differentiation 14

∂L ∂L ∂L
Putting ∂x
= ∂y
= ∂λ
= 0 gives

3x2 + 3y 2 + 2y = λ, (12)
6xy + 2x = λ, (13)
x + y − 4 = 0. (14)

From equations (12) and (13) we get

3x2 + 3y 2 + 2y = 6xy + 2x.

We can now use equation (14) to eliminate y form the previous


equation. After simplification this gives

12x2 − 52x + 56 = 0

The solutions can now be found as in Example 11.

Note that in Example 12 we did not need to find λ in order to find


the solution to the problem.
Lagrange multipliers are particularly useful when it is difficult (or
just algebraically messy!) to rewrite g(x, y) = 0 in the form
y = h(x).

Example 13 Find the maximum and minimum values of


f (x, y) = xy 3 on the circle x2 + y 2 = a2 , where a is a positive real
number.
Let g(x, y) = x2 + y 2 − a2 . Then we want to find the maximum and
minimum values of f (x, y) subject to the constraint g(x, y) = 0.
Let
L(x, y, λ) = xy 3 − λ(x2 + y 2 − a2 ).
Then
∂L
= y 3 − 2λx,
∂x
∂L
= 3xy 2 − 2λy,
∂y
∂L
= −x2 − y 2 + a2 .
∂λ

∂L ∂L ∂L
Putting ∂x
= ∂y
= ∂λ
= 0 gives

y 3 − 2λx = 0, (15)
3xy 2 − 2λy = 0, (16)
x2 + y 2 = a 2 . (17)
Calculus 2 Chapter 3 Applications of partial differentiation 15

Multiplying equation (15) by y, and equation (16) by x gives

y 4 − 2λxy = 0, (18)
3x2 y 2 − 2λxy = 0, (19)

and so subtracting equation (19) from equation (18) we get

y 4 − 3x2 y 2 = 0.

Thus
y 2 (y 2 − 3x2 ) = 0,
and so either y = 0 or y 2 = 3x2 .
If y = 0 then equation (17) gives x2 = a2 , and so x = ±a.
If y 2 = 3x2 then equation √(17) gives 4x2 = a2 . Thus x = ± a2 , and
for each value of x, y = ± 23a .
From the preceding calculations, the stationary points of L have
³ √ ´ ³ √ ´ ³ √ ´ ³ √ ´
(x, y) = (a, 0), (−a, 0), a2 , 23a , a2 , − 23a , − a2 , 23a or − a2 , − 23a .
³ √ ´ ³ √ ´ √ 4
Now f (a, 0) = f (−a, 0) = 0, f 2 , 2 = f − 2 , − 23a = 16
a 3a a 3
3a ,
³ √ ´ ³ √ ´ √
and f a2 , − 23a = f − a2 , 23a = − 16 3
3a4 .

Thus the maximum and √ minimum values√ of f (x, y) = xy 3 on the


3 3
circle x2 + y 2 = a2 are 16 3a4 and − 16 3a4 , respectively.

Example 14 Find the point on the line 3x + 2y = 5 that is closest


to the point (3, 1).
The distance between a general point (x, y) and the point (3, 1) is
p
(x − 3)2 + (y − 1)2 .

We want to find the minimum value of this distance subject to the


constraint 3x+2y−5 = 0. In fact, it is easier to minimize the square
of the distance, and so we minimize f (x, y) = (x − 3)2 + (y − 1)2 ,
subject to the given constraint.
Let L(x, y, λ) = (x − 3)2 + (y − 1)2 − λ(3x + 2y − 5). Then

∂L
= 2(x − 3) − 3λ,
∂x
∂L
= 2(y − 1) − 2λ,
∂y
∂L
= −3x − 2y + 5.
∂λ
Calculus 2 Chapter 3 Applications of partial differentiation 16

∂L ∂L ∂L
Putting ∂x
= ∂y
= ∂λ
= 0 gives
2(x − 3) − 3λ = 0, (20)
2(y − 1) − 2λ = 0, (21)
3x + 2y = 5. (22)
Multiplying equation (20) by 2, and equation (21) by 3 gives
4(x − 3) − 6λ = 0,
6(y − 1) − 6λ = 0.
Thus 4(x − 3) = 6(y − 1). Multiplying out the brackets in this
equation, and simplifying the result gives
2x − 3y = 3. (23)
Multiplying equation (22) by 3, and equation (23) by 2 gives
9x + 6y = 15,
4x − 6y = 6.
Adding the last two equations together we get 13x = 21, and so
21
x = 13 . Using equation (23) with x = 21 13
1
we get y = 13 . Thus the
21 1
point ( 13 , 13 ) on the line on the line 3x + 2y = 5 is closest to the
point (3, 1).
Although not required, the distance of the point ( 21 , 1 ) to the point
13 13
(3, 1) is
s µ ¶ sµ ¶2 µ ¶2
21 1 21 1
f , = −3 + −1 ,
13 13 13 13
r
324 144
= +
169 169
r
468
= ,
169
r
36 6
= =√ .
13 13

Lagrange multipliers with more than one constraint

Let U ⊆ Rn , and let f, g1 , g2 , . . . , gm : U → R. To find the maxi-


mum and minimum values of f (x1 , x2 , . . . , xn ), subject to the con-
straints
g1 (x1 , x2 , . . . , xn ) = 0,
g2 (x1 , x2 , . . . , xn ) = 0,
..
.
gm (x1 , x2 , . . . , xn ) = 0,
Calculus 2 Chapter 3 Applications of partial differentiation 17

we find the stationary points of

L(x1 , x2 , . . . , xn , λ1 , λ2 , . . . , λm ) = f (x1 , x2 , . . . , xn ) − λ1 g1 (x1 , x2 , . . . , xn )


−λ2 g2 (x1 , x2 , . . . , xn ) − · · · − λm gm (x1 , x2 , . . . , xn ).

The introduced variables λ1 , λ2 , . . . , λm are called Lagrange mul-


tipliers.

Example 15 Find the maximum and minimum values of x + z


at the points where the plane 4x + y + z = 34 and the cylinder
x2 + y 2 = 40 intersect.
Here we want to find the maximum and minimum values of
f (x, y, z) = x + z, subject to the constraints g1 (x, y, z) = 0 and
g2 (x, y, z) = 0, where g1 (x, y, z) = 4x + y + z − 34 and
g2 (x, y, z) = x2 + y 2 − 40. Let

L(x, y, z, λ, µ) = x + z − λ(4x + y + z − 34) − µ(x2 + y 2 − 40).

Then
∂L
= 1 − 4λ − 2µx,
∂x
∂L
= −λ − 2µy,
∂y
∂L
= 1 − λ,
∂z
∂L
= −(4x + y + z − 34),
∂λ
∂L
= −(x2 + y 2 − 40).
∂µ
∂L ∂L ∂L ∂L ∂L
Putting ∂x
= ∂y
= ∂z
= ∂λ
= ∂µ
= 0 gives

4λ + 2µx = 1, (24)
λ + 2µy = 0, (25)
λ = 1, (26)
4x + y + z = 34, (27)
x2 + y 2 = 40. (28)

From equation (26), λ = 1. Substituting this value of λ into equa-


tions (24) and (25) gives 2µx = −3 and 2µy = −1, respectively.
Multiplying the second of these equations by 3 gives 6µy = −3, and
so
2µx = −3 = 6µy.
Now µ 6= 0 (otherwise equation (25) gives λ = 0, contrary to λ = 1)
and so x = 3y. Substituting x = 3y into equation (28) gives 10y 2 = 40.
Calculus 2 Chapter 3 Applications of partial differentiation 18

Thus y 2 = 4, and so y = ±2. When y = 2, x = 6, and when y = −2,


x = −6. From equation (27),

z = 34 − 4x − y.

Thus when y = 2 and x = 6, z = 8, and when y = −2 and x = −6,


z = 60. Now f (6, 2, 8) = 14 and f (−6, −2, 60) = 54. Thus the
maximum and minimum values of x + z at the points where the
plane 4x + y + z = 34 and the cylinder x2 + y 2 = 40 intersect are
54 and 14, respectively.

Example 16 Find the maximum and minimum values of


f (x, y, z) = xy + 4z subject to the constraints x + y + z = 0 and
x2 + y 2 + z 2 = 24.
Let

L(x, y, z, λ, µ) = xy + 4z − λ(x + y + z) − µ(x2 + y 2 + z 2 − 24).

Then
∂L
= y − λ − 2µx,
∂x
∂L
= x − λ − 2µy,
∂y
∂L
= 4 − λ − 2µz,
∂z
∂L
= −(x + y + z),
∂λ
∂L
= −(x2 + y 2 + z 2 − 24).
∂µ
∂L ∂L ∂L ∂L ∂L
Putting ∂x
= ∂y
= ∂z
= ∂λ
= ∂µ
= 0 gives

y − 2µx = λ, (29)
x − 2µy = λ, (30)
4 − 2µz = λ, (31)
x+y+z = 0, (32)
x + y2 + z2
2
= 24. (33)

From equations (29) and (30) we get

y − 2µx = λ = x − 2µy.

Thus
y − x = 2µ(x − y),
and so either x = y or µ = − 12 . We now consider these two possi-
bilities separately.
Calculus 2 Chapter 3 Applications of partial differentiation 19

If x = y then equation (32) gives 2x + z = 0, and so z = −2x.


Then equation (33) gives x2 + x2 + 4x2 = 24, and so x2 = 4. Hence
x = ±2, and so
x = ±2, y = ±2, z = ∓4.

If µ = − 12 then equations (29) and (31) give x+y = λ and z+4 = λ,


respectively. Thus
x + y = λ = z + 4,
and so

x + y − z = 4. (34)

Subtracting equation (34) from equation (32) gives 2z = −4, and


so z = −2. Adding equations (34) and (32) gives 2(x + y) = 4, and
so y = 2 − x. Putting y = 2 − x and z = −2 into equation (33) we
get

x2 + (2 − x)2 + (−2)2 = 24 ⇔ x2 + (4 − 4x + x2 ) + 4 = 24,


⇔ x2 − 2x − 8 = 0,
⇔ (x − 4)(x + 2) = 0,
⇔ x = −2, 4.

When x = −2, y = 4 and z = −2, and when x = 4, y = −2 and


z = −2.
From the preceding calculations we have found four stationary
points of L, namely (2, 2, −4), (−2, −2, 4), (−2, 4, −2) and (4, −2, −2).
Now f (2, 2, −4) = −12, f (−2, −2, 4) = 20, f (−2, 4, −2) = −16 and
f (4, −2, −2) = −16. Thus the maximum and minimum values of
f (x, y, z), subject to the given constraints, are 20 and −16, respec-
tively.

Exercises 3.2

1. Find the maximum and minimum values of f (x, y) = xy on


the ellipse 18x2 + 2y 2 = 25.

2. Find the maximum and minimum values of 2x + y on the


ellipse x2 + xy + 4y 2 + 2x + 16y + 7 = 0.

3. Find the maximum and minimum values of xy 2 on the circle


x2 + y 2 = 1.

4. Find the minimum distance from the origin to a point on the


curve where the plane 2y + 4z = 15 and the surface
z 2 = 4(x2 + y 2 ) intersect.
Calculus 2 Chapter 3 Applications of partial differentiation 20

3.3 The chain rule

In this section we generalize the chain rule for functions of one


variable to functions of more than one variable. First we extend
our idea of a real function.

Multivariable functions

Let U ⊆ Rn . A (multivariable) function f : U → Rm deter-


mines for each point x = (x1 , x2 , . . . , xn ) of U a unique point
y = (y1 , y2 , . . . , ym ) of Rm . We write f (x1 , x2 , . . . , xn ) = (y1 , y2 , . . . , ym )
or f (x) = y.
Each coordinate of y is uniquely determined by (x1 , x2 , . . . , xn ).
That is, each coordinate of y can be thought of as a function of
(x1 , x2 , . . . , xn ). So there are functions f1 , f2 , . . . , fm : U → Rm
such that

f (x1 , x2 , . . . , xn ) = (f1 (x1 , x2 , . . . , xn ), f2 (x1 , x2 , . . . , xn ), . . . , fm (x1 , x2 , . . . , xn )),

or f (x) = (f1 (x), f2 (x), . . . , fm (x)).

Example 17 Let f : R2 → R2 , with f (x, y) = (x2 y, x + 3y). Here


f1 (x, y) = x2 y and f2 (x, y) = x +3y. An alternative way of defining
f is to write f (x, y) = (f1 , f2 ) where f1 (x, y) = x2 y and
f2 (x, y) = x + 3y.

Example 18 Let f : R → R3 , with f (t) = (t, cos t, sin t). Func-


tions of one variable from R to Rm , like this one (that has m = 3),
define a parametric curve in Rm . If we plot the function f as t
varies we obtain a spiral going round the x-axis, as illustrated in
the following diagram.

Example 19 Let f : R3 → R2 , with f (x, y, z) = (u, v), where


u = x + y − z and v = 2x − y − 2z.

Let U ⊆ Rn , and let f : U → Rm with f (x) = f1 (x), f2 (x), . . . , fm (x)).


df
Then the derivative of f at x, denoted by f 0 (x) or , is the m×n
dx
∂fi
matrix whose (i, j)th entry is . That is,
∂xj
 ∂f1 ∂f1 ∂f1

∂x1 ∂x2
· · · ∂x n
 ∂f2 ∂f2 
 · · · ∂f2 
f (x) = 
0 ∂x
 ..
1 ∂x
..
2 ∂x n 
..  .
 . . . 
∂fm ∂fm ∂fm
∂x1 ∂x2
· · · ∂xn
Calculus 2 Chapter 3 Applications of partial differentiation 21

Example 20 Let f : R2 → R2 , with f (x, y) = (x2 y, x + 3y). Here


f1 (x, y) = x2 y and f2 (x, y) = x + 3y, and
à ∂f1 ∂f1 ! µ ¶
0 ∂x ∂y 2xy x2
f (x, y) = = .
∂f2 ∂f2 1 3
∂x ∂y

Example 21 Let f : R → R3 , with f (t) = (t, cos t, sin t). Then


 d   
dt
(t) 1
 d 
f 0 (t) =  dt (cos t)  =  − sin t  .
d
(sin t) cos t
dt

Example 22 Let f : R3 → R2 , with f (x, y) = (u, v), where u =


x + y − z and v = 2x − y − 2z. Then
à ! µ ¶
∂u ∂u ∂u
0 ∂x ∂y ∂z 1 1 −1
f (x, y, z) = ∂v ∂v ∂v = .
∂x ∂y ∂z
2 −1 −2

Simple cases of the chain rule

In this section we consider three simple cases of the chain rule, and
illustrate them with an example.

Case 1 For U ⊆ R2 and V ⊆ R, let g : U → R and f : V → R


and let F : U → R with

F (x, y) = (f ◦ g)(x, y) = f (g(x, y)).

Then
∂F df ∂g
= ,
∂x dg ∂x
∂F df ∂g
= .
∂y dg ∂y

Example 23 Let F (x, y) = (x2 + 3xy − y 2 )4 . Then F (x, y) = f (g)


where g = x2 + 3xy − y 2 and f = g 4 . Thus
∂F df ∂g
= ,
∂x dg ∂x
= 4g 3 (2x + 3y),
= 4(x2 + 3xy − y 2 )3 (2x + 3y).
∂F df ∂g
= ,
∂y dg ∂y
= 4g 3 (3x − 2y),
= 4(x2 + 3xy − y 2 )3 (3x − 2y).
Calculus 2 Chapter 3 Applications of partial differentiation 22

Example 24 Let f : R → R and let z = f (x2 + y 2 ). Show that


∂z ∂z
y =x .
∂x ∂y
Let g(x, y) = x2 + y 2 . Then z(x, y) = f (g(x, y)). Thus
∂z df ∂g
= ,
∂x dg ∂x
df
= 2x .
dg
∂z df ∂g
= ,
∂y dg ∂y
df
= 2y .
dg
Hence
∂z df ∂z
y = 2xy =x .
∂x dg ∂y

Case 2 For U ⊆ R and V ⊆ R2 , let g : U → R2 , with g(t) =


(u(t), v(t)), and f : V → R and let F : U → R with

F (t) = (f ◦ g)(t) = f (g(t)).

Then
dF ∂f du ∂f dv
= + .
dt ∂u dt ∂v dt

Example 25 Let F (t) = u2 + v 2 , where u = t cos t and v = sin t.


Then F (t) = f (g(t)) where g(t) = (u(t), v(t)) and f (u, v) = u2 +v 2 .
Thus
dF ∂f du ∂f dv
= + ,
dt ∂u dt ∂v dt
= 2u(cos t − t sin t) + 2v cos t,
= 2t cos t(cos t − t sin t) + 2 sin t cos t,
= 2 cos t(t cos t − t2 sin t + sin t).

Case 3 For U ⊆ R2 and V ⊆ R2 , let g : U → R2 , with g(x, y) =


(u(x, y), v(x, y)), and f : V → R, and let F : U → R with

F (x, y) = (f ◦ g)(x, y) = f (g(x, y)).

Then
∂F ∂f ∂u ∂f ∂v
= + ,
∂x du ∂x dv ∂x
∂F ∂f ∂u ∂f ∂v
= + .
∂y ∂u ∂y dv ∂y
Calculus 2 Chapter 3 Applications of partial differentiation 23

Example 26 Let u = x2 y and v = xy 3 and let F (x, y) = 2u + v 2 .


Then F (x, y) = f (g(x, y)) where f (u, v) = 2u + v 2 and g(x, y) =
(u, v) = (x2 y, xy 3 ). Thus

∂F ∂f ∂u ∂f ∂v
= + ,
∂x du ∂x dv ∂x
= 2(2xy) + 2vy 3 ,
= 4xy + 2xy 6 ,
= 2xy(2 + y 5 ).
∂F ∂f ∂u ∂f ∂v
= + ,
∂y du ∂y dv ∂y
= 2x2 + 2v(3xy 2 ),
= 2x2 + 6x2 y 5 ,
= 2x2 (1 + 3y 5 ).

Two general cases of the chain rule

Here we consider two general cases of the chain rule.

General case 1 Suppose u1 , u2 , . . . , un are functions of a single


variable t, and g is a function of n variables. Let
G(t) = g(u1 , u2 , . . . , un ). Then G is a function of t and

dG ∂g du1 ∂G du2 ∂g dun


= + + ··· + .
dt ∂u1 dt ∂u2 dt ∂un dt

Example 27 Let u = t2 , v = t and w = 1t , and let
G(t) = g(u, v, w) = uv
w
. Then

dG ∂g du ∂g dv ∂g dw
= + + ,
dt ∂u dt ∂v dt ∂w dt
³v´ ³u´ 1 1 ³ uv ´ µ 1 ¶
−2
= (2t) + ( t )+ − 2 − 2 ,
w w 2 w t
√ 1 5 √
= 2t2 t + t 2 + t2 t,
2
7 5
= t2 .
2

uv

t2 t
√ 7
Note that in Example 27, G(t) = w
= 1 = t3 t = t 2 , and so
t
dG 5
dt
= 72 t 2 . Thus, in this example, it is easier to find G as a function
of t and then differentiate it with respect to t, rather than use the
chain rule.
Calculus 2 Chapter 3 Applications of partial differentiation 24

General case 2 Suppose u1 , u2 , . . . , un are functions of m vari-


ables x1 , x2 , . . . , xn , and h is a function of n variables. Let
H(x1 , x2 , . . . , xm ) = h(u1 , u2 , . . . , un ). Then H is a function of
x1 , x2 , . . . , xm and, for each i, with 1 ≤ i ≤ m,
∂H ∂h ∂u1 ∂h ∂u2 ∂h ∂un
= + + ··· +
∂xi ∂u1 ∂xi ∂u2 ∂xi ∂un ∂xi

Example 28 Let h = uv + uw + vw, where u = y 2 , v = x2 + 2xy


and w = x2 − 2xy. Then, using the chain rule, we get
∂h ∂h ∂u ∂h ∂v ∂h ∂w
= + + ,
∂x ∂u ∂x ∂v ∂x ∂w ∂x
= (v + w)(0) + (u + w)(2x + 2y) + (u + v)(2x − 2y),
= 2(x2 − 2xy + y 2 )(x + y) + 2(x2 + 2xy + y 2 )(x − y),
= 2(x − y)2 (x + y) + 2(x + y)2 (x − y),
= 2(x − y)(x + y)(x − y + x + y),
= 4x(x − y)(x + y).
Similarly,
∂h ∂h ∂u ∂h ∂v ∂h ∂w
= + + ,
∂y ∂u ∂y ∂v ∂y ∂w ∂y
= (v + w)(2y) + (u + w)(2x) + (u + v)(−2x),
= (2x2 )(2y) + (x2 − 2xy + y 2 )(2x) + (x2 + 2xy + y 2 )(−2x),
= 4x2 y + 2x(x − y)2 − 2x(x + y)2 ,
¡ ¢
= 4x2 y + 2x (x − y)2 − (x + y)2 , Here we have used the identity:
= 4x2 y + 2x ((2x)(−2y)) , A2 − B 2 = (A + B)(A − B).
= 4x2 y − 8x2 y,
= −4x2 y.

Example 29 Let f be a function of two variables x and y, with


x = r cos θ and y = r sin θ. Find ∂f
∂x
and ∂f
∂y
in terms of r, θ, ∂f
∂r
and
∂f
∂θ
.
Using the chain rule gives
∂f ∂f ∂x ∂f ∂y ∂f ∂f
= + = cos θ + sin θ .
∂r ∂x ∂r ∂y ∂r ∂x ∂y
Similarly,
∂f ∂f ∂x ∂f ∂y ∂f ∂f
= + = −r sin θ + r cos θ .
∂θ ∂x ∂θ ∂y ∂θ ∂x ∂y
Thus
∂f ∂f ∂f
= cos θ + sin θ , (35)
∂r ∂x ∂y
∂f ∂f ∂f
= −r sin θ + r cos θ . (36)
∂θ ∂x ∂y
Calculus 2 Chapter 3 Applications of partial differentiation 25

Multiplying equation (35) by r cos θ and equation (36) by sin θ gives


∂f ∂f ∂f
r cos θ = r cos2 θ + r cos θ sin θ , (37)
∂r ∂x ∂y
∂f ∂f ∂f
sin θ = −r sin2 θ + r cos θ sin θ . (38)
∂θ ∂x ∂y
Subtracting equation (38) from equation (37) gives
∂f ∂f ∂f
r cos θ − sin θ = r(cos2 θ + sin2 θ) .
∂r ∂θ ∂x
Now, since cos2 θ + sin2 θ = 1, we get
∂f ∂f sin θ ∂f
= cos θ − .
∂x ∂r r ∂θ
∂f
Using a similar method, or by substituting for ∂x
in either equa-
tion (35) or equation (36), we get
∂f ∂f cos θ ∂f
= sin θ + .
∂y ∂r r ∂θ

Example 30 (Euler’s Theorem on homogeneous functions.)


A function f : R2 → R is homogeneous of degree n if, for all
x, y, λ ∈ R,
f (λx, λy) = λn f (x, y).
For example, f (x, y) = xy is homogeneous of degree 2 since

f (λx, λy) = (λx)(λy) = λ2 xy = λ2 f (x, y).

Suppose that g : R2 → R is homogeneous of degree n. For x, y ∈ R,


let G : R → R where

G(λ) = g(λx, λy) = g(u, v),

u = λx and v = λy.
By the chain rule
dG ∂g du ∂g dv
= + ,
dλ ∂u dλ ∂v dλ
∂g ∂g
= x +y .
∂u ∂v
However, since g is homogeneous of degree n, G(λ) = λn g(x, y).
Thus
dG
= nλn−1 g(x, y).

Comparing the two expressions for dG

gives
∂g ∂g
nλn−1 g(x, y) = x +y . (39)
∂u ∂v
Calculus 2 Chapter 3 Applications of partial differentiation 26

Equation (39) is true for all λ. If we put λ = 1 then u = x, v = y,


and equation (39) gives

∂g ∂g
ng(x, y) = x +y .
∂x ∂y
This result is known as Euler’s Theorem on homogeneous functions.

Exercises 3.3

1. Let g(x, y) = x2 + 2xy − y 2 , x = 3t − 1 and y = t2 . Use the


dg
chain rule to find .
dt
2. Let f : R → R, and let z = f (xy).
∂z ∂z
(a) Show that x −y = 0.
∂x ∂y
(b) Verify the result in part (a) for the particular case when
f (t) = 2t3 − t2 + 3t.

3. Let F be a function of u and v, where u = x2 +y 2 and v = xy.


∂F ∂F ∂F ∂F
Find and in terms of x, y, and .
∂u ∂v ∂x ∂y
3xy 3 − 2x2 y 2
4. Let g(x, y) = .
4x + 5y
(a) Show that g is homogeneous of degree 3.
(b) Verify Euler’s Theorem on homogeneous functions by
∂g ∂g
evaluating x ∂x + y ∂y directly.

3.4 Taylor series

Let U ⊆ R, and let f : U → R such that the derivative, and all the
higher derivatives, of f exist on U . For h ∈ U ,

(x − h)2 00 (x − h)n (n)


f (x) = f (h)+(x−h)f 0 (h)+ f (h)+· · ·+ f (h)+· · · .
2! n!
This is the Taylor series of f centred at h. If the series is trun-
cated after n + 1 terms we get the Taylor polynomial or Taylor
approximation of f , of degree n, centred at h.
If we replace x with x + h throughout in the Taylor series of f , we
get the following alternative way of expressing the Taylor series of
f centred at h:

x2 00 xn
f (x + h) = f (h) + xf 0 (h) + f (h) + · · · + f (n) (h) + · · · .
2! n!
Calculus 2 Chapter 3 Applications of partial differentiation 27

The following are the Taylor series of some standard functions. The
first three are centred at 0, and are valid for all x ∈ R; the other
two are centred at 1, and are valid for x ∈ R with |x| < 1.

x x2 x3 xn
e = 1+x+ + + ··· + + ...,
2! 3! n!
x3 x5 x7 x2n+1
sin x = x− + − + · · · + (−1)n + ...,
3! 5! 7! (2n + 1)!
x2 x4 x6 x2n
cos x = 1− + − · · · + (−1)n + ...,
2! 4! 6! (2n)!
x2 x3 x4 xn
ln(x + 1) = x− + − + · · · + (−1)n+1 + · · · ,
2 3 4 n
2
α(α − 1)x α(α − 1)(α − 2)x3
(1 + x)α = 1 + αx + + + ···
2! 3!
α(α − 1) . . . (α − n + 1)xn
··· + + ··· .
n!
Now let U ⊆ R2 , and let f : U → R such that the partial deriva-
tives, and all the higher partial derivatives, of f exist and are con-
tinuous on U . For (X, Y ) ∈ U ,

f (X + h, Y + k) = f (X, Y ) + (hfx (X, Y ) + kfy (X, Y )) +


1 ¡ 2 ¢
+ h fxx (X, Y ) + 2hkfxy (X, Y ) + k 2 fyy (X, Y ) +
2!
1 ¡ 3
+ h fxxx (X, Y ) + 3h2 kfxxy (X, Y ) + 3hk 2 fxyy (X, Y )+
3! ¢
k 3 fyyy (X, Y ) + · · ·
n µ ¶
1 X n n−i i (n−i,i)
··· + h kf (X, Y ) + · · · ,
n! i=0 i
µ ¶
n n!
where = , and f (r,s) denotes the (r + s)th partial The notation f (r,s) is my own
i i!(n − i)! creation and maybe
derivative of f found by differentiating r times with respect to x non-standard. I have not found
and s times with respect to y. any standard notation in any
books!
This is the Taylor series of f centred at (X, Y ). If the series
is truncated after n + 1 terms we get the Taylor polynomial or
Taylor approximation of f , of degree n, centred at (X, Y ).

Example 31 Expand x2 y + 3y − 2 in powers of x − 1 and y + 2.


Let f (x, y) = x2 y + 3y − 2. Putting x = 1 + h and y = −2 + k we
can obtain the required expansion by finding the Taylor series of f
Calculus 2 Chapter 3 Applications of partial differentiation 28

centred at (1, −2). Now

fx (x, y) = 2xy,
fy (x, y) = x2 + 3,
fxx (x, y) = 2y,
fxy (x, y) = 2x,
fyy (x, y) = 0,
fxxx (x, y) = 0,
fxxy (x, y) = 2,
fxyy (x, y) = 0,
fyyy (x, y) = 0,

and all higher derivatives are 0. Thus

f (x, y) = f (1 + h, −2 + k),
= f (1, −2) + hfx (1, −2) + kfy (1, −2)
1 ¡ 2 ¢
+ h fxx (1, −2) + 2hkfxy (1, −2) + k 2 fyy (1, −2)
2!
1 ¡ 2 ¢
+ 3h kfxxy (1 − 2) ,
3!
1¡ ¢ 1
= −10 − 4h + 4k + −4h2 + 4hk + 0k 2 + (6h2 k),
2 6
2 2
= −10 − 4h + 4k − 2h + 2hk + h k,
= −10 − 4(x − 1) + 4(y + 2) − 2(x − 1)2 + 2(x − 1)(y + 2) + (x − 1)2 (y + 2),

since h = x − 1 and k = y + 2.

Example 32 Find the Taylor approximation of degree 1 for


12
f (x, y) =
x2 + xy + y 2

centred at (2,2). Use your answer to estimate f (2.1, 1.8).


The partial derivatives of f are

12(2x + y)
fx (x, y) = − ,
(x2
+ xy + y 2 )2
12(x + 2y)
fy (x, y) = − 2 .
(x + xy + y 2 )2

Now, f (2, 2) = 1, fx (2, 2) = − 21 and fy (2, 2) = − 21 . Thus

f (2 + h, 2 + k) = f (2, 2) + hfx (2, 2) + kfy (2, 2),


1 1
= 1 − h − k.
2 2
Calculus 2 Chapter 3 Applications of partial differentiation 29

Using this Taylor approximation for f with h = 0.1 and k = −0.2


we get

f (2.1, 1.8) = f (2 + h, 2 + k),


1 1
≈ 1 − × 0.1 − × (−0.2),
2 2
= 1.05.

Note that f (2.1, 1.8) ≈ 1.04987, so the approximation given by the


Taylor is quite good in this case.

Exercises 3.4 1. Find the Taylor polynomial of degree 2 of


xy + 1
g(x, y) = centred at the point (0, 0). Use your an-
x+2
swer to estimate g(0.1, 0.2).

S-ar putea să vă placă și