Home > Algebra, Trigonometry > Maclaurin Series with example sin(x)

Maclaurin Series with example sin(x)

September 23rd, 2009

The Maclaurin series is a way of approximating a function f(x) using a power series of x. It only works on functions you can differentiate but you can gain any level of accuracy by stopping the series at different points. It is equal to the taylor series for a function about 0. One example of a use of the Maclaurin series is to calculate a value for sin(x).

The Maclaurin series for a function f(x) is as follows:

 f(x) = f(0) + xf'(0) + \frac{x^2 f''(x)}{2!} + \frac{x^3 f'''(x)}{3!} +
or
f(x) = \sum_{i=0}^{\infty} \frac{x^i f^i (0)}{i!}

Example sin(x)

An expression for sin(x) can be calculated using this method. Firstly we must decide what level of accuracy to go to, for the example we will go to the 3rdterm. The next step is to differentiate sinx. Firstly let f(x) = sinx

then

f(0) = 0 f'(x) = cos(x) \quad \quad \quad \Rightarrow \quad \quad \quad f'(0) = 1 f''(x) = -sin(x) \quad \quad \quad \Rightarrow \quad \quad \quad f''(0) = 0 f'''(x) = -cos(x) \quad \quad \quad \Rightarrow \quad \quad \quad f'''(0) = -1 f''''(x) = sin(x) \quad \quad \quad \Rightarrow \quad \quad \quad f''''(0) = 0 f'''''(x) = cos(x) \quad \quad \quad \Rightarrow \quad \quad \quad f'''''(0) = 1

We can now combine these into the series to get

f(x) = sin(x) = x - \frac{x^3}{3!} + \frac{x^5}{5!} +

f(x) = sin(x) = x - \frac{x^3}{6} + \frac{x^5}{120} +

which can be used to calculate the value of sin(x) — though only for the radian measure of angle.

eg)
sin(\frac{\pi}{3}) = \frac{\pi}{3} - \frac{\pi ^3}{6 \cdot 3^3} + \frac{\pi ^5}{120 \cdot 3^5} + \simeq 0.8663

Which is approximately the value you would get if you type sin(pi/3) into a calculator.