Taylor series
Taylor Series Expansion
If a function $f(x)$ has derivatives of all orders at $x=a$, the Taylor Series about $x=a$ is \[ f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!} (x-a)^n = f(a) + f'(a)(x-a) + \frac{f”(a)}{2!}(x-a)^2 + \cdots \] If $a=0$, the series is called a Maclaurin Series.
\[ e^x = \sum_{n=0}^{\infty} \frac{x^n}{n!}, \quad \sin x = \sum_{n=0}^{\infty} (-1)^n \frac{x^{2n+1}}{(2n+1)!}, \quad \cos x = \sum_{n=0}^{\infty} (-1)^n \frac{x^{2n}}{(2n)!} \]
The $n$th-degree Taylor polynomial: \[ T_n(x) = \sum_{i=0}^{n} \frac{f^{(i)}(a)}{i!}(x-a)^i \] Remainder (error) term: \[ R_n(x) = f(x) - T_n(x) \] If $\lim_{n\to\infty} R_n(x) = 0$, the series converges to $f(x)$.
Examples
Find the Maclaurin series for $f(x)=e^{2x}$.
solution $f^{(n)}(x) = 2^n e^{2x}$, so $f^{(n)}(0) = 2^n$. Hence, the Maclaurin series: \[ f(x) = \sum_{n=0}^{\infty} \frac{2^n}{n!} x^n = 1 + 2x + 2^2\frac{x^2}{2!} + 2^3\frac{x^3}{3!} + \cdots \]
Find the Taylor series for $f(x) = \ln(1+x)$ about $x=0$.
solution $f'(x) = 1/(1+x)$, $f”(x) = -1/(1+x)^2$, $f^{(n)}(x) = (-1)^{n-1} (n-1)!/(1+x)^n$ So at $x=0$: $f^{(n)}(0) = (-1)^{n-1} (n-1)!$ Taylor series: \[ \ln(1+x) = \sum_{n=1}^{\infty} (-1)^{n-1} \frac{x^n}{n} = x - \frac{x^2}{2} + \frac{x^3}{3} - \frac{x^4}{4} + \cdots \]
Find the Maclaurin series for $f(x) = \sin(3x)$.
solution Use $\sin(kx)$: \[ \sin(3x) = \sum_{n=0}^{\infty} (-1)^n \frac{(3x)^{2n+1}}{(2n+1)!} = 3x - \frac{27x^3}{6} + \frac{243 x^5}{120} - \cdots \]
Using Taylor Series for Limits
Taylor or Maclaurin series can simplify limits of the form $\frac{0}{0}$ or $\frac{\infty}{\infty}$ by expanding functions near the point. This often avoids repeated differentiation in L’Hôpital’s Rule.
Evaluate: \[ \lim_{x \to 0} \frac{e^x - 1 - x}{x^2} \]
Solution: Maclaurin series: $e^x = 1 + x + \frac{x^2}{2} + \cdots$ \[ e^x - 1 - x = \frac{x^2}{2} + \cdots \] \[ \lim_{x \to 0} \frac{e^x - 1 - x}{x^2} = \frac{1}{2} \]
Evaluate: \[ \lim_{x \to 0} \frac{\ln(1+x) - x + \frac{x^2}{2}}{x^3} \]
Solution: Maclaurin series: $\ln(1+x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \cdots$ \[ \ln(1+x) - x + \frac{x^2}{2} = \frac{x^3}{3} + \cdots \] \[ \lim_{x \to 0} \frac{\ln(1+x) - x + \frac{x^2}{2}}{x^3} = \frac{1}{3} \]
Evaluate: \[ \lim_{x \to 0} \frac{\tan x - x}{x^3} \]
Solution: Maclaurin series: $\tan x = x + \frac{x^3}{3} + \cdots$ \[ \tan x - x = \frac{x^3}{3} + \cdots \] \[ \lim_{x \to 0} \frac{\tan x - x}{x^3} = \frac{1}{3} \]