Taylor Series Calculator

Expand functions as Taylor or Maclaurin series with AI-powered step-by-step solutions

Drag & drop or click to add images or PDF

Math Input
Taylor series of e^x at x=0 up to degree 5
Maclaurin series of sin(x)
Taylor series of ln(x) at x=1
Maclaurin series of 1/(1-x)

What is a Taylor Series?

A Taylor series represents a function as an infinite polynomial built from the function's derivatives at a single point aa:

f(x)=n=0f(n)(a)n!(xa)nf(x) = \sum_{n=0}^\infty \frac{f^{(n)}(a)}{n!}(x - a)^n

When a=0a = 0, the series is called a Maclaurin series:

f(x)=n=0f(n)(0)n!xnf(x) = \sum_{n=0}^\infty \frac{f^{(n)}(0)}{n!} x^n

Why this matters: Taylor series convert calculations on possibly hard functions (sinx\sin x, exe^x, lnx\ln x, 1+x\sqrt{1 + x}) into calculations on polynomials, which computers and humans can handle. They're the foundation of numerical methods, asymptotic expansions, and approximation theory.

The Taylor polynomial of degree nn is the partial sum keeping terms up to (xa)n(x-a)^n. It's the best polynomial approximation of ff near aa in a precise sense (matching value and first nn derivatives).

How to Build a Taylor Series

Step 1: Compute Derivatives at the Expansion Point

For f(x)f(x) and expansion point aa, compute f(a),f(a),f(a),,f(n)(a)f(a), f'(a), f''(a), \ldots, f^{(n)}(a).

Step 2: Plug into the Formula

Tn(x)=f(a)+f(a)(xa)+f(a)2!(xa)2++f(n)(a)n!(xa)nT_n(x) = f(a) + f'(a)(x - a) + \frac{f''(a)}{2!}(x - a)^2 + \cdots + \frac{f^{(n)}(a)}{n!}(x - a)^n

Common Maclaurin Series to Memorize

ex=n=0xnn!=1+x+x22!+x33!+e^x = \sum_{n=0}^\infty \frac{x^n}{n!} = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots

sinx=n=0(1)nx2n+1(2n+1)!=xx33!+x55!\sin x = \sum_{n=0}^\infty \frac{(-1)^n x^{2n+1}}{(2n+1)!} = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \cdots

cosx=n=0(1)nx2n(2n)!=1x22!+x44!\cos x = \sum_{n=0}^\infty \frac{(-1)^n x^{2n}}{(2n)!} = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots

11x=n=0xn=1+x+x2+x3+,x<1\frac{1}{1 - x} = \sum_{n=0}^\infty x^n = 1 + x + x^2 + x^3 + \cdots, \quad |x| < 1

ln(1+x)=n=1(1)n+1xnn=xx22+x33,1<x1\ln(1 + x) = \sum_{n=1}^\infty \frac{(-1)^{n+1} x^n}{n} = x - \frac{x^2}{2} + \frac{x^3}{3} - \cdots, \quad -1 < x \leq 1

Radius of Convergence

A Taylor series converges only within a radius of convergence RR around aa. Find it using the ratio test:

R=limnanan+1R = \lim_{n \to \infty} \left|\frac{a_n}{a_{n+1}}\right|

Outside this radius, the series diverges and does not represent the function. Inside, convergence is usually uniform on compact subsets.

Manipulating Known Series

For speed, substitute, differentiate, or integrate known series instead of computing derivatives from scratch:

  • ex2=1x2+x42!x63!+e^{-x^2} = 1 - x^2 + \frac{x^4}{2!} - \frac{x^6}{3!} + \cdots (substitute x2-x^2 into exe^x)
  • 1(1x)2=ddx11x=n=1nxn1\frac{1}{(1-x)^2} = \frac{d}{dx}\frac{1}{1-x} = \sum_{n=1}^\infty n x^{n-1}

