0% found this document useful (0 votes)
18 views

Taylor Series Part A

Uploaded by

muhammad.786685
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Taylor Series Part A

Uploaded by

muhammad.786685
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

TAYLOR SERIES AND POLYNOMIALS

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.

(a) For n = 2 and x 0=0 , we have


''
f ( 0) 2 1
P2 (x )=f ( 0 )+ f ' ( 0 ) x + x =1− x 2
2! 2

To approximate f (0.02),
we use P2 (x ) at x = 0.02,
Implies P2 (0.02)=¿0.9998

While exact value is


cos 0.02=0.9998000067 ,

−9
Therefore , Actual error=6.67 ×10 .

For n = 3 and x 0=0 , we have


'' ' ''
f ( 0) 2 f ( 0) 3 1
P3 (x )=f ( 0 )+ f ' ( 0 ) x + x+ x =1− x 2
2! 3! 2
P3 (0.02)=¿ 0.9998, same as P2 ( 0.02 ) .

For n = 4 and x 0=0 , we have


'' ''' (4 )
f ( 0) 2 f ( 0) 3 f (0 ) 4
P4 (x)=f ( 0 ) + f ' ( 0 ) x + x + x + x
2! 3! 4!
1 2 1 4
¿ 1− x + x
2! 4!

⟹ 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 ) .

where ξ(x) is some (generally unknown) number between 0 and x.


Therefore, the upper bound of error for P2 (x ) will be
f ( ξ ( x ) ) 3 sin ξ ( x ) 3
' ''
R2 ( x )= x= x
3! 6

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

Since, | cos ξ(x)| ≤ 1, so R3 ( 0.02 ) ≤6.67 × 10−9 .

Applications of Taylor’s Theorem


We can write a differentiable function f (x) in the form of infinite series or a finite
polynomial.
Example (i)
2 3
x x
x
e =1+ x + + +… about x 0=0 as series or
2! 3 !
2
x x
e =1+ x + as polynomial of degree 2,
2!
2 3
x x x
e =1+ x + + as polynomial of degree 3.
2! 3 !
Example (ii)
Find Taylor series and polynomials of degree 4 and 5 for the function sin x about x 0=0 and
use the polynomial to find the actual error at x=0.1∧x=0.5 .
Solution: f ( x )=sin x , f ( 0 )=0
f ' ( x )=cos x , f ' ( 0 )=1
'' ''
f ( x )=−sin x , f ( 0 )=0
'' ' '' '
f ( x )=−cos x , f ( 0 )=−1
(4 ) (4)
f ( x )=sin x , f ( 0 ) =0

'' '' ' (4 )


' f (0 ) 2 f (0 ) 3 + f (0 ) 4
f ( x )=f ( 0 ) + f ( 0 ) x + x+ x+ x +…
2! 3! 4!
3 5 7
x x x
sin x=x− + − +…
3! 5! 7!
3 3 5
x x x
¿ sin x ≈ P 4 ( x )=x − ∧sin x ≈ P5 ( x )=x − +
3! 3 ! 5!

To approximate f (0.05) at x=0.1, we use P4 ( x )∧P5 (x ) at x = 0.1, respectively


Implies P4 (0.1)=¿0.09983333¿ P5 (0.1)=0.09983341667 .

While exact value is sin 0.1=0.09983341665 ,


−8 −11
Therefore , Actual error for P4 ( 0.1 ) =8.7 ×10 ∧for P5 ( 0.1 )=2× 10 , resp .

* But if we check error at x=0.5 , with P5 (0.5)=¿ 0.4794271

and exact value is sin 0.5=0.4794255 ,

Therefore , Actual error=0.0000016 , greater error at point farther from x 0=0 .

You might also like