Maclaurin series of the exponential function

By Martin McBride, 2022-11-12
Tags: maclaurin series exponential
Categories: maclaurin series


In this section we will use the Maclaurin series to find a polynomial approximation to the exponential function, ex.

The general formula for the Maclaurin series for the function f(x) is:

Maclaurin expansion general equation

Where:

  • f(0) is the value of the function for x = 0.
  • f'(0) is the value of the first derivative function for x = 0.
  • f''(0) is the value of the second derivative function for x = 0.
  • f'''(0) is the value of the third derivative function for x = 0.
  • And so on.

To apply this to the exponential function, we need to calculate those derivatives.

Derivatives the exponential function

The exponential function is unique in that ex is its own derivative, that is:

This also applies to the second derivative (and therefore to the third derivative and so on):

We also know that any positive number raised to the power zero is one, so e0 is one. This means that when x= 0, the value of the exponential function and every nth derivative of the exponential function is equal to one.

This means that:

  • f(0) = 1
  • f'(0) = 1
  • f''(0) = 1
  • etc

Maclaurin series of exponential function

Taking the general equation above:

Maclaurin expansion general equation

We can replace f(0) and all of its derivatives with 1, giving:

Maclaurin expansion of exponential function

Or using sigma notation (as described here):

Maclaurin expansion of exponential function sigma notation

A graphical illustration of the Maclaurin expansion

Here is an animation that shows the first 4 terms of the expansion being added in one by one:

Maclaurin expansion of exponential function animation

One way to gain an intuitive insight into how the Maclaurin expansion works is to look at graphs of the approximation as we add the terms one by one.

Step 1

Taking just the first term of the expansion gives us:

Maclaurin expansion of exponential function 1 term

This graph shows the expansion (in yellow) and the exponential function (in black):

Maclaurin expansion of exponential function graph 1 term

This approximation is not very good, it is just a horizontal straight line which is nothing like the exponential function.

However, if we look at the two functions when x = 0 we see that they both have the same value, 1.

The first term of a Maclaurin series ensures that the value of the series equals the value of the function at x = 0

Step 2

Taking the first two terms of the expansion gives us:

Maclaurin expansion of exponential function 2 terms

Here is the graph:

Maclaurin expansion of exponential function graph 2 terms

This approximation is still not very good. However, you will notice that the line now forms a tangent to the curve.

This means that when x = 0, the two functions have the same value and the same slope.

The second term of a Maclaurin series ensures that the slope of the series equals the slope of the function at x = 0

Step 3

Taking the first three terms of the expansion gives us:

Maclaurin expansion of exponential function 3 terms

Here is the graph:

Maclaurin expansion of exponential function graph 3 terms

This approximation is now looking a bit better. The curves are roughly similar for values of x between -0.5 and +0.5.

This is because the approximation now matches the value, slope and second derivative of the curve at x = 0.

The third term of a Maclaurin series ensures that the second derivatives of the series and the function are equal at x = 0

Step 4

Taking the first four terms of the expansion gives us:

Maclaurin expansion of exponential function 4 terms

Here is the graph:

Maclaurin expansion of exponential function graph 4 terms

This approximation is now looking quite convincing. The curves are roughly similar for values of x between -1 and +1.

The approximation now matches the value, slope, and the second and third derivatives of the curve at x = 0.

The fourth term of a Maclaurin series ensures that the third derivatives of the series and the function are equal at x = 0

See also



Join the GraphicMaths Newletter

Sign up using this form to receive an email when new content is added:

Popular tags

adder adjacency matrix alu and gate angle area argand diagram binary maths cartesian equation chain rule chord circle cofactor combinations complex polygon complex power complex root cosh cosine cosine rule cpu cube decagon demorgans law derivative determinant diagonal directrix dodecagon ellipse equilateral triangle eulers formula exponent exponential exterior angle first principles flip-flop focus gabriels horn gradient graph hendecagon heptagon hexagon horizontal hyperbola hyperbolic function infinity integration by substitution interior angle inverse hyperbolic function inverse matrix irregular polygon isosceles trapezium isosceles triangle kite koch curve l system locus maclaurin series major axis matrix matrix algebra minor axis nand gate newton raphson method nonagon nor gate normal not gate octagon or gate parabola parallelogram parametric equation pentagon perimeter permutations polar coordinates polynomial power product rule pythagoras proof quadrilateral radians radius rectangle regular polygon rhombus root set set-reset flip-flop sine sine rule sinh sloping lines solving equations solving triangles square standard curves star polygon straight line graphs surface of revolution symmetry tangent tanh transformations trapezium triangle turtle graphics vertical volume of revolution xnor gate xor gate