Anda di halaman 1dari 6

TAYLORS THEOREM

1. Taylor Expansions and the Second Derivative Test


In ordinary single variable calculus, we have Taylors theorem, which asserts that for any integer n,
any function f (x) has an expansion (called the n-th order Taylor expansion) of the form
1
1
1
f (x + h) = f (x) + f 0 (x)h + f 00 (x)h2 + f 000 (x)h3 + f (n) (x)hn + Rn (h)
2
6
n!
where f (n) (x) denotes the n-th derivative of f at x and Rn (h) is a function that vanishes very
rapidly as h approaches 0, in the sense that
Rn (h)
=0
hn
For example, the first order Taylor expansion of f is
lim

h0

f (x + h) = f (x) + f 0 (x)h + R1 (h)


where limh0

R1 (h)
h

= 0 and the second order Taylor expansion is


1
f (x + h) = f (x) + f 0 (x)h + f 00 (x)h2 + R2 (h)
2

where limh0

R2 (h)
h2

= 0.

For us the first and second order Taylors expansions will be the most important ones. For many
functions, and certainly for all functions we encounter, we can let n be infinite and obtain a power
series expansion, called the Taylor series of f :

X
1 (n)
1
1
f (x)hn
f (x + h) = f (x) + f 0 (x)h + f 00 (x)h2 + f 000 (x)h3 + =
2
6
n!
n=0

This is of course provided all derivatives f (n) (x) exist. For example, f (x) = x has no Taylor series
1
around x = 0, as f 0 (x) = 2x is not defined at 0. However, it does have a Taylor series expansion
around x = 1. If in the formulas above we replace x with a fixed number a and x + h with a, we obtain
the perhaps more familiar form of the Taylor series

X 1
1
1
f (n) (a)(x a)n
f (x) = f (a) + f 0 (a)(x a) + f 00 (a)(x a)2 + f 000 (a)(x a)3 + =
2
6
n!
0
In the special case when a = 0, this yields the so called Maclaurin series of f :

X 1
1
f (x) = f (0) + f 0 (0)x + f 00 (0)x2 + =
f (n) (0)xn
2
n!
0
Of course the two formulations are equivalent. We will use the first one, as we are not so much
interested in trying to simplify f (x); rather, we are interested in understanding the behavior of f (x+h)
for small h, knowing f (x).
1

TAYLORS THEOREM

Example: Expand f (x) = ex as a power series around a = 0.


We have f 0 (x) = ex = f 00 (x) = f 000 (x) . The values of the derivatives at a = 0 are all 1. So, Taylors
theorem asserts that

X
1
1
1
1
1 n
f (x) = f (0) + f 0 (0)x + f 00 (0)x2 + f 000 (0)x3 + = 1 + x + x2 + x3 + =
x
2
6
2
6
n!
n=0

Exercise: Expand x as a power series around x = 1. Expand sin x and cos x as power series
around x = 0, and verify that the derivative of cos x is sin x straight from the series.

Recall now the second derivative test for minima and maxima of functions:
Theorem: Suppose x0 is a critical point of y = f (x). Then
(1) x0 is a maximum if f 00 (x0 ) < 0
(2) x0 is a minimum if f 00 (x0 ) > 0
The test yields no information if f 00 (x) = 0.
You probably saw a proof of this result using a geometric argument involving convexity. A simple
proof can be given using Taylors theorem:
Proof of Second Derivative Test: The second Taylors expansion yields at the critical point x0 ,
for any small h:
1
1
f (x0 + h) f (x0 ) = f 0 (x0 )h + f 00 (x0 )h2 + R2 (h) = f 00 (x0 )h2 + R2 (h)
2
2
since f 0 (x0 ) = 0, as we are at a critical point. If f 00 (x0 ) > 0, then 21 f 00 (x0 )h2 > 0, and so
f 00 (x0 )h2 + R2 (h) > 0 for small h (this is because R2 (h) is much smaller than 21 f 00 (x0 )h2 , so, even if it
were a negative number, 12 f 00 (x0 )h2 + R2 (h) would still be positive). Therefore, f (x0 + h) f (x0 ) > 0.
This means that the values of f (x) around the point x0 are in fact bigger than the value f (x0 ), so
f (x0 ) is in fact a minimum.
Exercise: Use a similar argument to show that if f 00 (x0 ) < 0, f (x0 ) is a maximum.