Common Mistakes to Avoid

  • Forgetting the factorial: The nnth term has a 1n!\frac{1}{n!}, not just the derivative. Skipping this gives a wildly wrong answer.
  • Using the series outside its radius of convergence: 11x\frac{1}{1-x} does not equal xn\sum x^n when x>1|x| > 1 — the series diverges there.
  • Forgetting to center at aa: A Taylor series around aa uses powers of (xa)(x-a), not xx.
  • Confusing degree and number of terms: A degree-nn Taylor polynomial has n+1n+1 terms (degrees 00 through nn).
  • Substitution sign errors: sin(x)=sin(x)\sin(-x) = -\sin(x), so the series of sin(x)\sin(-x) has alternating signs flipped compared to sin(x)\sin(x).

Examples

Step 1: f(x)=exf(x) = e^x, so f(n)(x)=exf^{(n)}(x) = e^x for all nn
Step 2: Evaluate at x=0x = 0: f(n)(0)=1f^{(n)}(0) = 1 for all nn
Step 3: Apply formula: T4(x)=1+x+x22!+x33!+x44!T_4(x) = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \frac{x^4}{4!}
Step 4: Simplify: 1+x+x22+x36+x4241 + x + \frac{x^2}{2} + \frac{x^3}{6} + \frac{x^4}{24}
Answer: 1+x+x22+x36+x4241 + x + \dfrac{x^2}{2} + \dfrac{x^3}{6} + \dfrac{x^4}{24}

Step 1: Derivatives at 00 cycle: sin(0)=0,cos(0)=1,sin(0)=0,cos(0)=1,sin(0)=0,\sin(0)=0, \cos(0)=1, -\sin(0)=0, -\cos(0)=-1, \sin(0)=0, \ldots
Step 2: Pattern: only odd-degree terms survive, with alternating signs
Step 3: T7(x)=xx33!+x55!x77!T_7(x) = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!}
Step 4: Simplify: xx36+x5120x75040x - \frac{x^3}{6} + \frac{x^5}{120} - \frac{x^7}{5040}
Answer: xx36+x5120x75040x - \dfrac{x^3}{6} + \dfrac{x^5}{120} - \dfrac{x^7}{5040}

Step 1: f(x)=ln(x)f(x) = \ln(x), f(1)=0f(1) = 0
Step 2: f(x)=1/xf'(x) = 1/x, f(1)=1f'(1) = 1
Step 3: f(x)=1/x2f''(x) = -1/x^2, f(1)=1f''(1) = -1
Step 4: f(x)=2/x3f'''(x) = 2/x^3, f(1)=2f'''(1) = 2
Step 5: T3(x)=0+1(x1)+12(x1)2+26(x1)3T_3(x) = 0 + 1 \cdot (x-1) + \frac{-1}{2}(x-1)^2 + \frac{2}{6}(x-1)^3
Step 6: Simplify: (x1)(x1)22+(x1)33(x-1) - \frac{(x-1)^2}{2} + \frac{(x-1)^3}{3}
Answer: (x1)(x1)22+(x1)33(x-1) - \dfrac{(x-1)^2}{2} + \dfrac{(x-1)^3}{3}

Frequently Asked Questions

A Maclaurin series is a Taylor series centered at zero. Taylor series can be centered at any point a; choosing a strategically (often where derivatives are easy to compute) simplifies the expansion.

Inside the radius of convergence, and only if the remainder term goes to zero as the degree increases. Functions that satisfy this everywhere their series converges are called analytic. Most elementary functions (e^x, sin, cos, polynomials, rational functions) are analytic on their domains.

Use the ratio test: R = lim |a_n / a_(n+1)|. For e^x, sin, cos the radius is infinite. For 1/(1-x) it is 1. For ln(1+x) it is 1.

Among all polynomials of degree at most n, the Taylor polynomial T_n matches f's value and first n derivatives at the expansion point. This gives the smallest error among polynomials of that degree for x near a.

Related Solvers

Series CalculatorDerivative CalculatorIntegral Calculator
Try AI-Math for Free

Get step-by-step solutions to any math problem. Upload a photo or type your question.

Start Solving