Previous page : Power Series - an introduction
Next page : Taylor series
A polynomial of degree n can perfectly fit through n-1 points (not above each other) so maybe an infinite degree polynomial could fit infinitely many points along a continuous function?
Let us say we have some function f (x) and we want to express it as a power series as
To retrieve the constants we can first set x=0. This will give us
Next, we differentiate our function to get
This gives us
We repeat with the second derivative to get
This gives us
We repeat this to get
All and all we get
This is the Mclaurin series expansion. This is often called just the series expansion or Mclauritn expansion of the function. It is also often called a Taylor expansion of the function, since, as we will see on the next page, Mclauritn expansions are just a special case of the Taylor expansion. In the following pages, I will mainly call them Taylor expansions or series expansions.
As we saw on the previous page we might not have an equality all for all values of x, and this we shall examine after a few examples.
A first few Examples
Let us start with something we already know
Is useful is to make a table of derivatives, and the corresponding values when x=0.
k | f (k)(x) | f (k)(0) |
0 | 0! | |
1 | 1! | |
2 | 2! | |
3 | 3! | |
4 | … | … |
(Observe that the 0th derivative is the same as doing nothing.)
This gives us
as expected. We shall look at what values this is true for later on. As you may verify we also have
This you can do by either doing the series expansion using the derivatives or by just substituting –x for x in the above expansion.
The exponential function, ex
This is probably the most well-known. Since the successive derivatives of ex are all ex and e0=1 we get that
k | f (k)(x) | f (k)(0) |
0 | ex | 1 |
1 | ex | 1 |
2 | ex | 1 |
3 | ex | 1 |
4 | … | … |
This gives us
This converges very fast if |x|<1 since the factorial function grows so fast. In the graph below ex and the first few terms of the series expansion is graphed.
One can see that the more terms we add, the closer to ex we get. We can also see that it sways back and forth widely when x is negative. At this scale the graph of the series with 30 terms would be indistinguishable from the graph of ex.
The sine and cos functions
To start with, for this to work, x must be in radians.
Our table of derivatives will now be
k | f (k)(x) | f (k)(0) |
0 | sin x | 0 |
1 | cos x | 1 |
2 | –sin x | 0 |
3 | –cos x | –1 |
4 | sin x | 0 |
5 | … | … |
As we can see, the pattern will then repeat.
This gives us
To get the series expansion of the cos function we may just start at the second row in the table to get
A practical use
The above series are often used in computers to calculate the mentioned functions – either in software or in hardware. The values of x is scaled first though.
Say we need to calculate e21.4. We start with the fact that e21.4 = e21 e0.4.
To calculate e21 we calculate e2 , e4 , e8 and e16 by successive squaring. Then since e21= e16 e4 e we only need to multiply those numbers. That would give us six multiplications (instead of 20). This would give us 1318815734.48321 calculated with 15 significant figures (accentually with 64 bit floating point numbers).
Then we calculate e0.4 using the series above.
k | series up to k |
0 | 1.00000000000000 |
1 | 1.40000000000000 |
2 | 1.48000000000000 |
3 | 1.49066666666667 |
4 | 1.49173333333333 |
5 | 1.49181866666667 |
6 | 1.49182435555556 |
7 | 1.49182468063492 |
8 | 1.49182469688889 |
9 | 1.49182469761129 |
10 | 1.49182469764018 |
11 | 1.49182469764123 |
12 | 1.49182469764127 |
13 | 1.49182469764127 |
14 | 1.49182469764127 |
As you can see the value does not change after the 12th term. Finally, multiplying these results together gives us e21.4≈1967441884.33997.
Similarly, we scale the angles to the first quadrant (or actually, even to the first octant) since all the values of cos and sine can be rescaled to that interval. We have for example that
Using the series for cos we get that already after 9 terms (k=16) the value does not change any more, so this ought to be a good approximation of sin(410°).
Up a level : Power SeriesPrevious page : Power Series - an introduction
Next page : Taylor seriesLast modified: