In this lesson you’ll learn how to build Taylor and Maclaurin series, which represent functions as infinite polynomials. This is one of the most powerful ideas in all of calculus.
The Taylor series of f(x) centered at x = a is
f ( x ) = ∑ n = 0 ∞ f ( n ) ( a ) n ! ( x − a ) n f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!}(x - a)^n f ( x ) = n = 0 ∑ ∞ n ! f ( n ) ( a ) ( x − a ) n
Each coefficient comes from the nth derivative of f evaluated at the center, divided by n factorial. The more terms you include, the better the polynomial matches the function near x = a.
A Maclaurin series is just a Taylor series centered at a = 0
f ( x ) = ∑ n = 0 ∞ f ( n ) ( 0 ) n ! x n f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(0)}{n!}\,x^n f ( x ) = n = 0 ∑ ∞ n ! f ( n ) ( 0 ) x n
These four are worth memorizing
e x = 1 + x + x 2 2 ! + x 3 3 ! + x 4 4 ! + ⋯ = ∑ n = 0 ∞ x n n ! e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \frac{x^4}{4!} + \cdots = \sum_{n=0}^{\infty} \frac{x^n}{n!} e x = 1 + x + 2 ! x 2 + 3 ! x 3 + 4 ! x 4 + ⋯ = n = 0 ∑ ∞ n ! x n
sin x = x − x 3 3 ! + x 5 5 ! − x 7 7 ! + ⋯ = ∑ n = 0 ∞ ( − 1 ) n x 2 n + 1 ( 2 n + 1 ) ! \sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \cdots = \sum_{n=0}^{\infty} (-1)^n \frac{x^{2n+1}}{(2n+1)!} sin x = x − 3 ! x 3 + 5 ! x 5 − 7 ! x 7 + ⋯ = n = 0 ∑ ∞ ( − 1 ) n ( 2 n + 1 )! x 2 n + 1
cos x = 1 − x 2 2 ! + x 4 4 ! − x 6 6 ! + ⋯ = ∑ n = 0 ∞ ( − 1 ) n x 2 n ( 2 n ) ! \cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \cdots = \sum_{n=0}^{\infty} (-1)^n \frac{x^{2n}}{(2n)!} cos x = 1 − 2 ! x 2 + 4 ! x 4 − 6 ! x 6 + ⋯ = n = 0 ∑ ∞ ( − 1 ) n ( 2 n )! x 2 n
1 1 − x = 1 + x + x 2 + x 3 + ⋯ = ∑ n = 0 ∞ x n for ∣ x ∣ < 1 \frac{1}{1 - x} = 1 + x + x^2 + x^3 + \cdots = \sum_{n=0}^{\infty} x^n \quad \text{for } |x| \lt 1 1 − x 1 = 1 + x + x 2 + x 3 + ⋯ = n = 0 ∑ ∞ x n for ∣ x ∣ < 1
Notice that sin x only has odd powers and cos x only has even powers. The exponential has all powers. The geometric series 1/(1 - x) is the simplest of all.
-6 -4 -2 2 4 6 -1 1 sin(x) degree 1 degree 3 degree 5 degree 7
The blue curve is the actual sin(x). Each colored line is a Taylor polynomial of increasing degree. Near x = 0 they all agree, but higher-degree polynomials stay accurate over a wider range. The degree-7 polynomial (purple) tracks sin(x) closely all the way out to about x = 4.
Example 1: Maclaurin series for e to the x
All derivatives of e to the x are e to the x, so every derivative evaluated at 0 gives 1
f ( 0 ) = 1 , f ′ ( 0 ) = 1 , f ′ ′ ( 0 ) = 1 , f ′ ′ ′ ( 0 ) = 1 , … f(0) = 1, \quad f'(0) = 1, \quad f''(0) = 1, \quad f'''(0) = 1, \quad \ldots f ( 0 ) = 1 , f ′ ( 0 ) = 1 , f ′′ ( 0 ) = 1 , f ′′′ ( 0 ) = 1 , …
Plugging into the formula
e x = ∑ n = 0 ∞ 1 n ! x n = 1 + x + x 2 2 + x 3 6 + x 4 24 + ⋯ e^x = \sum_{n=0}^{\infty} \frac{1}{n!}\,x^n = 1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \frac{x^4}{24} + \cdots e x = n = 0 ∑ ∞ n ! 1 x n = 1 + x + 2 x 2 + 6 x 3 + 24 x 4 + ⋯
This converges for all real x (radius of convergence is infinity).
Example 2: Taylor series for ln x centered at x = 1
Compute the first few derivatives at x = 1
f ( x ) = ln x ⇒ f ( 1 ) = 0 f(x) = \ln x \quad \Rightarrow \quad f(1) = 0 f ( x ) = ln x ⇒ f ( 1 ) = 0
f ′ ( x ) = 1 x ⇒ f ′ ( 1 ) = 1 f'(x) = \frac{1}{x} \quad \Rightarrow \quad f'(1) = 1 f ′ ( x ) = x 1 ⇒ f ′ ( 1 ) = 1
f ′ ′ ( x ) = − 1 x 2 ⇒ f ′ ′ ( 1 ) = − 1 f''(x) = -\frac{1}{x^2} \quad \Rightarrow \quad f''(1) = -1 f ′′ ( x ) = − x 2 1 ⇒ f ′′ ( 1 ) = − 1
f ′ ′ ′ ( x ) = 2 x 3 ⇒ f ′ ′ ′ ( 1 ) = 2 f'''(x) = \frac{2}{x^3} \quad \Rightarrow \quad f'''(1) = 2 f ′′′ ( x ) = x 3 2 ⇒ f ′′′ ( 1 ) = 2
f ( 4 ) ( x ) = − 6 x 4 ⇒ f ( 4 ) ( 1 ) = − 6 f^{(4)}(x) = -\frac{6}{x^4} \quad \Rightarrow \quad f^{(4)}(1) = -6 f ( 4 ) ( x ) = − x 4 6 ⇒ f ( 4 ) ( 1 ) = − 6
The pattern for the nth derivative at 1 is (-1)^(n+1) times (n - 1) factorial. Plugging into the Taylor formula
ln x = ( x − 1 ) − ( x − 1 ) 2 2 + ( x − 1 ) 3 3 − ( x − 1 ) 4 4 + ⋯ \ln x = (x - 1) - \frac{(x - 1)^2}{2} + \frac{(x - 1)^3}{3} - \frac{(x - 1)^4}{4} + \cdots ln x = ( x − 1 ) − 2 ( x − 1 ) 2 + 3 ( x − 1 ) 3 − 4 ( x − 1 ) 4 + ⋯
= ∑ n = 1 ∞ ( − 1 ) n + 1 n ( x − 1 ) n = \sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{n}(x - 1)^n = n = 1 ∑ ∞ n ( − 1 ) n + 1 ( x − 1 ) n
This converges for 0 less than x less than or equal to 2 (radius R = 1 centered at 1).
0.5 1 1.5 2 2.5 -2 -1 1 ln(x) degree 1 degree 2 degree 3 degree 4
The blue curve is ln(x). The Taylor polynomials all pass through (1, 0) and match ln(x) well near the center, but diverge outside the interval (0, 2]. Higher-degree polynomials hug the curve longer before peeling away.
Example 3: Building new series from known ones
Find the Maclaurin series for x times e to the x.
Start with the known series for e to the x and multiply every term by x
x e x = x ( 1 + x + x 2 2 ! + x 3 3 ! + ⋯ ) xe^x = x\left(1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots\right) x e x = x ( 1 + x + 2 ! x 2 + 3 ! x 3 + ⋯ )
= x + x 2 + x 3 2 ! + x 4 3 ! + ⋯ = ∑ n = 1 ∞ x n ( n − 1 ) ! = x + x^2 + \frac{x^3}{2!} + \frac{x^4}{3!} + \cdots = \sum_{n=1}^{\infty} \frac{x^n}{(n-1)!} = x + x 2 + 2 ! x 3 + 3 ! x 4 + ⋯ = n = 1 ∑ ∞ ( n − 1 )! x n
You don’t need to recompute derivatives from scratch. Multiplying, substituting, differentiating, or integrating known series is often the fastest approach.
Taylor and Maclaurin series are used constantly in practice:
Game engines approximate sin, cos, and exp with low-degree Taylor polynomials for speed
Physics uses Taylor expansions to linearize complex equations near equilibrium points
Machine learning uses Taylor expansions to analyze loss functions and optimization landscapes
Signal processing represents signals as polynomial approximations for filtering and compression
Numerical computing uses series to evaluate special functions to arbitrary precision
You’ve Got This
Taylor series turn complicated functions into infinite polynomials. The recipe is simple: take derivatives, evaluate at the center, divide by n factorial. The four common Maclaurin series (e to the x, sin x, cos x, 1/(1 - x)) are worth memorizing because you can build many other series from them by multiplying, substituting, or differentiating. The visual really tells the story: more terms means a better approximation over a wider range.
A Maclaurin series is a Taylor series centered at A. $a = 1$ B. $a = -1$ C. $a = 0$ D. any point $a$
The coefficient of the nth term in a Taylor series is A. $f(a) \cdot n!$ B. $f^{(n)}(a)$ C. $\frac{f^{(n)}(a)}{n!}$ D. $\frac{n!}{f^{(n)}(a)}$
The Maclaurin series for $\sin x$ contains only A. even powers of x B. odd powers of x C. all powers of x D. constant terms
To find the series for $xe^x$, you can A. only compute derivatives from scratch B. multiply the known $e^x$ series by $x$ C. divide the $\sin x$ series by $x$ D. use the geometric series formula
Adding more terms to a Taylor polynomial A. makes the approximation worse B. has no effect C. improves the approximation over a wider range D. changes the center point
Retry Quiz