lunes, 25 de agosto de 2014

Series de Maclaurin. calculo de Pi con Serie

http://www.intmath.com/series-expansion/2-maclaurin-series.php

2. Maclaurin Series

By M. Bourne
In the last section, we learned about Taylor Series, where we found an approximating polynomial for a particular function in the region near some value x=a.
We now take a particular case of Taylor Series, in the region near x=0. Such a polynomial is called the Maclaurin Series.
The infinite series expansion for f(x) about x=0 becomes:
f(x)f(0)+f(0)x +f(0)2!x2 +f(0)3!x3 +fiv(0)4!x4 +...
f(0) is the first derivative evaluated at x=0, f(0) is the second derivative evaluated at x=0, and so on.
[Note: Some textbooks call the series on this page "Taylor Series" (which they are, too), or "series expansion" or "power series".]

Example: Expanding sin x

Find the Maclaurin Series expansion for f(x)=sin x.
We need to find the first, second, third, etc derivatives and evaluate them at x = 0. Starting with:
f(x) = sin x
f(0) = 0
First dervative:
f '(x) = cos x
f '(0) = cos 0 = 1
Second dervative:
f ''(x) = −sin x
f ''(0) = −sin 0 = 0
Third dervative:
f '''(x) = −cos x
f '''(0) = −cos 0 = −1
Fourth dervative:
f iv(x) = sin x
f iv(0) = sin 0 = 0
We observe that this pattern will continue forever.
Now to substitute the values of these derivatives into the Maclaurin Series:
f(x) f(0)+f(0)x +f(0)2!x2 +f(0)3!x3 +fiv(0)4!x4+...
We have:
sin x=0+(1)(x) +0 +13!x3 +0 +15!x5 +0 +17!x7+...
This gives us:
sin x=x16x3+1120x5 15040x7+...
We plot our answer
sin x=x16x3 +1120x5 15040x7+...
to see if the polynomial is a good approximation to f(x)=sin x.
Maclaurin series - cubic and sine curve
We observe that our polynomial (in red) is a good approximation to f(x)=sin x (in blue) near x=0. In fact, it is quite good between -3 ≤ x ≤ 3.

Example: Expanding ex

Find the Maclaurin Series expansion of f(x)=ex.

Exercise

Find the Maclaurin Series expansion of cos x.

Finding Pi Using Infinite Series

In the 17th century, Leibniz used the series expansion of arctan x to find an approximation of π.
We start with the first derivative:
ddxarctan x=11+x2
The value of this derivative when x=0 is 1. That is, f(0)=1.
Similarly for the subsequent derivatives:
d2dx2arctan x=2x(1+x2)2
f(0)=0
d3dx3arctan x=23x21(1+x2)3
f(0)=2
d4dx4arctan x=24xx21(1+x2)4
fiv(0)=0
d5dx5arctan x=245x410x2+1(1+x2)5
fv(0)=24
Now we can substitute into the Maclaurin Series formula:
arctan x0+(1)x+02x223!x3+04!x4+245!x5=xx33+x55x77+...
Considering that (see the 45-45 triangle)
arctan1=π4
we can substitute x=1 into the above expression and get the following expansion for π
π=4(113+1517+...)
All very well, but it was not a good way to find the value of π because this expansion converges very slowly.
Even after adding 1000 terms, we don't have 3 decimal place accuracy.
4n=01000(1)n2n+1=3.142591654...
(We know now that π = 3.141 592 653 5..., and we know many other more efficient ways to find π.)
Here's the graph of y = arctan x (in blue) compared to the polynomial we just found (in red).
arctan-approximation

No hay comentarios:

Publicar un comentario