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!)x^2` `+(f’’’(0))/(3!)x^3` `+(f^("iv")(0))/(4!)x^4` `+...`
`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 1: Expanding sin x
Find the Maclaurin Series expansion for `f(x) = sin x`.
We plot our answer
`f(x)=x-1/6x^3` `+1/120x^5` `-1/5040x^7+...`
to see if the polynomial is a good approximation to `f(x) = sin x`.
We observe that our polynomial (in grey) is a good approximation to `f(x) = sin x` (in green) near `x = 0`. In fact, it is quite good between -π ≤ x ≤ π.
Don't miss the Taylor and Maclaurin Series interactive applet where you can explore this concept and the other examples on this page further.
Example 2: Expanding `e^x`
Find the Maclaurin Series expansion of `f(x) = e^x`.
Here's a graph of the answer we just obtained, and the original `f(x) = e^x` graph:
We can see the approximation is very close to the original `f(x)=e^x` in the region `-2 < x < 2.5`.
Find the Maclaurin Series expansion of `cos x`.
Here's a graph showing the answer we just obtained, and the original `f(x) = cos(x)` graph:
Once again, we observe that our polynomial (in grey) is a good approximation to `f(x) = cos x` (in green) between -π ≤ 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:
The value of this derivative when `x = 0` is `1`. That is, `f’(0)=1`.
Similarly for the subsequent derivatives:
Now we can substitute into the Maclaurin Series formula:
`arctan\ x ~~0+(1)x+0/2x^2-2/(3!)x^3` `+0/(4!)x^4+24/(5!)x^5+...`
Considering that (see the 45-45 triangle)
we can substitute `x = 1` into the above expression and get the following expansion for π
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.
`4sum_(n=0)^1000((-1)^n)/(2n+1)=3.142\ 591\ 654...`
(We noe know that π = 3.141 592 653 5..., and we know many other more efficient ways to find `pi`.)
Here's the graph of y = arctan x (in green) compared to the polynomial we just found (in grey).
Let's now find the value of `pi` using the same expansion, but this time we substitute `x=1/sqrt(3)`. We'll use the fact `tan (pi/6) = 1/sqrt(3)`.
Now `arctan\ x ~~x-x^3/3+x^5/5-x^7/7+...`
` ~~1/sqrt(3)-(1/sqrt(3))^3/3+(1/sqrt(3))^5/5-(1/sqrt(3))^7/7` `+...`
The value of `pi` will be `6` times the above value.
Using this expansion, we only need to use 18 steps to get 10 decimal place accuracy for `pi`. That is:
`6sum_(n=0)^18((-1)^n)(1//sqrt(3))^(2n+1)/(2n+1)` `=6 xx 0.523\ 598\ 775\ 61` `=3.141\ 592\ 653\ 6...`
Why is it so much more accurate here?
The approximating curve in this case has what's called a radius of convergence (limited domain) where it "works" (that is, converges). Outside that domain, the approximation diverges.
We'll see another example of this situation in the Taylor and Maclaurin Series interactive applet.