I have shown you a sequence of approximations to the value of a function. It is usually the case that the higher the approximation you use the more accurate a result you get (not always true). Some of the numerical evidence given above demonstrates this.
This opens up the possibility that if we imagine the sequence of successive approximations going on for ever then the error will eventually dwindle away to nothing and, in the limiting case, we will not have an approximation but will get the exact result.
For elementary functions this is usually true, at least for some values of a and h.
The resulting infinite series is called the Taylor Series of the function f (x) expanded about the point a. If it converges to the value of the function we get
If a = 0 then the series is known as the Maclaurin Series of the function f, which we might write as:
Taylor (and Maclaurin) series are tremendously important in many areas of mathematics. They are often used to define functions.
To write down the Maclaurin series we need to know the value at x = 0 of every derivative of the function. This is usually the practical problem that we face in working out Taylor series. In this case it is easy since every derivative of ex is ex and this has value 1 at x = 0. So the Maclaurin series becomes
This is another case where it is reasonably easy to work out the values of all the derivatives at x = 0. The first few derivatives of sin x are
It turns out that the Maclaurin series of sin x is valid for all values of x. So we have
Using the same results you can show that the Maclaurin series of cos x, which is also valid for all values of x is
Put x = 1.23 into the Maclaurin series for sin x and start adding up terms. Carry on doing this until the terms being added on `obviously' don't affect the answer to 6 decimal places. Stop there.
| Term | value | sum so far |
| x | +1.23 | 1.23 |
| - x3/3! | -0.31014450 | 0.9198555 |
| x5/5! | +0.02346088 | 0.9433164 |
| - x7/7! | -0.00084509 | 0.9424713 |
| x9/9! | +0.00001776 | 0.9424890 |
| - x11/11! | -0.00000024 | 0.9424888 |
| x13/13! | +0.00000000 | 0.9424888 |
Which gives us sin 1.23 = 0.942489 to 6 decimal places (and is correct).
Note that this is a slightly dangerous game and is not quite like what was happening with the Newton method. By stopping the calculation early I have missed out an infinite number of terms (because the series goes on for ever). The individual terms are certainly getting very small, but an awful lot of very small terms can add up to something enormous. You do need to be a bit careful--especially if the terms are getting small quite slowly.
As a warning, consider the infinite series
Here we have to be a bit careful. ln x is not defined at x = 0, so there is no hope of a Maclaurin series for ln x.
Instead, it is usual to look at the Maclaurin series of f (x) = ln(1 + x) (or the Taylor series of ln x expanded about x = 1 if you prefer).
The first few derivatives are:
, f''(x) = -
, f'''(x) =
, f(n)(0) = (- 1)n - 1(n - 1)!