You are on page 1of 6

# TAYLOR’S THEOREM

1. Taylor Expansions and the Second Derivative Test
In ordinary single variable calculus, we have Taylor’s 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

h→0

f (x + h) = f (x) + f 0 (x)h + R1 (h)
where limh→0

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 limh→0

R2 (h)
h2

= 0.

For us the first and second order Taylor’s 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) = 2√x 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

This means that the values of f (x) around the point x0 are in fact bigger than the value f (x0 ). Therefore. 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 . The first order Taylor expansion of z = f (x. f (x0 ) is a maximum. k) ∂x ∂y where R1 (h. however the necessary notation quickly gets out of hand (or becomes quite abstract). k)| We have already encountered this formula. which we called the theorem of linear approxima∂f tion. 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. So. k) =0 (h. Exercise: Use a similar argument to show that if f 00 (x0 ) < 0.2 TAYLOR’S THEOREM Example: Expand f (x) = ex as a power series around a = 0. y) is f (x + h. If f 00 (x0 ) > 0. as we are at a critical point. y) + ∂f ∂f h+ k + R1 (h. Multivariable Taylor Series You may not be surprised to that there is an analogue of Taylors’ theorem for functions of several variables. A simple proof can be given using Taylors’ theorem: Proof of Second Derivative Test: The second Taylor’s expansion yields at the critical point x0 . y + k) = f (x. 12 f 00 (x0 )h2 + R2 (h) would still be positive). You probably saw a proof of this result using a geometric argument involving convexity. the case of more than two variables is not any more difficult.0) |(h. so. so f (x0 ) is in fact a minimum. 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. We restrict our attention here to functions z = f (x. as in particular it implies that the (linear) function ∂f ∂x h + ∂y k is a rather good approximation lim . We have f 0 (x) = ex = f 00 (x) = f 000 (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. and verify that the derivative of cos x is − sin x straight from the series.k)→(0. then 21 f 00 (x0 )h2 > 0. Expand sin x and cos x as power series around x = 0. The values of the derivatives at a = 0 are all 1. f (x0 + h) − f (x0 ) > 0. y) of two variables. Recall now the second derivative test for minima and maxima of functions: Theorem: Suppose x0 is a critical point of y = f (x). Mathematically. even if it were a negative number. 2.

k)|2 The second Taylor expansion could also be called for example the theorem of quadratic approximation. k)|n (so the more terms we consider.TAYLOR’S THEOREM 3 to the difference f (x + h. y+k) = f (x. of course. y)+ ∞ n X ∂f ∂f 1 ∂2f ∂f ∂f 2 1 X ∂f n h+ k+ ( 2 h2 +2 hk+ 2 k 2 )+· · · = ( hn−i k i ) n−i y i ∂x ∂y 2 ∂x ∂x∂y ∂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. y) is f (x + h. For example. y + k) − f (x. but by a quadratic function instead of a linear one now. it is an approximation by a more complicated quantity. the third term explicitly is 1 ∂3f 3 ∂3f 2 ∂3f ∂3f 3 2 ( 3h + h k + hk + k ) 6 ∂x ∂x2 ∂y ∂x∂y 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. Similarily. the better the approximations become) and the full Taylor Series expansion is f (x+h. the second Taylor expansion of z = f (x. The first and second Taylor expansions are the two statements we are after. y) ≈ ∂f ∂f 1 ∂2f ∂f 2 ∂f h+ k + ( 2 h2 + 2 hk + 2 k 2 ) ∂x ∂y 2 ∂x ∂x∂y ∂y is a very good approximation.0) Rn (h. y). y) + ∂f ∂f ∂f 1 ∂2f ∂f 2 h+ k + ( 2 h2 + 2 hk + 2 k 2 ) + R2 (h. y)+ n ∂f ∂f 1 ∂2f ∂f ∂f 2 1 X ∂nf h+ k+ ( 2 h2 +2 hk+ 2 k 2 )+· · · ( hn−i k i )+Rn (h. y+k) = f (x. y + tk). k) =0 |(h. y + k) = f (x.k)→(0. 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. y + k) − f (x.0) R2 (h. k) =0 |(h. Only the second one is new. multiplied by the appropriate powers of h and k. The n-th Taylor expansion is f (x+h. . as we already saw linear approximation. k) ∂x ∂y 2 ∂x ∂x∂y ∂y n! i=0 ∂xn−i ∂y i where lim (h. The quadratic approximation is a much better approximation than the (already good) linear one. k) ∂x ∂y 2 ∂x ∂x∂y ∂y where now lim (h.k)→(0. 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. as it asserts in particular that f (x + h.

Consider the matrix of second partial derivatives: " ∂2f ∂x2 ∂2f ∂x∂y ∂2f ∂y∂x ∂2f ∂y 2 # and its determinant ∆= ∂2f ∂2f ∂2f 2 − ( ) ∂x2 ∂y 2 ∂x∂y (1) If ∂2f ∂x2 > 0 and ∆ > 0. (x0 . so the second since ∂x∂y Taylor expansion follows. 0) (check this). Therefore. the point is a saddle point. y0 ) is a critical point of z = f (x.4 TAYLOR’S 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 ∂y∂x ∂x∂y ∂y 2 ∂x2 ∂y∂x ∂y 2 g 0 (0) = 2 2 ∂ f ∂ f = ∂y∂x . 3. The Second Derivative Test for two Variables Theorem: Suppose (x0 . y) = 10 − x2 − 2y 2 + 2xy. The matrix of second partial derivatives is  2 0 0 2  so ∂ 2 f /∂x2 > 0. y). Example: Consider the function f (x. The test yields no information if ∆ = 0. y0 ) is a minimum. y0 ) is a maximum (3) If ∆ < 0. (x0 . 0). Its critical points are at (0. So the point is a maximum. Its critical points are at (0. (x0 . y) = x2 + y 2 . We have g(1) − g(0) = f (x + h. y + k) − f (x. y0 ) is a saddle point. We set t = 1. y) = x2 + y 2 + 4xy. ∆ = 4 > 0. and the matrix of second partials is  −2 0  0 2 so ∆ < 0. Its critical points are at (0. 0) again. Thus the point is a minimum (this is geometrically obvious). (2) If ∂2f ∂x2 < 0 and ∆ > 0. y) = y 2 − x2 . Example: Consider the function f (x. We have critical points at . Example: Consider the function f (x. and the matrix of second partial derivatives is  −2 2  2 −4 so ∆ = 8 − 4 > 0 and ∂ 2 f /∂x2 = −2 < 0. y). Example: Consider the function f (x. The higher Taylor expansions are obtained similiarily (though tediously).

k) f (x + h. So the point is a saddle! Pay attention to this example. In other words. and the point is indeed a minimum. b = ∂x∂y any small vector (h. because both ∂ 2 f /∂x2 and ∂ 2 f /∂y 2 are positive. y + k) − f (x. the second Taylor approximation yields for set a = ∂∂xf2 . It is surprising. and so also z = c1/3 . or saddle. respectively: (1) Is (ah2 + 2bhk + ck 2 ) > 0 for all (h. where we simply found critical points and argued that for physical reasons these critical points are minima/maxima are sound. it is not clear yet that this point is indeed a minimum. 2 2 ∂2f . k) and < 0 for others? . we have to minimize the function S = xy + c/y + c/x. In particular. However. Example: Show that the box with minimal surface area and fixed volume is a cube. this implies x = y = c1/3 . y0 ) is a minimum. So the only candidate for such a box is a cube. We must minimize S = xy + xz + yz subject to the constraint V = xyz = c. that is. We find c ∂S =y− 2 =0 ∂x x ∂S c =x− 2 =0 ∂y y which yields by standard manipulations that x = y. reduces to the questions. At a critical point (x0 . y) ≈ 1 ∂2f 2 ∂2f ∂2f 1 ( 2h +2 hk + 2 k 2 ) = (ah2 + 2bhk + ck 2 ) 2 ∂x ∂x∂y ∂y 2 So the question of whether (x0 . 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. maximum. k)? or (3) Is (ah2 + 2bhk + ck 2 ) > 0 for some (h. c = ∂∂yf2 . x = y = 0. Proof of Second Derivative Test: We mimic the proof of the one variable case. 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.TAYLOR’S THEOREM 5 ∂f = 2x + 4y = 0 ∂x ∂f = 2y + 4x = 0 ∂y which implies x = −2y = 4x. y0 ). The matrix of second partial derivatives is  2 4 4 2  so ∆ = 4 − 16 = −12 < 0. k)? (2) Is (ah2 + 2bhk + ck 2 ) < 0 for all (h. To ease notation.

6 TAYLOR’S THEOREM This last problem is in fact not so hard . (4) if ∆ < 0. and ah2 +2bhk+ck 2 can attain both positive and negative values. and ah2 + 2bhk + ck 2 can attain both positive and negative values.it is essentially the quadratic formula. We have 2 (1) If a > 0. . both terms in a(h + ab k)2 + (c − ba )k 2 are negative. 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. both terms in a(h + ab k)2 + (c − ba )k 2 are positive. then the first term is positive and the second negative. the first term is negative and the second positive. hence ah2 + 2bhk + ck 2 is always positive. We can ”complete the square” and rewrite b b2 ah2 + 2bhk + ck 2 = a(h + k)2 + (c − )k 2 . But this is exactly the second derivative test. 2 (2) If a < 0. hence ah2 + 2bhk + ck 2 is always negative. and ∆ > 0. and a > 0. (3) If ∆ < 0. and ∆ > 0. 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. and a < 0.