☰ Course contents
Mathematics 🎓 University Year 1 Taylor Series: Building Any Smooth Curve from Polynomials
🎓 University Year 1 · Lesson 1 of 15

Taylor Series: Building Any Smooth Curve from Polynomials

Match a function's value and all its derivatives at one point, and a polynomial will trace the curve ever more faithfully as you add terms.

University Year 1Calculus II / Linear Algebra
Taylor Series: Building Any Smooth Curve from Polynomials — illustration
💡
The big idea: Polynomials are the functions we can actually compute — just add and multiply. A Taylor series turns a complicated function like sin, cos or e<sup>x</sup> into an infinite polynomial by demanding that, at a chosen centre, the polynomial&rsquo;s value and every derivative agree with the function&rsquo;s. Keep the first few terms and you get a polynomial approximation that is superb near the centre; keep them all and, inside the radius of convergence, the polynomial <em>is</em> the function.
🎯 By the end, you'll be able to
  • State the Taylor and Maclaurin series of a function in terms of its derivatives
  • Explain why matching derivatives forces the coefficients f⁽ⁿ⁾(a)/n!
  • Write the Maclaurin series of eˣ, sin x and cos x from memory
  • Approximate a function with a Taylor polynomial and judge where the approximation is trustworthy
📎 You should already know
  • Derivatives and higher-order derivatives
  • Factorials and sigma (summation) notation
  • Convergence of a series

Why polynomials are special

A computer cannot evaluate sin x or ex directly — there is no finite recipe of pluses and times that gives them exactly. Polynomials, on the other hand, are nothing but pluses and times. So the central trick of calculus is this: replace a hard function, near a point of interest, with a polynomial that hugs it closely.

The question is which polynomial. The Taylor idea is beautifully greedy: make the polynomial agree with the function as completely as possible at one chosen point — same height, same slope, same curvature, same rate-of-change-of-curvature, and so on through every derivative.

🔑 Match every derivative at the centre
To approximate f near a point x = a, build a polynomial whose value and all its derivatives at a equal those of f. Each matched derivative pins down one more coefficient, and each new term bends the polynomial to follow f a little further from the centre.
\[ f(x)=\sum_{n=0}^{\infty}\frac{f^{(n)}(a)}{n!}\,(x-a)^{n}=f(a)+f'(a)(x-a)+\frac{f''(a)}{2!}(x-a)^{2}+\cdots \]
The Taylor series of f about x = a. Setting a = 0 gives the Maclaurin series.

Where the coefficients come from

Why the factorial? Suppose the polynomial is c0 + c1(x−a) + c2(x−a)2 + …. Plug in x = a and everything but c0 dies, so c0 = f(a). Differentiate once and set x = a: only the c1 term survives, giving c1 = f′(a). Differentiate n times and the (x−a)n term brings down a factor of n!, so cn = f(n)(a)÷n!. The n! is the bookkeeping from repeated differentiation.

🎮 The Taylor Sculptor LIVE
Add polynomial terms one at a time to sculpt a curve into sin, cos or e^x.

The three you must know

Centred at 0, the exponential and the two basic trig functions have famously clean series. Notice that ex uses every power, cosine uses only even powers (it is an even function), and sine uses only odd powers (it is odd), with signs that alternate.

\[ e^{x}=\sum_{n=0}^{\infty}\frac{x^{n}}{n!}=1+x+\frac{x^{2}}{2!}+\frac{x^{3}}{3!}+\cdots \]
The Maclaurin series of e^x, valid for every real x.
\[ \sin x=x-\frac{x^{3}}{3!}+\frac{x^{5}}{5!}-\cdots \qquad \cos x=1-\frac{x^{2}}{2!}+\frac{x^{4}}{4!}-\cdots \]
Sine keeps the odd powers, cosine the even powers; both converge for all x.
📝 Worked example: Find the degree-3 Maclaurin polynomial of f(x) = eˣ and use it to estimate e^{0.2}.
  1. Every derivative of e^x is e^x, and \( e^{0}=1 \), so \( f(0)=f'(0)=f''(0)=f'''(0)=1 \).
  2. The coefficients are \( 1,\ 1,\ \tfrac{1}{2!}=\tfrac12,\ \tfrac{1}{3!}=\tfrac16 \), giving \( T_3(x)=1+x+\tfrac{x^2}{2}+\tfrac{x^3}{6} \).
  3. Substitute x = 0.2: \( 1+0.2+\tfrac{0.04}{2}+\tfrac{0.008}{6}=1+0.2+0.02+0.001333\ldots \)
✓ \( T_3(0.2)\approx \mathbf{1.22133} \), within about 0.00007 of the true value e^{0.2} = 1.22140&hellip;
📝 Worked example: Write the Maclaurin series of sin x and read off the term of degree 5.
  1. The derivatives of sin at 0 cycle through \( 0,1,0,-1 \), so only odd powers appear with alternating signs.
  2. This gives \( \sin x = x-\dfrac{x^3}{3!}+\dfrac{x^5}{5!}-\cdots \).
  3. The degree-5 term is \( +\dfrac{x^5}{5!} \), and \( 5!=120 \).
✓ The degree-5 term is <strong>+x⁵/120</strong>.
✨ The centre is home base
A Taylor polynomial is most accurate at the centre and gets steadily worse as you move away. Adding terms widens the region where it stays close, but for a fixed number of terms the error grows with distance from a. Whenever you can, centre the series near the input you care about.
⚠️ Convergence is not automatic
For ex, sin and cos the series converges to the function for every x. That is not true in general: 1/(1−x) = 1 + x + x2 + … only for |x| < 1, its radius of convergence. Outside that radius the polynomial can diverge wildly even though the function is perfectly well behaved. Always ask where a series is valid.

Check your understanding

1. In a Taylor series about x = a, what is the coefficient of (x − a)ⁿ?
Differentiating (x−a)ⁿ n times produces a factor n!, so to match f⁽ⁿ⁾(a) the coefficient must be f⁽ⁿ⁾(a)/n!.
2. What is the Maclaurin series of eˣ?
Every derivative of eˣ is eˣ, which equals 1 at x = 0, so every coefficient is 1/n!: the series is Σ xⁿ/n!.
3. The degree-3 term in the Maclaurin series of sin x is:
sin x = x − x³/3! + x⁵/5! − …, and 3! = 6, so the degree-3 term is −x³/6.
4. Which function's Maclaurin series contains only even powers of x?
cos x is an even function, so its series 1 − x²/2! + x⁴/4! − … uses only even powers. sin x uses odd powers; eˣ uses all powers.
5. The geometric series 1 + x + x² + x³ + … equals 1/(1 − x). For which x is this valid?
Its radius of convergence is 1: the series converges to 1/(1−x) exactly when |x| < 1 and diverges otherwise.
✅ Key takeaways
  • A Taylor series is the polynomial whose value and every derivative match f at a chosen centre a.
  • Coefficient of (x − a)ⁿ is f⁽ⁿ⁾(a)/n!; the factorial is the residue of differentiating n times.
  • Memorise the three Maclaurin series: eˣ = Σ xⁿ/n!, sin x = x − x³/3! + …, cos x = 1 − x²/2! + ….
  • Taylor polynomials are most accurate at the centre and degrade with distance; more terms widen the good region.
  • Convergence has a range: some series (like the geometric series) only equal their function inside a radius of convergence.