Download Lecture 18: Taylor`s approximation revisited Some time ago, we

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Function of several real variables wikipedia , lookup

Derivative wikipedia , lookup

Sobolev space wikipedia , lookup

Multiple integral wikipedia , lookup

History of calculus wikipedia , lookup

Generalizations of the derivative wikipedia , lookup

Chain rule wikipedia , lookup

Integral wikipedia , lookup

Fundamental theorem of calculus wikipedia , lookup

Transcript
Lecture 18: Taylor’s approximation revisited
Some time ago, we proved
Theorem Let f be a function on an interval [a, b] and c a point in the interior of the
interval. Suppose that f is n − 2 times continuously differentiable on [a, b], that the n − 1st
derivative of f exists everywhere on the interior of (a, b) and that the nth derivative of f
exists at c. Then
f (n) (c)
(x − c)n + o((x − c)n ).
f (x) = f (c) + f (c)(x − c) + . . . +
n!
0
With the fundamental theorem of Calculus in hand, the proof is much easier to give,
so we review it.
Proof We prove this by induction on n, the base case being n = 2. We know from
the definition of the derivative f 00 )(c) of f 0 that
f 0 (x) = f 0 (c) + (x − c)f 00 (c) + o(x − c).
Now, we use the fundamental theorem of calculus to obtain
f (x) − f (c)
Z x
f 0 (y)dy
Zc x
.
(f 0 (c) + (y − c)f 00 (c)(y − c) + o(y − c))dy
c
= f 0 (c)(x − c) +
f 00 (c)
(x − c)2 + o((x − c)2 )
2
Having obtained the base case, we are now ready to do the induction. We assume
the theorem for n − 1. Now under the hypotheses, we can Taylor approximate the first
derivative
n−1
X f (j+1) (c)
f 0 (x) =
(x − c)j + o((x − c)n−1 ).
j!
j=0
Now, we repeat the proof of the base case, with this new information
f (x) − f (c)
Z x
f 0 (y)dy
c
Z
x n−1
X
(
c
=
j=0
n−1
X
j=0
f (j+1) (c)
(y − c)j + o((y − c)n−1 ).)dy
j!
f (j+1) (c)
(x − c)j+1 + o((x − c)n ).
(j + 1)!
1
(n)
The expression in the Theorem, f (c) + f 0 (c)(x − c) + . . . + f n!(c) (x − c)n is referred
to as the Taylor polynomial of f at c. It is, of course, a polynomial of degree n which
approximates f at c. We know that the error is o((x − c)n ) so that it is getting small quite
fast as x approaches c. But, of course, the definition of o(.) involves a limit, and we don’t
know how fast that limit converges. We saw an application where we might need that
information last time. We used Taylor’s approximation to develop numerical methods
of integration, but we don’t know yet exactly what the errors depend on, so we don’t
yet have a good method of predicting what step size we would need to get a respectable
approximation of the integral. We rectify this now. We will need to use integration by
parts.
Lemma Let f and g be once continuously differentiable functions on the interval [a, b]
then
Z
b
(f 0 (x)g(x) + f (x)g 0 (x))dx = f (b)g(b) − f (a)g(a).
a
Proof Just apply the product rule to convert the integral to
Z
b
a
d
(f (x)g(x))dx,
dx
and apply the fundamental theorem of calculus.
Theorem (Taylor’s theorem with remainder) Assume f is n + 1 times continuously differentiable in the interval [a, b] having c in the interior. Then for every x ∈ [a, b]
we have
n
X
f (j) (c)
f (x) =
(x − c)j + Rn (x),
j!
j=0
with
1
Rn (x) =
n!
Z
x
(x − y)n f (n+1) (y)dy.
c
Here the expression Rn (x) is referred as the remainder in the nth Taylor approximation
of f at a.
Proof We will prove this, of course, by induction. The base case, n = 0 is nothing
more than the fundamental theorem of calculus, so we will assume that
1
Rn (x) =
n!
Z
x
(x − y)n f (n+1) (y)dy,
c
and we will try to calculate Rn+1 under the assumption that f has n + 2 continuous
derivatives. We observe that as long as the result holds
Rn+1 (x) = Rn (x) −
f (n+1) (c)
(x − c)n+1 .
(n + 1)!
2
Now we combine this with the induction hypothesis, taking the n + 1 factor from the
Rx
n+1
denominator to turn (x−c)n+1 into an integral from c to x, namely (x−c)
= c (x−y)n dy
n+1
Rn+1 (x)
Z
Z
1 x
f (n+1) (c) x
n (n+1)
=
(x − y) f
(y)dy −
(x − y)n dy
n! c
n!
c
Z
1 x
(x − y)n (f (n+1) (y) − f (n+1) (c))dy
=
n! c
Z x
1
=
(x − y)n+1 f (n+2) (y)dy.
(n + 1)! c
Here, the last is by integration by parts. We integrate (x − y)n and differentiate
f (n+1) (y) − f (n+1) (c). Note that the boundary terms vanish since (x − y)n vanishes at
y = x and f (n+1) (y) − f (n+1) (c) vanishes at y = c.
Having this remarkable formula for Rn , we look for a way to apply it. We first write
down a general result about integrals of continuous functions which is in analogy with the
mean value theorem.
Theorem (Mean Value theorem for integrals) Let f and g be continuous functions on [a, b]. Assume that g never changes sign on [a, b]. Then there is c ∈ (a, b) so
that
Z b
Z b
f (x)g(x)dx = f (c)
g(x)dx.
a
a
Proof Let
Rb
M=
a
f (x)g(x)dx
.
Rb
g(x)dx
a
Suppose that every on (a, b), we have that f (x) < M . Then
Z
b
Z
f (x)g(x)dx < M
a
b
g(x)dx,
a
which is a contradiction.
Similarly, it is not the case that f (x) > M for every x in (a, b). Then since f is
continuous, by the intermediate value theorem, there must be c so that f (c) = M .
We now apply this mean value theorem for integrals to our expression for the remainder
in Taylor’s approximation.
Z
1 x
Rn (x) =
(x − y)n f (n+1) (y)dy.
n! c
3
Observe that
1
n!
x
Z
(x − y)n dy =
c
1
(x − c)n+1 .
(n + 1)!
Thus we observe that there is some d between c and x so that
Rn (x) =
f (n+1) (d)(x − c)n+1
.
(n + 1)!
We conclude
f (x) =
n
X
f (j) (c)
j=0
j!
(x − c)j +
f (n+1) (d)(x − c)n+1
.
(n + 1)!
If, as last time, we begin with an a priori estimate for the (n + 1)st derivative, we
obtain an estimate for the error term.
4