JustToThePoint English Website Version
JustToThePoint en español

Taylor’s Formula and Series

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$.

  1. If the “bigger” series $\sum b_n$ converges, then the “smaller” series $\sum a_n$ converges.
  2. If the “smaller” series $\sum a_n$ diverges, then the “bigger” series $\sum b_n$ diverges.
  3. If the bigger series diverges, or the smaller series converges, the test is inconclusive.

Image 

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:

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.

  1. 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.
  2. 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$:

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

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$.

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$

  1. The derivatives of cosine cycle through $\cos(x), -\sin(x), -\cos(x), \sin(x)$. Evaluated at $0$, this yields $1, 0, -1, 0$.
  2. 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)!}$
  3. Evaluated at $\pi$, the cycle yields $-1, 0, 1, 0$.
  4. 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)!}$
  5. 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$
  6. Because $0 < 1$ for all $x$, the radius of convergence is $R = \infty$.
  1. The derivatives cycle through $\sin(x), \cos(x), -\sin(x), -\cos(x)$. At $x=0$, this yields $0, 1, 0, -1$.
  2. 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)!}$
  3. 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)$!
  1. You can solve this three different ways:
  2. 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$.
  3. 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.
  4. 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$
  5. 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$
  1. 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$
  2. 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.
  1. Instead of taking torturous derivatives, manipulate the known series for $e^x$. $e^x = \sum_{n=0}^\infty \frac{x^n}{n!}$
  2. 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!}$
  3. 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!}$
  1. ⭐ 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.
  2. ⭐ 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.
  3. ⭐ 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.
  4. ⭐ 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)}.$
  5. ⭐ 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].
  1. NPTEL-NOC IITM, Introduction to Galois Theory.
  2. Algebra, Second Edition, by Michael Artin.
  3. LibreTexts, Calculus. Abstract and Geometric Algebra, Abstract Algebra: Theory and Applications (Judson).
  4. Field and Galois Theory, by Patrick Morandi. Springer.
  5. Michael Penn, and MathMajor.
  6. Contemporary Abstract Algebra, Joseph, A. Gallian.
  7. YouTube’s Andrew Misseldine: Calculus. College Algebra and Abstract Algebra.
  8. MIT OpenCourseWare 18.01 Single Variable Calculus, Fall 2007 and 18.02 Multivariable Calculus, Fall 2007.
  9. Calculus Early Transcendentals: Differential & Multi-Variable Calculus for Social Sciences.
  10. Paul’s Online Notes, Calculus II, Series & Sequences.
Bitcoin donation

JustToThePoint Copyright © 2011 - 2026 Anawim. ALL RIGHTS RESERVED. Bilingual e-books, articles, and videos to help your child and your entire family succeed, develop a healthy lifestyle, and have a lot of fun. Social Issues, Join us.

This website uses cookies to improve your navigation experience.
By continuing, you are consenting to our use of cookies, in accordance with our Cookies Policy and Website Terms and Conditions of use.