10.12 Maclaurin series

Some functions can be written as an "infinite power series", which is a sum in the form


How would we find the values of a,b,c,d,a,b,c,d,... for a specific function?

Differentiation! Let’s take sin(x)\sin(x):

sin(x)\displaystyle\sin(x) =c1+c2x+c3x2+c4x3+\displaystyle=c_{1}+c_{2}x+c_{3}x^{2}+c_{4}x^{3}+... (10.113)
cos(x)\displaystyle\cos(x) =c2+2c3x+3c4x2+\displaystyle=c_{2}+2c_{3}x+3c_{4}x^{2}+... (By differentiating both sides)
sin(x)\displaystyle-\sin(x) =2c3+32c4x+43c5x2\displaystyle=2c_{3}+3\cdot 2c_{4}x+4\cdot 3c_{5}x^{2}... (By differentiating both sides again)
cos(x)\displaystyle-\cos(x) =321c4+432c5x\displaystyle=3\cdot 2\cdot 1c_{4}+4\cdot 3\cdot 2c_{5}x (By differentiating both sides once more)
sin(x)\displaystyle\sin(x) =4321c5x\displaystyle=4\cdot 3\cdot 2\cdot 1c_{5}x (Differentating again)
\displaystyle... (10.114)

How do we find the value of a coefficient? Another algebra trick - plug in a specific value for xx, in this case 0. This is because every term in the power series, except the constant one, depends on xx and thus is zero when xx is zero. In order to find the value of the next constant, we can just differentiate, which brings all the powers down by one.


c1\displaystyle c_{1} =sin(0)\displaystyle=\sin(0)
c2\displaystyle c_{2} =cos(0)\displaystyle=\cos(0)
2c3\displaystyle 2c_{3} =sin(0)\displaystyle=-\sin(0)
321c4\displaystyle 3\cdot 2\cdot 1c_{4} =cos(x)\displaystyle=-\cos(x)
4321c5\displaystyle 4\cdot 3\cdot 2\cdot 1c_{5} =sin(x)\displaystyle=\sin(x)

This leads directly to the general case (i.e. the value of cnc_{n})

cn=sin(n)(0)n!c_{n}=\frac{\sin^{(n)}(0)}{n!} (10.115)

Where sin(n)(0)sin^{(n)}(0) means the value of the nth derivative at the point x=0x=0. Therefore, overall, we can write the power series of any function1818 18 Note that are some additional conditions - the function must be infinitely differentiable (we can keep differentiating forever) and each derivative must be defined at the point x=0x=0. as

f(x)=s=0[f(s)(0)s!xs]f(x)=\sum_{s=0}^{\infty}\left[\frac{f^{(s)}(0)}{s!}x^{s}\right] (10.116)

Maclaurin series of common functions

This is just a list, which is also given in the formula booklet.

10.12.1 Derivation of the sum of an infinite geometric series

Example 10.12.1

Prove the formula for a sum of an infinite geometric series using Maclaurin series.

We know1919 19 If not, see Section 3.4.2 that

11z=1+z+z2+z3+\frac{1}{1-z}=1+z+z^{2}+z^{3}+... (10.117)

This can be derived by finding an expression for the nnth derivative of 11z\frac{1}{1-z}.

Finding the first few derivatives,

ddz[11z]=ddz[(1z)1]\frac{d}{dz}\left[\frac{1}{1-z}\right]=\frac{d}{dz}\left[(1-z)^{-1}\right] (10.118)

By the chain rule, this gives that the first derivative is equal to

(1)(1)(1z)2=(1z)2(-1)\cdot(-1)(1-z)^{-2}=(1-z)^{-2} (10.119)

The second derivative is equal to

2(1z)32(1-z)^{-3} (10.120)

The third is

123(1z)41\cdot 2\cdot 3(1-z)^{-4} (10.121)

And so on (this can be proved by induction). Therefore, the Maclaurin expansion for the function is

11z\displaystyle\frac{1}{1-z} =k0[kth derivative at 0k!zk]\displaystyle=\sum_{k\geqq 0}\left[\frac{\text{kth derivative at 0}}{k!}z^{k}\right] (10.122)
=k0[k!(10)k1k!zk]\displaystyle=\sum_{k\geqq 0}\left[\frac{k!(1-0)^{-k-1}}{k!}z^{k}\right] (10.123)
=k0[zk]\displaystyle=\sum_{k\geqq 0}\left[z^{k}\right] (10.124)
=1+z+z2+z3+\displaystyle=1+z+z^{2}+z^{3}+... (10.125)

10.12.2 A lower bound for the factorial function

This is a really cool method (which I discovered originally on Terence Tao’s blog) to find a lower bound for the factorial function2020 20 The factorial function is defined as n!=n(n1)1n!=n\cdot(n-1)\cdot...\cdot 1. The first step is to consider the Maclaurin series for exe^{x}, i.e.

ex=n0xnn!e^{x}=\sum_{n\geqq 0}\frac{x^{n}}{n!} (10.126)

If we specify that x>0x>0, then all the terms in the series are positive, so any individual term of the series will be smaller than the term we have selected and thus we can select the term where x=nx=n (n>0n>0) which satisfies

exnnn!e^{x}\geqq\frac{n^{n}}{n!} (10.127)


n!nnexn!\geqq\frac{n^{n}}{e^{x}} (10.128)

This is closely related to Stirling’s formula (a closed-form approximation for the factorials which shows up in quite a few places) - the linked blog post gives the full derivation.