Definition & Notation
What is a Taylor Series?
A Taylor series is a representation of a function as an infinite sum of terms calculated from the values of the function's derivatives at a single point. If the function \(f(x)\) has derivatives of all orders at \(x = a\), then the Taylor series of \(f\) centered at \(a\) is:
where \(f^{(n)}(a)\) represents the \(n\)th derivative of \(f\) evaluated at \(x = a\), and \(n!\) is the factorial of \(n\).
The Taylor series provides a way to approximate functions using polynomials. The more terms we include in the series, the better the approximation becomes (within the radius of convergence).
Important Note
Not every function equals its Taylor series, even if the Taylor series converges. A function equals its Taylor series within the radius of convergence if and only if the function is analytic.
Maclaurin Series
What is a Maclaurin Series?
A Maclaurin series is a special case of a Taylor series centered at \(a = 0\). If the function \(f(x)\) has derivatives of all orders at \(x = 0\), then the Maclaurin series of \(f\) is:
Example 1: Maclaurin Series for \(e^x\)
Find the Maclaurin series for \(f(x) = e^x\).
Solution:
We need to find the derivatives of \(f(x) = e^x\) and evaluate them at \(x = 0\):
Since all derivatives of \(e^x\) are \(e^x\), all derivatives evaluated at \(x = 0\) are 1.
Substituting into the Maclaurin series formula:
This series converges for all values of \(x\) (the radius of convergence is \(\infty\)).
Constructing Taylor Series
There are several methods to construct Taylor series for functions:
Method 1: Direct Computation
This method involves finding the derivatives of the function, evaluating them at the center point, and substituting into the Taylor series formula.
Example 2: Taylor Series for \(\sin(x)\) at \(a = 0\)
Find the Taylor series (Maclaurin series) for \(f(x) = \sin(x)\).
Solution:
We need to find the derivatives of \(f(x) = \sin(x)\) and evaluate them at \(x = 0\):
We can see a pattern: the derivatives cycle through \(\sin(x)\), \(\cos(x)\), \(-\sin(x)\), and \(-\cos(x)\).
Substituting into the Maclaurin series formula:
This series converges for all values of \(x\) (the radius of convergence is \(\infty\)).
Method 2: Using Known Series
Once we know the Taylor series for some basic functions, we can use algebraic operations, substitution, differentiation, or integration to find Taylor series for other functions.
Example 3: Taylor Series for \(\cos(x)\) Using \(\sin(x)\)
Find the Taylor series for \(f(x) = \cos(x)\) using the Taylor series for \(\sin(x)\).
Solution:
We know that \(\frac{d}{dx}[\sin(x)] = \cos(x)\). Using the Taylor series for \(\sin(x)\) from Example 2:
This series converges for all values of \(x\) (the radius of convergence is \(\infty\)).
Method 3: Using the Binomial Series
The binomial series can be used to find Taylor series for functions of the form \((1+x)^k\):
This series converges for \(|x| < 1\) when \(k\) is not a non-negative integer.
Common Taylor Series
Here are some important Taylor series centered at \(a = 0\) (Maclaurin series):
Common Maclaurin Series
- \(e^x = \sum_{n=0}^{\infty} \frac{x^n}{n!} = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \ldots\) (for all \(x\))
- \(\sin(x) = \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n+1}}{(2n+1)!} = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \ldots\) (for all \(x\))
- \(\cos(x) = \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n}}{(2n)!} = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \ldots\) (for all \(x\))
- \(\ln(1+x) = \sum_{n=1}^{\infty} \frac{(-1)^{n+1}x^n}{n} = x - \frac{x^2}{2} + \frac{x^3}{3} - \ldots\) (for \(|x| < 1\))
- \(\frac{1}{1-x} = \sum_{n=0}^{\infty} x^n = 1 + x + x^2 + x^3 + \ldots\) (for \(|x| < 1\))
- \((1+x)^k = \sum_{n=0}^{\infty} \binom{k}{n} x^n = 1 + kx + \frac{k(k-1)}{2!}x^2 + \ldots\) (for \(|x| < 1\) when \(k\) is not a non-negative integer)
- \(\arctan(x) = \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n+1}}{2n+1} = x - \frac{x^3}{3} + \frac{x^5}{5} - \ldots\) (for \(|x| \leq 1\))
Operations with Taylor Series
Taylor series can be manipulated using various operations to find series representations for more complex functions:
1. Addition and Subtraction
If \(f(x) = \sum_{n=0}^{\infty} a_n(x-a)^n\) and \(g(x) = \sum_{n=0}^{\infty} b_n(x-a)^n\), then:
2. Multiplication by a Constant
If \(f(x) = \sum_{n=0}^{\infty} a_n(x-a)^n\) and \(c\) is a constant, then:
3. Substitution
If \(f(x) = \sum_{n=0}^{\infty} a_n(x-a)^n\) and \(g(x)\) is another function, then:
This is valid when \(|g(x)-a| < R\), where \(R\) is the radius of convergence of the original series.
4. Differentiation
If \(f(x) = \sum_{n=0}^{\infty} a_n(x-a)^n\), then:
5. Integration
If \(f(x) = \sum_{n=0}^{\infty} a_n(x-a)^n\), then:
where \(C\) is a constant of integration.
Example 4: Using Operations to Find Taylor Series
Find the Taylor series for \(f(x) = e^{x^2}\) centered at \(a = 0\).
Solution:
We know the Maclaurin series for \(e^x\):
Using substitution with \(x\) replaced by \(x^2\):
This series converges for all values of \(x\) (the radius of convergence is \(\infty\)).
Error Estimation
When we use a finite number of terms from a Taylor series to approximate a function, there is an error in the approximation. This error can be estimated using Taylor's Remainder Theorem.
Taylor's Remainder Theorem
If \(f\) has \(n+1\) continuous derivatives on an interval containing \(a\) and \(x\), then there exists a point \(c\) between \(a\) and \(x\) such that:
where \(P_n(x)\) is the \(n\)th-degree Taylor polynomial of \(f\) centered at \(a\), and \(R_n(x)\) is the remainder (error) term.
Example 5: Error Estimation
Estimate the error when approximating \(\sin(0.1)\) using the 3rd-degree Taylor polynomial centered at \(a = 0\).
Solution:
The 3rd-degree Taylor polynomial for \(\sin(x)\) centered at \(a = 0\) is:
Using Taylor's Remainder Theorem, the error is:
where \(c\) is between 0 and \(x\), and \(f^{(4)}(c) = \sin(c)\).
Since \(|\sin(c)| \leq 1\) for all \(c\), we have:
Therefore, the error in approximating \(\sin(0.1)\) using \(P_3(0.1) = 0.1 - \frac{(0.1)^3}{6} \approx 0.09983\) is at most \(4.17 \times 10^{-6}\).
The actual value of \(\sin(0.1) \approx 0.09983\), so the approximation is quite accurate.
Examples
Example 6: Taylor Series for \(\ln(1+x)\) at \(a = 0\)
Find the Taylor series for \(f(x) = \ln(1+x)\) centered at \(a = 0\).
Solution:
We need to find the derivatives of \(f(x) = \ln(1+x)\) and evaluate them at \(x = 0\):
We can see a pattern: \(f^{(n)}(0) = (-1)^{n+1}(n-1)!\) for \(n \geq 1\).
Substituting into the Maclaurin series formula:
This series converges for \(|x| < 1\) (the radius of convergence is 1).
Example 7: Taylor Series for \(\frac{1}{1+x}\) at \(a = 0\)
Find the Taylor series for \(f(x) = \frac{1}{1+x}\) centered at \(a = 0\).
Solution:
We can use the geometric series formula:
Substituting \(r = -x\):
This series converges for \(|x| < 1\) (the radius of convergence is 1).
Example 8: Taylor Series for \(\arctan(x)\) at \(a = 0\)
Find the Taylor series for \(f(x) = \arctan(x)\) centered at \(a = 0\).
Solution:
We know that \(\frac{d}{dx}[\arctan(x)] = \frac{1}{1+x^2}\).
From Example 7, we have:
Substituting \(x^2\) for \(x\):
Integrating both sides:
Since \(\arctan(0) = 0\), we have \(C = 0\).
This series converges for \(|x| \leq 1\) (the radius of convergence is 1).
Interactive Visualizations
Explore Taylor Polynomial Approximations
Use the controls below to explore how Taylor polynomials approximate functions with increasing accuracy as more terms are included.
Taylor Series Information
Function: f(x) = sin(x)
Taylor Series: x - x³/3! + x⁵/5! - ...
Current Approximation: x - x³/6
Maximum Error in [-π,π]: 0.0741
Practice Exercises
Exercise 1
Find the Taylor series for \(f(x) = \cos(2x)\) centered at \(a = 0\).
Exercise 2
Find the Taylor series for \(f(x) = \frac{1}{(1-x)^2}\) centered at \(a = 0\).
Exercise 3
Find the Taylor series for \(f(x) = x\sin(x)\) centered at \(a = 0\).
Exercise 4
Use Taylor's Remainder Theorem to estimate the error when approximating \(e^{0.2}\) using the 3rd-degree Taylor polynomial centered at \(a = 0\).