A Taylor series example 18 January 2007 X

advertisement
A Taylor series example1
18 January 2007
The Taylor series for sin x is given by
sin x =
X
n
odd(−1)
(n−1)/2 x
n
n!
=x−
x3
x5
x7
+
−
+ O(x9 )
6
120 5040
(1)
This is worked out from the general formula for the Taylor series about x = 0
f (x) =
X
n = 0∞
1 (n)
f (0)
n!
(2)
using f (x) = sin x so f 0 (x) = cos x, f 00 (x) = − sin x, f 000 (x) = − cos x and so on, with
sin 0 = 0 and cos 0 = 1. Now, writing
fN (x) =
X
(−1)
(n−1)/2 x
n
(3)
n!
n odd, n≤N
so, for example,
x5
x3
+
(4)
6
120
here are some graphs to show the Taylor series in action, the sine is in gray, the series in
black. After a few terms it gets good near x = 0, but even at O(x13 ) is isn’t good beyond
x = P i. then
f5 (x) = x −
1.2
1
0.8
y 0.6
0.4
0.2
-2
2
x
-0.2
4
6
-0.4
-0.6
-0.8
-1
f1 (x)
-1.2
1
Conor Houghton, houghton@maths.tcd.ie, see also http://www.maths.tcd.ie/~houghton/231
1
1.2
1
0.8
y 0.6
0.4
0.2
-2
2
x
-0.2
4
6
-0.4
-0.6
-0.8
-1
f3 (x)
-1.2
1.2
1
0.8
y 0.6
0.4
0.2
-2
2
x
-0.2
4
6
-0.4
-0.6
-0.8
-1
f5 (x)
-1.2
1.2
1
0.8
y 0.6
0.4
0.2
-2
2
x
-0.2
4
6
-0.4
-0.6
-0.8
-1
f7 (x)
-1.2
1.2
1
0.8
y 0.6
0.4
0.2
-2
2
x
-0.2
4
6
-0.4
-0.6
-0.8
-1
f13 (x)
-1.2
2
Download