2. Multivariable Taylor Series


You may not be surprised to that there is an analogue of Taylors theorem for functions of several
variables. We restrict our attention here to functions z = f (x, y) of two variables. Mathematically,
the case of more than two variables is not any more difficult, however the necessary notation quickly
gets out of hand (or becomes quite abstract). The first order Taylor expansion of z = f (x, y) is
f (x + h, y + k) = f (x, y) +

f
f
h+
k + R1 (h, k)
x
y

where
R1 (h, k)
=0
(h,k)(0,0) |(h, k)|
We have already encountered this formula, which we called the theorem of linear approximaf
tion, as in particular it implies that the (linear) function f
x h + y k is a rather good approximation
lim

TAYLORS THEOREM

to the difference f (x + h, y + k) f (x, y).


Similarily, the second Taylor expansion of z = f (x, y) is
f (x + h, y + k) = f (x, y) +

f
f
f
1 2f
f 2
h+
k + ( 2 h2 + 2
hk + 2 k 2 ) + R2 (h, k)
x
y
2 x
xy
y

where now
lim
(h,k)(0,0)

R2 (h, k)
=0
|(h, k)|2

The second Taylor expansion could also be called for example the theorem of quadratic approximation, as it asserts in particular that
f (x + h, y + k) f (x, y)

f
f
1 2f
f 2
f
h+
k + ( 2 h2 + 2
hk + 2 k 2 )
x
y
2 x
xy
y

is a very good approximation, but by a quadratic function instead of a linear one now. The quadratic
approximation is a much better approximation than the (already good) linear one; of course, it is an
approximation by a more complicated quantity. The first and second Taylor expansions are the two
statements we are after. Only the second one is new, as we already saw linear approximation. I will
now state for completeness the general form of Taylor expansion for z = f (x, y), but you should ignore
these in a first reading. The n-th Taylor expansion is

f (x+h, y+k) = f (x, y)+

n
f
f
1 2f
f
f 2
1 X nf
h+ k+ ( 2 h2 +2
hk+ 2 k 2 )+ (
hni k i )+Rn (h, k)
x
y
2 x
xy
y
n! i=0 xni y i

where
lim
(h,k)(0,0)

Rn (h, k)
=0
|(h, k)|n

(so the more terms we consider, the better the approximations become) and the full Taylor Series
expansion is

f (x+h, y+k) = f (x, y)+

n
X
f
f
1 2f
f
f 2
1 X f n
h+ k+ ( 2 h2 +2
hk+ 2 k 2 )+ =
(
hni k i )
ni y i
x
y
2 x
xy
y
n!
x
n=0
i=0

1
times the sum of all possible partial derivatives of
So the n-th term of the Taylor expansion is n!
order n, multiplied by the appropriate powers of h and k. For example, the third term explicitly is

1 3f 3
3f 2
3f
3f 3
2
( 3h +
h
k
+
hk
+
k )
6 x
x2 y
xy 2
y 3
Derivation of the Multivariable Taylor Expansion from the Single Variable One:
Consider the function of t defined by g(t) = f (x + th, y + tk). Usual Taylor expansion about t = 0
gives
1
g(t) g(0) = g 0 (0)t + g 00 (0)t2 +
2
By the chain rule,

TAYLORS THEOREM

f
f
h+
k
x
y
2f
2f 2
2f
2f 2
2f
2f 2
2f 2
h
+
k
=
h
+
2
k
hk
+
hk
+
hk
+
g 00 (0) =
x2
yx
xy
y 2
x2
yx
y 2
g 0 (0) =

f
f
= yx
. We set t = 1. We have g(1) g(0) = f (x + h, y + k) f (x, y), so the second
since xy
Taylor expansion follows. The higher Taylor expansions are obtained similiarily (though tediously).

3. The Second Derivative Test for two Variables


Theorem: Suppose (x0 , y0 ) is a critical point of z = f (x, y). Consider the matrix of second partial
derivatives:
"

2f
x2
2f
xy

2f
yx
2f
y 2

and its determinant


=

2f 2f
2f 2

(
)
x2 y 2
xy

(1) If

2f
x2

> 0 and > 0, (x0 , y0 ) is a minimum.

(2) If

2f
x2

