Maclaurin series (HL)

This requires working knowledge of sigma notation and familiarity with calculus.

Whereas a line segment can approximate a function at a small interval, a Maclaurin series can approximate the same function at a larger interval, by using a high-order polynomial.

Contents

Formula

f(x)=f(0)+f(0)1!x+f(0)2!x2++fn(0)n!xn+f(x) = f(0) + \frac{f^\prime(0)}{1!}x + \frac{f^{\prime\prime}(0)}{2!}x^2 + \dots + \frac{f^{n}(0)}{n!}x^n +\dots

where k!k! is the factorial of positive integer kk.

In sigma notation

f(0)+n=1f(n)(0)n!xnf(0) + \sum_{n = 1}^\infty \frac{f^{(n)}(0)}{n!} x^n

In practice, a few number of terms is sufficient, as long as x0x_0 is within the radius of convergence of 00. Factorials grow faster than polynomials; if the series converges for all real numbers, then there will (most likely) be a factorial in the denominator of each simplified term.

A few examples

ex=1+x+x22!+x33!++xnn!+\e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \dots + \frac{x^n}{n!} + \dots
sinx=xx33!+x55!++(1)n(2n+1)!x2n+1+\sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} + \dots + \frac{(-1)^n}{(2n + 1)!}x^{2n+1} + \dots
11x=1+x+x2+x3++xn+,    x<1\frac{1}{1-x} = 1 + x + x^2 + x^3 + \dots + x^n + \dots, \;\; \lvert x\rvert < 1

The last series has a radius of convergence of x<1\lvert x\rvert < 1. Testing radius of convergence is not something you would expect, as it requires convergence tests for sequences, which are beyond scope of this course. However, this last one is a geometric series, which converges for x<1\lvert x\rvert < 1

Reminder that the generalized binomial theorem is

(1+x)n=1+nx+n(n1)2!x2+n(n1)(n2)3!x3+(1+x)^n = 1 + nx + \frac{n(n-1)}{2!}x^2 + \frac{n(n-1)(n-2)}{3!}x^3 +\dots

Similar to geometric series, this converges for x<1\lvert x \rvert < 1.

Arithmetics

substitution

Example: Find Maclaurin series expansion for 11+x\displaystyle\frac{1}{1+x}.


Here xx in 11x\frac{1}{1-x} and its expansion are all replaced with x-x. This means

11+x=1x+x2x3++(x)n+,x<1\frac{1}{1+x} = 1 - x + x^2 - x^3 + \dots + (-x)^n + \dots, \lvert x\rvert < 1 \qed

(1)n(-1)^n means positive for even nn and negative for odd nn.

differentiation

Example: Find Maclaurin series expansion for cosx\displaystyle\cos x.


cosx=ddxsinx\displaystyle\cos x = \frac{\d }{\d x} \sin x, so

cosx=ddxn=0(1)n(2n+1)!x2n+1\cos x = \frac{\d }{\d x} \sum_{n = 0}^\infty \frac{(-1)^n}{(2n + 1)!}x^{2n+1}

Note that same series can be expressed with different starting index. Here the general form above starts with n=0n = 0. Just make sure first index evaluates to first term, which is xx in this case. nn is a constant with respect to xx.

cosx=n=0(1)n(2n+1)!ddxx2n+1=n=0(1)n(2n+1)!(2n+1)x2n=n=0(1)n(2n+1)(2n)!(2n+1)x2n=n=0(1)n(2n)!x2n=1x22!+x44!\begin{align*}\cos x &= \sum_{n = 0}^\infty \frac{(-1)^n}{(2n + 1)!}\frac{\d }{\d x}x^{2n+1} \\ &= \sum_{n = 0}^\infty \frac{(-1)^n}{(2n + 1)!}(2n+1)x^{2n} \\ &= \sum_{n = 0}^\infty \frac{(-1)^n}{(2n+1)(2n)!}(2n+1) x^{2n}\\ &= \sum_{n = 0}^\infty \frac{(-1)^n}{(2n)!} x^{2n} \qed \\ &= 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \dots \end{align*}

integration

Example: Find Maclaurin series expansion for ln(1+x)\displaystyle\ln(1+x).


