5.23 Maclaurin SeriesHL ONLY

1. Maclaurin Series

Consider the infinite geometric series:

$1 + x + x^2 + x^3 + \dots$

We know that the series converges for $-1 < x < 1$ and the result is $S_\infty = \dfrac{1}{1 - x}$.

In this paragraph we have the opposite task. We are given a function, say $f(x) = \dfrac{1}{1 - x}$, and we wish to express it as an infinite series (which is called a power series) of the form:

$a_0 + a_1 x + a_2 x^2 + a_3 x^3 + \dots$

Suppose that a function $f(x)$ has derivatives of every order near $0$. Then $f(x)$ can be expressed as a power series as follows:

$f(x) = f(0) + f'(0)x + \dfrac{f''(0)}{2!}x^2 + \dfrac{f'''(0)}{3!}x^3 + \dots$

This is known as the Maclaurin series of the function.

Example 1

Find the Maclaurin series for $f(x) = \dfrac{1}{1 - x}$.

$f^{(n)}(x)$ $f^{(n)}(0)$
$f(x) = (1 - x)^{-1}$ $1$
$f'(x) = (1 - x)^{-2}$ $1$
$f''(x) = 2(1 - x)^{-3}$ $2$
$f'''(x) = 6(1 - x)^{-4}$ $3!$
Thus, $$ f(x) = 1 + 1x + \dfrac{2}{2!}x^2 + \dfrac{3!}{3!}x^3 + \cdots = = 1 + x + x^2 + x^3 + \cdots $$

In general, given a smooth function $f$, we wish to express it as $$ f(x) = a_0 + a_1 x + a_2 x^2 + a_3 x^3 + a_4 x^4 + \cdots = \sum_{k=0}^\infty a_k x^k $$ Then, the $n^{th}$ derivative of $f$ is $$ f^{(n)}(x) = \sum_{k=n}^\infty k(k-1)(k-2) \cdots (k-n+1)a_n x^{k-n} $$ Therefore, $$ f^{(n)}(0) = n!a_n \implies a_n = \dfrac{f^{(n)}(0)}{n!} $$

The partial sums of the Maclaurin series give good approximations of $f(x)$ near $x=0$:

  • $a_0 + a_1 x$ is the tangent line of $f(x)$ at $x=0$
  • $a_0 + a_1 x + a_2 x^2$ is the "best" quadratic that approximates $f(x)$
  • $a_0 + a_1 x + a_2 x^2 + a_3 x^3$ is the "best" cubic that approximates $f(x)$
x y 0 1 -1 1 f(x) P₁(x) P₂(x) P₃(x)

Example 2

Find the Maclaurin series of the function $f(x) = \sin x$ up to the term in $x^5$.

$f^{(n)}(x)$ $f^{(n)}(0)$
$f(x) = \sin x$$0$
$f'(x) = \cos x$$1$
$f''(x) = -\sin x$$0$
$f'''(x) = -\cos x$$-1$
$f^{(4)}(x) = \sin x$$0$
$f^{(5)}(x) = \cos x$$1$
Thus, $$ \sin x = x - \dfrac{x^3}{3!} + \dfrac{x^5}{5!} - \dots $$

Similarly, we can obtain these standard Maclaurin series:

  • $e^x = 1 + x + \dfrac{x^2}{2!} + \dfrac{x^3}{3!} + \dots$
  • $\cos x = 1 - \dfrac{x^2}{2!} + \dfrac{x^4}{4!} - \dots$
  • $\ln(1 + x) = x - \dfrac{x^2}{2} + \dfrac{x^3}{3} - \dots$
  • $\arctan x = x - \dfrac{x^3}{3} + \dfrac{x^5}{5} - \dots$

An alternative way to obtain a Maclaurin series is to modify or combine appropriately the already known series. We can add, multiply, differentiate or integrate series and generate new series.

Example 3

Find the Maclaurin series of the function $f(x) = e^{x^2}$.

Since $e^x = 1 + x + \dfrac{x^2}{2!} + \dfrac{x^3}{3!} + \cdots$, we can substitute $x$ by $x^2$ and obtain $$ e^{x^2} = 1 + x^2 + \dfrac{x^4}{2!} + \dfrac{x^6}{3!} + \cdots $$

Example 4

Find the Maclaurin series of the function $f(x) = x \sin x$.

We multiply the series for $\sin x$ by $x$.
$$ x \sin x = x \left( x - \dfrac{x^3}{3!} + \dfrac{x^5}{5!} - \cdots \right) = x^2 - \dfrac{x^4}{3!} + \dfrac{x^6}{5!} - \cdots $$

Example 5

Find the Maclaurin series of the function $f(x) = \dfrac{1}{1+x^2}$.