< 0 and > 0, (x0 , y0 ) is a maximum

(3) If < 0, (x0 , y0 ) is a saddle point.


The test yields no information if = 0.
Example: Consider the function f (x, y) = x2 + y 2 . Its critical points are at (0, 0). The matrix of
second partial derivatives is

2
0

0
2

so 2 f /x2 > 0, = 4 > 0. Thus the point is a minimum (this is geometrically obvious).
Example: Consider the function f (x, y) = 10 x2 2y 2 + 2xy. Its critical points are at (0, 0)
(check this), and the matrix of second partial derivatives is

2
2


2
4

so = 8 4 > 0 and 2 f /x2 = 2 < 0. So the point is a maximum.


Example: Consider the function f (x, y) = y 2 x2 . Its critical points are at (0, 0) again, and the
matrix of second partials is

2
0


0
2

so < 0. Therefore, the point is a saddle point.


Example: Consider the function f (x, y) = x2 + y 2 + 4xy. We have critical points at

TAYLORS THEOREM

f
= 2x + 4y = 0
x
f
= 2y + 4x = 0
y
which implies x = 2y = 4x, that is, x = y = 0. The matrix of second partial derivatives is

2
4

4
2

so = 4 16 = 12 < 0. So the point is a saddle! Pay attention to this example. It is surprising,


because both 2 f /x2 and 2 f /y 2 are positive, so f has a minimum with respect to both the x and
y direction!
We can in fact use the theorem to prove that some of the problems we have solved in the past,
where we simply found critical points and argued that for physical reasons these critical points are
minima/maxima are sound.
Example: Show that the box with minimal surface area and fixed volume is a cube. We must
minimize S = xy + xz + yz subject to the constraint V = xyz = c. In other words, we have to
minimize the function S = xy + c/y + c/x. We find
c
S
=y 2 =0
x
x
S
c
=x 2 =0
y
y
which yields by standard manipulations that x = y. In particular, this implies x = y = c1/3 , and
so also z = c1/3 . So the only candidate for such a box is a cube. However, it is not clear yet that this
point is indeed a minimum. The second derivative matrix for S is

2c/x3
1

 
1
2
=
2c/y 3
1


1
2

So > 0 and 2 f /x2 > 0, and the point is indeed a minimum.


Proof of Second Derivative Test: We mimic the proof of the one variable case. To ease notation,
2
2
2f
, c = yf2 . At a critical point (x0 , y0 ), the second Taylor approximation yields for
set a = xf2 , b = xy
any small vector (h, k)
f (x + h, y + k) f (x, y)

1 2f 2
2f
2f
1
( 2h +2
hk + 2 k 2 ) = (ah2 + 2bhk + ck 2 )
2 x
xy
y
2

So the question of whether (x0 , y0 ) is a minimum, maximum, or saddle, reduces to the questions,
respectively:
(1) Is (ah2 + 2bhk + ck 2 ) > 0 for all (h, k)?
(2) Is (ah2 + 2bhk + ck 2 ) < 0 for all (h, k)? or
(3) Is (ah2 + 2bhk + ck 2 ) > 0 for some (h, k) and < 0 for others?

TAYLORS THEOREM

This last problem is in fact not so hard - it is essentially the quadratic formula. We can complete
the square and rewrite
b
b2
ah2 + 2bhk + ck 2 = a(h + k)2 + (c )k 2 .
a
a
Note that (h + ab k)2 is always positive. So the sign of a(h + ab k)2 equals the sign of a. Note also
2
that the sign of (c ba ) is the same as the sign of = ac b2 if a is positive and opposite if a is
negative. We have
2

(1) If a > 0, and > 0, both terms in a(h + ab k)2 + (c ba )k 2 are positive, hence ah2 + 2bhk + ck 2
is always positive.
2

(2) If a < 0, and > 0, both terms in a(h + ab k)2 + (c ba )k 2 are negative, hence ah2 + 2bhk + ck 2
is always negative.
(3) If < 0, and a > 0, then the first term is positive and the second negative, and ah2 +2bhk+ck 2
can attain both positive and negative values.
(4) if < 0, and a < 0, the first term is negative and the second positive, and ah2 + 2bhk + ck 2
can attain both positive and negative values.
But this is exactly the second derivative test.

Anda mungkin juga menyukai