We start from the series for 11+x\frac{1}{1+x} above in an example. Because the radius of convergence is x<1\lvert x\rvert < 1 for series expansion of 11+x\frac{1}{1+x}, there is no need for absolute value when taking the integral.

ln(1+x)=11+xdx=n=0(x)ndx=n=0(x)ndx=n=0(1)(x)n+1n+1=n=0(1)n+2(x)n+1n+1=m=1(1)m+1(x)mm=xx22!+x33!\begin{align*}\ln(1+x) &= \int \frac{1}{1 + x} \d x\\ &= \int \sum_{n = 0}^\infty (-x)^n \d x \\ &= \sum_{n = 0}^\infty \int(-x)^n \d x \\ &= \sum_{n = 0}^\infty \frac{(-1)(-x)^{n+1}}{n+1} \\ &= \sum_{n = 0}^\infty \frac{(-1)^{n+2}(x)^{n+1}}{n+1} \\ &= \sum_{m = 1}^\infty \frac{(-1)^{m+1}(x)^{m}}{m}\qed \\ &= x - \frac{x^2}{2!} + \frac{x^3}{3!} - \dots \end{align*}

The last step was a nifty trick using the substitution m=n+1m = n + 1. Since nn does not exist outside the summation, and is a placeholder variable, the summation can be also written as

ln(1+x)=n=1(1)n+1(x)nn=n=1(x)nn\ln(1+x) = \sum_{n = 1}^\infty \frac{(-1)^{n+1}(x)^{n}}{n} = -\sum_{n = 1}^\infty \frac{(-x)^{n}}{n}

Tip: lnx=ln1x=ln(1x1x)\ln x = -\ln \frac1x = -\ln \left(1 - \frac{x-1}{x}\right), which makes this series expansion way more powerful than it seems.

Use in limits

An alternative way to evaluate limits of the indeterminate form is to calculate the Maclaurin series and find the limit for the first few terms of the resulting series.

Example: Evaluate

limx0sin(x2)x2x3ln(1+x3)\lim_{x\to 0}\frac{\sin(x^2) - x^2} {x^3 \ln(1+ x^3)}

This involves

sinx=xx33!+x55!\sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \dots

and

ln(1+x)=xx22+x33\ln (1 + x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \dots

where we replace each xx by x2x^2 and x3x^3 respectively.

L=limx0(x2)(x2)33!+(x2)55!x2x3(x3(x3)22!+)=limx0x2x66+x10120x2x3(x3x62+)=limx0x6(16+x4120)x6(1x32+)=limx0(16+x4120)limx0(1x32+)=16\begin{align*} L &= \lim_{x\to 0}\frac{(x^2) - \frac{(x^2)^3}{3!} + \frac{(x^2)^5}{5!} - \dots - x^2}{x^3 \left(x^3 - \frac{(x^3)^2}{2!} + \dots\right)} \\ &= \lim_{x\to 0}\frac{x^2 - \frac{x^6}{6} + \frac{x^{10}}{120} - \dots - x^2}{x^3 \left(x^3 - \frac{x^6}{2} + \dots\right)} \\ &= \lim_{x\to 0} \frac{x^6\left(-\frac{1}{6} + \frac{x^{4}}{120} - \dots\right)}{x^6 \left(1 - \frac{x^3}{2} + \dots\right)} \\ &= \frac{\displaystyle\lim_{x\to 0}\left(-\frac{1}{6} + \frac{x^{4}}{120} - \dots\right)}{\displaystyle\lim_{x\to 0} \left(1 - \frac{x^3}{2} + \dots\right)} \\ &= -\frac{1}{6} \qed \end{align*}

After writing out the Maclaurin expansions, we factored out a x6x^6 out of both numerator and denominator. Then we were able to split LL into a ratio of two finite limits.

Use in differential equations

For a differential equation

dydx=f(x,y)\frac{\d y}{\d x} = f(x, y)

Repeated implicit differentiation of f(x,y)f(x, y) allow one to find the higher derivatives used in the definition of Maclaurin series. Substitute values of (0,y(0))(0, y(0)) and lower derivatives to find the next derivative.

This is not exactly a satisfying answer, but the series (with infinite number of terms) is a solution to the differential equation. Typically you will be asked to differentiate once or twice, depending on the complexity of the derivatives.