Do you still remember that I am still only fourteen?” I said, starting to lose my temper and grasping how Mum should feel like when Dad says things like, “Such a sophisticated perfume honey, how many litres and for how long did you need to soak in it? Come to my localhost, I will turn off my firewall, disable my antivirus, grant you sudo access, and show you my source code,” Apocalypse, Anawim, #justothepoint
Infinite Series. Convergence and Divergence.
An infinite series is the sum of an infinite sequence of numbers. It is represented as: $\sum_{n=1}^\infty a_n = a_1 + a_2 + a_3 + \dots$ where $a_n$ represents the terms of the sequence, and n is the index that ranges from 1 to infinite.
A series is convergent (or converges) if the sequence of its partial sums tends to a finite limit, that is, $l = \lim_{n \to \infty} S_n = \lim_{n \to \infty} \sum_{k=1}^n a_k$ exists and is a finite number.
The $n$-th partial sum $S_n$ is the sum of the first $n$ terms: $S_n = \sum_{k=1}^n a_k = a_1 + a_2 + \dots + a_n$. If the limit $L = \lim_{n \to \infty} S_n$ exists and is a finite number, the series converges, and $L$ is called the sum of the series. Formally, this means for any arbitrarily small positive number $\epsilon$, there is a sufficiently large $N$ such that for all $n \geq N$, $\vert{}S_n - L\vert{} < \epsilon$.
If this limit does not exist (e.g., it goes to infinity or oscillates forever), the series is said to be divergent.
The Divergence Test (n-th Term Test). If $\lim_{n \to \infty} a_n \neq 0$, then the series $\sum_{n=1}^\infty a_n$ diverges.
Integral Comparison. If f(x) is a positive, continuous, and decreasing function on the interval [1, ∞), then $|\sum_{n=1}^\infty f(n) -\int_{1}^{∞} f(x)dx| < f(1).$ Besides, $\sum_{n=1}^\infty f(n)$ converges, if and only if, $\int_{1}^{∞} f(x)dx$ converges.
Theorem (Direct Comparison Test): Let $\sum a_n$ and $\sum b_n$ be series with positive terms such that $0 \leq a_n \leq b_n$ for all $n \geq N$.
- If the “bigger” series $\sum b_n$ converges, then the “smaller” series $\sum a_n$ converges.
- If the “smaller” series $\sum a_n$ diverges, then the “bigger” series $\sum b_n$ diverges.
- If the bigger series diverges, or the smaller series converges, the test is inconclusive.
Approximating Functions with Polynomials
Taylor’s formula is a fundamental result in calculus that allows us to approximate a complex function with a polynomial. Previously, we have represented functions using power series by relating them to the geometric series $\frac{1}{1-x}$. However, that approach is limited. Taylor series provide a general method for writing a power series representation for almost any smooth function.
Let $f(x)$ be a function that is $n$-times differentiable on an interval around $x = 0$. We can approximate $f$ near $0$ by a polynomial $P_n(x)$ of degree $n$:
As we increase the degree $n$, the polynomial “hugs” the original function more tightly:
- Constant approximation ($n=0$): The best flat-line approximation near $0$ is simply the function’s value: $P_0(x) = f(0)$.
- Linear approximation ($n=1$): The best straight-line approximation (the tangent line) accounts for the slope: $P_1(x) = f(0) + f'(0)x$.
- Quadratic approximation ($n=2$): The best parabolic approximation accounts for the concavity: $P_2(x) = f(0) + f'(0)x + \frac{f''(0)}{2!}x^2$.
Continuing this argument, the general polynomial of degree $n$ is: $P_n(x) = f(0) + f'(0)x + \frac{f''(0)}{2!}x^2 + \dots + \frac{f^{(n)}(0)}{n!}x^n = \sum_{k=0}^n \frac{f^{(k)}(0)}{k!}x^k$. This is the Taylor polynomial of degree $n$ centered at $0$ (also known as the Maclaurin polynomial).
More generally, if we center our approximation around an arbitrary point $x = a$, the Taylor series of degree $n$ about $a$ becomes: $P_n(x) = f(a) + f'(a)(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \dots + \frac{f^{(n)}(a)}{n!}(x-a)^n = \sum_{k=0}^n \frac{f^{(k)}(a)}{k!}(x-a)^k$. In other words, let f(x) be a function that is n-times differentiable on an interval about x = a. We can approximate f near a by a polynomial $P_n(x)$ of degree n with the Taylor series of degree n about a, $f(a) + f'(a)(x-a) + \frac{f''(a)}{2!}(x-a)^2 + ··· + \frac{f^{(n)}(a)}{n!}(x-a)^n = \sum_{k=0}^n \frac{f^{(k)}(a)}{k!}(x-a)^k.$
If the function has derivatives of every order and the series converges to the function, we can extend this to infinity to get the exact power series representation: $f(x) = \sum_{n=0}^\infty \frac{f^{(n)}(a)}{n!}(x-a)^n$
Measuring the Error (The Remainder)
Because a polynomial is only an approximation of the function, there is an error (or remainder) between the true function and our polynomial.
- Peano form of the remainder:
Let $f(x)$ be $n$-times differentiable at $a$. Then, there exists a function $h_n(x)$ such that: $f(x) = P_n(x) + h_n(x)(x-a)^n$ where $\lim_{x \to a} h_n(x) = 0$. More precisely, $f(x)-P_n(x)=o\big((x-a)^n\big)\quad\text{as }x\to a$. This tells us that the error goes to zero faster than $(x-a)^n$ as we approach $a$. The Taylor polynomial matches the function so well at a that the error vanishes faster than the (n)-th power of the distance from a.
- Lagrange form of the remainder:
Let $f(x)$ admit $n+1$ continuous derivatives on an open interval containing $a$. Then, for each $x$ in the interval: $f(x) = P_n(x) + R_{n+1}(x)$ where the remainder satisfies $R_{n+1}(x) = \frac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1}$ for some number $c$ strictly between $a$ and $x$. This is incredibly useful for calculating the maximum possible error of an approximation. The error behaves like the next derivative evaluated at some intermediate point.
Building a General Power Series
We want a general method to write a full infinite power series representation for a function. If we assume $f(x)$ has derivatives of every order, we can define it as an infinite series: $f(x) = a_0 + a_1x + a_2x^2 + a_3x^3 + \dots + a_nx^n + \dots$
If we take successive derivatives and evaluate them at $x = 0$:
- $f(0) = a_0$. So the constant term is simply the value of the function at the center.
- $f'(x) = a_1 + 2a_2x + 3a_3x^2 + \dots \implies f'(0) = a_1$. So the linear coefficient is the first derivative at the center.
- $f''(x) = 2a_2 + 3 \cdot 2a_3x + 4 \cdot 3a_4x^2 + \dots \implies f''(0) = 2a_2 \implies a_2 = \frac{f''(0)}{2!}$
- $f'''(x) = 3 \cdot 2a_3 + 4 \cdot 3 \cdot 2a_4x + \dots \implies f'''(0) = 3 \cdot 2 \cdot 1a_3 \implies a_3 = \frac{f'''(0)}{3!}$
By finding the pattern, we arrive at the general coefficient $a_n = \frac{f^{(n)}(0)}{n!}$. This gives the Maclaurin series: $\boxed{f(x) = \sum_{n=0}^\infty \frac{f^{(n)}(0)}{n!}x^n}$.
Therefore, the full Taylor Series at $x=a$ is: $\boxed{f(x) = \sum_{n=0}^\infty \frac{f^{(n)}(a)}{n!}(x-a)^n}$. This is the most general infinite power series representation for a smooth function.
Solved exercises
- Taylor series for $f(x) = e^x$ about $x = 0$
Because the derivative of $e^x$ is always $e^x$, and $e^0 = 1$, all derivatives at $x=0$ equal 1.
$e^x = \sum_{n=0}^\infty \frac{f^{(n)}(0)}{n!}x^n = \sum_{n=0}^\infty \frac{1}{n!}x^n$. In particular, plugging in $x=1$ gives the famous sum: $e = 1 + 1 + \frac{1}{2!} + \frac{1}{3!} + \dots$.
- Taylor series for $f(x) = e^{-x}$ about $x = -4$
Derivatives: $f^{(n)}(x) = (-1)^n e^{-x}$. Evaluate at $-4$: $f^{(n)}(-4) = (-1)^n e^4$
Series: $e^{-x} = \sum_{n=0}^\infty \frac{(-1)^n e^4}{n!}(x+4)^n$
- Taylor Series for $f(x) = \cos(x)$
- The derivatives of cosine cycle through $\cos(x), -\sin(x), -\cos(x), \sin(x)$. Evaluated at $0$, this yields $1, 0, -1, 0$.
- Taylor Series for $f(x) = \cos(x)$ centered at $a = 0$ (Maclaurin Series): $\cos(x) = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \dots = \sum_{n=0}^\infty \frac{(-1)^n x^{2n}}{(2n)!}$
- Evaluated at $\pi$, the cycle yields $-1, 0, 1, 0$.
- Taylor Series for $f(x) = \cos(x)$ centered at $a = \pi$: $\cos(x) = -1 + \frac{(x-\pi)^2}{2!} - \frac{(x-\pi)^4}{4!} + \frac{(x-\pi)^6}{6!} - \dots = \sum_{n=0}^\infty \frac{(-1)^{n+1}(x-\pi)^{2n}}{(2n)!}$
- Radius of convergence: Using the Ratio Test for the $a=\pi$ series: $\lim_{n \to \infty} \left\vert{} \frac{\frac{(-1)^{n+2}(x-\pi)^{2(n+1)}}{(2(n+1))!}}{\frac{(-1)^{n+1}(x-\pi)^{2n}}{(2n)!}} \right\vert{} = \lim_{n \to \infty} \left\vert{} \frac{(x-\pi)^2}{(2n+2)(2n+1)} \right\vert{} = (x-\pi)^2 \cdot 0 = 0$
- Because $0 < 1$ for all $x$, the radius of convergence is $R = \infty$.
- Taylor Series for $f(x) = \sin(x)$ about $a = 0$
- The derivatives cycle through $\sin(x), \cos(x), -\sin(x), -\cos(x)$. At $x=0$, this yields $0, 1, 0, -1$.
- Taylor Series for $f(x) = \sin(x)$ about $a = 0$: $\sin(x) = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \dots = \sum_{n=0}^\infty \frac{(-1)^n x^{2n+1}}{(2n+1)!}$
- The reader should be careful to include the alternating $(-1)^n$ term. Without it, the series $\sum \frac{x^{2n+1}}{(2n+1)!}$ actually describes hyperbolic sine, $\sinh(x)$!
- Taylor Series for $f(x) = \frac{1}{1+x}$
- You can solve this three different ways:
- Algebraic substitution: Take the geometric series $\frac{1}{1-x} = \sum_{n=0}^\infty x^n$ and substitute $x$ with $(-x)$ to get $\sum_{n=0}^\infty (-1)^n x^n$.
- Geometric reasoning: We can observe that f(x) = $\frac{1}{1+x}$ is a geometric series S = $\frac{a}{1-r} = \frac{1}{1-(-x)}$ where a is the first term of the serie a = 1, r is the common ratio, r = -x, and S is the sum of the series.
- Traditional Taylor derivation: $f(x) = (1+x)^{-1} \implies f(0) = 1$
$f'(x) = -(1+x)^{-2} \implies f'(0) = -1$
$f''(x) = 2(1+x)^{-3} \implies f''(0) = 2$
$f'''(x) = -6(1+x)^{-4} \implies f'''(0) = -6$
- Result: $1 - \frac{1}{1!}x + \frac{2}{2!}x^2 - \frac{6}{3!}x^3 + \dots = 1 - x + x^2 - x^3 + \dots = \sum_{n=0}^\infty (-1)^n x^n$
- Maclaurin Series for $f(x) = \ln(1+x)$
- By Definition: $f(x) = \ln(1+x) \implies f(0) = 0$
$f'(x) = \frac{1}{1+x} \implies f'(0) = 1$
$f''(x) = \frac{-1}{(1+x)^2} \implies f''(0) = -1$
$f'''(x) = \frac{2}{(1+x)^3} \implies f'''(0) = 2$
$f''''(x) = \frac{-6}{(1+x)^4} \implies f''''(0) = -6$
Plugging these into the Maclaurin formula: $\ln(1+x) = 0 + \frac{1}{1!}x - \frac{1}{2!}x^2 + \frac{2}{3!}x^3 - \frac{6}{4!}x^4 + \dots = x - \frac{x^2}{2} + \frac{x^3}{3} - \frac{x^4}{4} + \dots = \sum_{n=1}^\infty \frac{(-1)^{n+1}}{n}x^n$
- This alternative is one of the most elegant ways to obtain the Taylor series for $f(x) = \ln(1+x)$
⭐ Step 1: Start with the geometric series $\forall |t| \lt 1, \frac{1}{1+t} = 1 - t + t^2 - t^3 + \dots$. This is the standard geometric series with ratio -t.
⭐ Step 2: Integrate term‑by‑term. Since the series converges uniformly on any closed interval inside (-1, 1), we can integrate it term‑by‑term: $\ln(1+x) = \int_0^x \frac{1}{1+t} dt = \int_0^x (1 - t + t^2 - t^3 + \dots) dt = \left( t - \frac{t^2}{2} + \frac{t^3}{3} - \frac{t^4}{4} + \dots \right) \Bigg\vert{}_0^x = x - \frac{x^2}{2} + \frac{x^3}{3} - \frac{x^4}{4} + \dots$
In compact form: $\boxed{\ln(1+x) = \sum_{n=1}^\infty \frac{(-1)^{n+1}}{n}x^n}$
⭐ Step 3: Radius of convergence. $a_n = \frac{(-1)^{n+1}}{n}x^n$
By the ratio test, $\vert{} \frac{a_{n+1}}{a_n} \vert{} = \vert{}x\vert{} \cdot \frac{n}{n+1} \to \vert{}x\vert{}$, so the series converges when $\vert{}x\vert{} \lt 1$. Thus, the radius of convergence is 1.
- Taylor Series for $x^4e^{-3x^2}$ about $0$
- Instead of taking torturous derivatives, manipulate the known series for $e^x$. $e^x = \sum_{n=0}^\infty \frac{x^n}{n!}$
- Substitute $-3x^2$: $e^{-3x^2} = \sum_{n=0}^\infty \frac{(-3x^2)^n}{n!} = \sum_{n=0}^\infty \frac{(-3)^n x^{2n}}{n!}$
- Multiply by $x^4$: $x^4 e^{-3x^2} = x^4 \sum_{n=0}^\infty \frac{(-3)^n x^{2n}}{n!} = \sum_{n=0}^\infty \frac{(-3)^n x^{2n+4}}{n!}$
- The Error Function: $\text{erf}(x)$
- ⭐ The error function is defined as $\text{erf}(x) = \frac{2}{\sqrt{\pi}} \int_0^x e^{-t^2} dt$. We can't integrate $e^{-t^2}$ using elementary functions, but we can integrate its series! This is one of the most beautiful examples of how power‑series methods let us integrate the impossible.
- ⭐ Use the Maclaurin series for $e^x = \sum_{n=0}^\infty \frac{x^n}{n!}$
Substitute $x = -t^2$: $e^{-t^2} = 1 - t^2 + \frac{t^4}{2!} - \frac{t^6}{3!} + \dots$. This is valid for all real t, because the exponential series converges everywhere.
- ⭐ Integrate term-by-term.
Since the exponential series converges uniformly on any bounded interval, we may integrate term‑by‑term: $\text{erf}(x) = \frac{2}{\sqrt{\pi}} \int_0^x \left( 1 - t^2 + \frac{t^4}{2!} - \frac{t^6}{3!} + \dots \right) dt = \frac{2}{\sqrt{\pi}} \left( x - \frac{x^3}{3} + \frac{x^5}{5 \cdot 2!} - \frac{x^7}{7 \cdot 3!} + \dots \right)$. This is the standard Maclaurin series for the error function.
- ⭐ The general term.
You can write the series compactly: $\text{erf}(x) = \frac{2}{\sqrt{\pi}} \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n+1}}{n!(2n+1)}.$
- ⭐ Radius of convergence
Because the exponential series converges for all real numbers, and integration preserves convergence, the series for $\text{erf}(x)$ also converges for all real x.
So: $\boxed{\text{Radius of convergence} = \infty.}$
Bibliography
This content is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License and is based on MIT OpenCourseWare [18.01 Single Variable Calculus, Fall 2007].
- NPTEL-NOC IITM, Introduction to Galois Theory.
- Algebra, Second Edition, by Michael Artin.
- LibreTexts, Calculus. Abstract and Geometric Algebra, Abstract Algebra: Theory and Applications (Judson).
- Field and Galois Theory, by Patrick Morandi. Springer.
- Michael Penn, and MathMajor.
- Contemporary Abstract Algebra, Joseph, A. Gallian.
- YouTube’s Andrew Misseldine: Calculus. College Algebra and Abstract Algebra.
- MIT OpenCourseWare 18.01 Single Variable Calculus, Fall 2007 and 18.02 Multivariable Calculus, Fall 2007.
- Calculus Early Transcendentals: Differential & Multi-Variable Calculus for Social Sciences.
- Paul’s Online Notes, Calculus II, Series & Sequences.