Taylor Series Part A
Taylor Series Part A
Taylor series and polynomials are of basic importance and used extensively in numerical
analysis, in approximating a differentiable function and its integral etc.
Taylor Series
Then, for x ∈ [a, b], 𝑓(𝑥) can be expressed as the infinite series (called Taylor’s Series)
Let f and its higher order derivatives be continuous on [a, b] and x0 be a fixed point in [a, b].
'' ( n) ( n+1 )
' f ( x0 ) f ( x0) f ( x0 )
f ( x )=f ( x 0 ) + f ( x 0 ) ( x−x 0 ) + ( x−x 0 )2+ …+ ( x−x 0 )n + ( x−x 0 )n+1 +…
2! n! ( n+1 ) !
Taylor Polynomial
( n)
f ( x0)
If the Taylor’s series is truncated to the term ( x−x 0 )n , then the polynomial obtained is
n!
called the Taylor’s polynomial
'' ( n)
' f ( x0) f ( x0 )
f ( x ) ≈ Pn ( x )=f ( x 0 ) + f ( x 0 ) ( x−x 0 ) + ( x−x 0 )2+ …+ ( x−x 0 )n
2! n!
Theorem (Taylor’s Theorem)
Suppose f ∈ Cn [a, b], that f (n+1) exists on [a, b], and x0 ∈ [a, b]. For every x ∈ [a, b], there
exists a number ξ(x) between x0 and x with
f ( x )=P n ( x ) + Rn (x )
Where
'' (n)
' f ( x0 ) f ( x0)
Pn ( x )=f ( x 0 ) + f ( x 0 ) ( x−x 0 ) + ( x−x 0 )2 +…+ ( x −x0 ) n
2! n!
and
(n+1)
f ( ξ (x) ) n+1
Rn ( x )=
(n+ 1)!
( x−x 0 ) .
Here Pn ( x ) is the nth Taylor polynomial for f about x0, and Rn ( x ) is the remainder term (or
truncation error) associated with Pn ( x ). Since the number ξ(x) in the truncation error Rn ( x )
depends on the value of x at which the polynomial Pn ( x ) is being evaluated, it is a function
of the variable x. However, we should not expect to be able to explicitly determine the
function ξ(x). Taylor’s Theorem simply ensures that such a function exists, and that its
value lies between x and x0.
In the case x0 = 0, the Taylor polynomial is often called a Maclaurin polynomial, and the
Taylor series is often called a Maclaurin series.
The term truncation error in the Taylor polynomial refers to the error involved in using a
truncated, or finite, summation to approximate the sum of an infinite series.
Example. Let f (x) = cos x and x0 = 0. Determine
(a) the second, third and fourth Taylor polynomial for f about x0; and use these polynomials
to approximate f (0.02) by finding the actual error.
(b) an upper bound for |f (0.02) − Pn ( 0.02 )| using the error formula R2 ( x ), compare it to the actual
error.
Solution. Since f ∈ C∞(R), Taylor’s Theorem can be applied for any n ≥ 0. Also,
' '' '' ' ( 4)
f ( x )=−sin x , f ( x )=−cos x , f ( x )=sin x ,∧f ( x )=cos x ,
So
' '' '' ' (4)
f ( 0 )=1 , f ( 0 )=0 , f ( 0 )=−1, f ( 0 )=0 ,∧f ( 0 ) =1.
To approximate f (0.02),
we use P2 (x ) at x = 0.02,
Implies P2 (0.02)=¿0.9998
−9
Therefore , Actual error=6.67 ×10 .
⟹ P4 (0.02)=¿0.99980001
(b) To find upper bound of error we use formula
(n+1)
f ( ξ (x) ) n+1
Rn ( x )=
(n+ 1)!
( x−x 0 ) .
The error bound is much larger than the actual error. This is due to the poor bound we used
for | sin ξ(x)|.
As from calculus, we have | sin x| ≤ |x|. Since 0 ≤ ξ < 0.02, we could have used the fact that
| sin ξ(x)| ≤ 0.02 in the error formula, producing the bound R2 ( 0.02 )=¿2.67 × 10−8.
Similarly, the upper bound of error for P3 (x ) will be
f
(4)
(ξ ( x ) ) 4 cos ξ ( x ) 4
R3 ( x )= x= x
4! 24