We can differentiate a series term by term. Since $$ \arctan x = x - \dfrac{x^3}{3} + \dfrac{x^5}{5} - \cdots $$ And $(\arctan x)' = \dfrac{1}{1+x^2}$, so $$ \dfrac{1}{1+x^2} = \left( x - \dfrac{x^3}{3} + \dfrac{x^5}{5} - \dots \right)' = 1 - x^2 + x^4 - \dots $$

2. Differential Equations and Maclaurin Series

Consider a differential equation of the form $\dfrac{dy}{dx} = F(x, y)$ with boundary condition $y(0) = y_0$. The analytical solution is not always easy. However, we can find the Maclaurin series of the solution $y=f(x)$.

We know $f(0) = y_0$. By substituting into the D.E., we find $f'(0) = F(0, y_0)$. Implicit differentiation on $\dfrac{dy}{dx}$ gives $\dfrac{d^2y}{dx^2}$ and thus $f''(0)$, and so on.

Example 6

Find the Maclaurin series up to $x^2$ for the solution of the D.E. $\dfrac{dy}{dx} = x + y^2$ with $y=3$ when $x=0$.

Clearly $f(0) = 3$. Then, $$ f'(0) = \left. \dfrac{dy}{dx} \right|_{x=0, y=3} = 0 + 3^2 = 9 $$ Next, we compute the second derivative implicitly. Because $$ \dfrac{d^2y}{dx^2} = 1 + 2y \dfrac{dy}{dx} $$ we have $$ f''(0) = \left. \dfrac{d^2y}{dx^2} \right|_{x=0, y=3} = 1 + 2(3)(9) = 1 + 54 = 55 $$ Therefore, $$ y = f(0) + f'(0)x + \dfrac{f''(0)}{2!}x^2 + \cdots \approx 3 + 9x + \dfrac{55}{2}x^2 $$

3. General Binomial Theorem

The binomial theorem gives $$ (1+x)^n = 1 + nx + \dfrac{n(n-1)}{2!}x^2 + \dfrac{n(n-1)(n-2)}{3!}x^3 + \cdots $$ when $n \in \mathbb{N}$.

This version allows us to use negative or rational values for index $n$. Thus for example, $$ (1+x)^{-n} = 1 - nx + \dfrac{-n(-n-1)}{2!}x^2 + \cdots $$ but now we have infinitely many terms. This is an alternative way to obtain some infinite power series.

Example 7

Find the Maclaurin series up to $x^4$ for $f(x) = (1+x)^{-3}$.

$$ \begin{aligned} f(x) &= 1 + (-3)x + \dfrac{(-3)(-4)}{2!}x^2 + \dfrac{(-3)(-4)(-5)}{3!}x^3 + \dfrac{(-3)(-4)(-5)(-6)}{4!}x^4 + \cdots \\ &= 1 - 3x + 6x^2 - 10x^3 + 15x^4 - \cdots \end{aligned} $$

Example 8

Find the Maclaurin series up to $x^3$ for $f(x) = \sqrt{1+x}$ by using the extension of the binomial theorem.

$$ \begin{aligned} f(x) &= 1 + \dfrac{1}{2}x + \dfrac{(\frac{1}{2})(-\frac{1}{2})}{2!}x^2 + \dfrac{(\frac{1}{2})(-\frac{1}{2})(-\frac{3}{2})}{3!}x^3 + \cdots \\ &= 1 + \dfrac{1}{2}x - \dfrac{1}{8}x^2 + \dfrac{1}{16}x^3 - \cdots \end{aligned} $$

In general, for the extension of the binomial theorem we modify $(a+b)^n$ as follows:

$(a+b)^n = a^n \left(1 + \dfrac{b}{a}\right)^n$

For non-integer values of $n$, we obtain an infinite series which converges when $\left|\dfrac{b}{a}\right| < 1$.

Example 9

Find the Maclaurin series up to $x^2$ for $f(x) = (3 - 2x)^{-2}$ by using the extension of the binomial theorem.

$$ \begin{aligned} f(x) &= 3^{-2} \left(1 - \dfrac{2x}{3}\right)^{-2} \\ &= \dfrac{1}{9} \left( 1 + (-2)\left(-\dfrac{2x}{3}\right) + \dfrac{(-2)(-3)}{2!} \left(-\dfrac{2x}{3}\right)^2 + \cdots \right) \\ &= \dfrac{1}{9} \left( 1 + \dfrac{4x}{3} + 3\left(\dfrac{4x^2}{9}\right) + \cdots \right) \\ &= \dfrac{1}{9} + \dfrac{4x}{27} + \dfrac{4x^2}{27} + \cdots \end{aligned} $$
The series converges when $\left|-\dfrac{2x}{3}\right| < 1 \iff |2x| < 3 \iff -\dfrac{3}{2} < x < \dfrac{3}{2}$.