AP Calculus BC

Taylor Series Builder: Coefficients from Derivatives

A Taylor series is an infinite polynomial (a power series) reverse-engineered so its derivatives match f at a center a: the coefficient of the (x-a)^n term is the nth derivative of f at a divided by n factorial. A Maclaurin series is just this centered at 0. Grind the derivatives, or reuse a known series.

BCMaclaurin series (Taylor series centered at a = 0)
f(x) = e^xP_{3}(x)
Maclaurin polynomial, degree 3
P_{3}(x) = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!}

Converges to f(x) = e^x on (-\infty, \infty).

f(0.5)
1.6487
P_3(0.5)
1.6458
error
0.0029

Every coefficient is c_k = \dfrac{f^{(k)}(0)}{k!}. That is why raising the degree adds one more term and pulls P_{3} closer to the curve.

kf^{(k)}(0)k!c_k = f^{(k)}(0)/k!
0111
1111
212\frac{1}{2}
316\frac{1}{6}
4124\frac{1}{24}

This tool builds a Taylor polynomial one derivative at a time. Pick a function ff, a center aa, and a degree nn; the builder fills a table of derivatives f,f,f,f, f', f'', \dots, evaluates each one at the center, divides by a factorial, and drops the results in as coefficients. Then it graphs the polynomial on top of ff so you can watch it hug the curve near x=ax = a. Finding these approximations is CED Topic 10.11, and the one fact doing all the work is that the coefficient of the degree-nn term is f(n)(a)n!\frac{f^{(n)}(a)}{n!} (LIM-8.A.1).

The reason that formula works is worth seeing, because it is the whole idea of the tool. A Taylor polynomial is reverse-engineered to agree with ff at the center as closely as a polynomial of its degree can: it matches the value f(a)f(a), the slope f(a)f'(a), the concavity f(a)f''(a), and every higher derivative up to order nn, all at x=ax = a. Each term you add pins down exactly one more derivative. That is why more terms mean a tighter fit near the center, and why the fit is sharpest right at x=ax = a and loosens as you move away.

Pn(x)=k=0nf(k)(a)k!(xa)k=f(a)+f(a)(xa)+f(a)2!(xa)2++f(n)(a)n!(xa)nP_n(x) = \sum_{k=0}^{n} \frac{f^{(k)}(a)}{k!}(x-a)^k = f(a) + f'(a)(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \cdots + \frac{f^{(n)}(a)}{n!}(x-a)^n

Where do the factorial and the power (xa)k(x-a)^k come from? Differentiate a single term ck(xa)kc_k(x-a)^k a total of kk times: every term below it has already vanished, every term above it still carries a factor of (xa)(x-a) that dies at x=ax = a, and the term itself becomes k!ckk!\,c_k. Setting that equal to f(k)(a)f^{(k)}(a) forces ck=f(k)(a)k!c_k = \frac{f^{(k)}(a)}{k!}. The tool's derivative table is exactly this calculation laid out column by column: one row per derivative order, its value at the center, and the factorial you divide by to get the coefficient.

A Maclaurin series is not a different object; it is a Taylor series with the center fixed at a=0a = 0. Set the center to 00 in the builder and two things simplify: every (xa)k(x-a)^k collapses to a clean power xkx^k, and you evaluate each derivative at 00, usually the easiest input to plug in. That is why the three series worth memorizing, exe^x, sinx\sin x, and cosx\cos x, are always quoted as Maclaurin series (LIM-8.F.2). Centering anywhere else, say a=1a = 1 for lnx\ln x, gives a genuine Taylor series, and that is where the from-derivatives method earns its keep.

Two ways to get a series: pick the shorter one

Grinding out derivatives is the definition, not always the fast route, and knowing when to skip it is the real skill (Topic 10.15). Before you build a table, check whether ff is a known Maclaurin series in disguise. If ff is exe^x, sinx\sin x, cosx\cos x, or 11x\frac{1}{1-x} after a substitution, a constant multiple, a derivative, or an integral, start from the known series instead: to get the series for ex2e^{-x^2}, substitute x2-x^2 into the series for exe^x rather than differentiating ex2e^{-x^2} four times. Build from derivatives when the center is not 00, or when ff does not reduce to one of the four standard series.

FunctionMaclaurin seriesReach for it when
exe^xn=0xnn!=1+x+x22!+\sum_{n=0}^{\infty} \frac{x^n}{n!} = 1 + x + \frac{x^2}{2!} + \cdotsany exponential, or a substitution like ex2e^{-x^2}
sinx\sin xn=0(1)nx2n+1(2n+1)!=xx33!+\sum_{n=0}^{\infty} \frac{(-1)^n x^{2n+1}}{(2n+1)!} = x - \frac{x^3}{3!} + \cdotsodd-powered, sign-alternating targets
cosx\cos xn=0(1)nx2n(2n)!=1x22!+\sum_{n=0}^{\infty} \frac{(-1)^n x^{2n}}{(2n)!} = 1 - \frac{x^2}{2!} + \cdotseven-powered, sign-alternating targets
11x\frac{1}{1-x}n=0xn=1+x+x2+\sum_{n=0}^{\infty} x^n = 1 + x + x^2 + \cdots for x<1|x| < 1rational functions, via algebra or substitution

Worked example

Degree-3 Taylor polynomial for ln x centered at a = 1

Build the third-degree Taylor polynomial P3(x)P_3(x) for f(x)=lnxf(x) = \ln x centered at a=1a = 1, taking each coefficient straight from a derivative.

  1. Set up the coefficient formula at this center. With a=1a = 1, the polynomial is P3(x)=k=03f(k)(1)k!(x1)kP_3(x) = \sum_{k=0}^{3} \frac{f^{(k)}(1)}{k!}(x-1)^k, so you need ff and its first three derivatives, each evaluated at 11.
  2. Differentiate three times, rewriting as powers so the pattern is visible: f(x)=lnxf(x) = \ln x, then f(x)=x1f'(x) = x^{-1}, f(x)=x2f''(x) = -x^{-2}, and f(x)=2x3f'''(x) = 2x^{-3}.
  3. Evaluate every one at the center x=1x = 1: f(1)=ln1=0f(1) = \ln 1 = 0, f(1)=1f'(1) = 1, f(1)=1f''(1) = -1, and f(1)=2f'''(1) = 2. These are the raw derivative values, before any factorials.
  4. Divide each by its factorial to get the coefficients: c0=00!=0c_0 = \frac{0}{0!} = 0, c1=11!=1c_1 = \frac{1}{1!} = 1, c2=12!=12c_2 = \frac{-1}{2!} = -\frac{1}{2}, and c3=23!=26=13c_3 = \frac{2}{3!} = \frac{2}{6} = \frac{1}{3}.
  5. Attach each coefficient to its matching (x1)k(x-1)^k and add: P3(x)=0+1(x1)12(x1)2+13(x1)3P_3(x) = 0 + 1(x-1) - \frac{1}{2}(x-1)^2 + \frac{1}{3}(x-1)^3.
  6. Drop the zero term to read off the answer: P3(x)=(x1)12(x1)2+13(x1)3P_3(x) = (x-1) - \frac{1}{2}(x-1)^2 + \frac{1}{3}(x-1)^3. Sanity-check at the center: P3(1)=0=ln1P_3(1) = 0 = \ln 1 and P3(1)=1=f(1)P_3'(1) = 1 = f'(1), so the polynomial matches ff in value and slope at x=1x = 1, exactly as designed.

P3(x)=(x1)12(x1)2+13(x1)3P_3(x) = (x-1) - \frac{1}{2}(x-1)^2 + \frac{1}{3}(x-1)^3

Put this on a class page

Copy the snippet. Paste it into Google Sites, Canvas, WordPress or anything that accepts HTML. The caption has two followable links. Keep both. Attribution is required.

Widget page with a live previewEvery widgetGoogle Sites steps

Frequently asked questions

What is the difference between a Taylor series and a Maclaurin series?

A Maclaurin series is a Taylor series centered at a=0a = 0, nothing more. Every Maclaurin series is a Taylor series; the name just signals that the center is 00, so the terms are powers of xx and you evaluate the derivatives at 00. When a problem centers the expansion anywhere else, a=1a = 1, a=π2a = \frac{\pi}{2}, and so on, it is called a Taylor series, and you plug that center into f(n)(a)n!\frac{f^{(n)}(a)}{n!} and use (xa)n(x-a)^n.

Why do you divide by n!n! in a Taylor series?

The factorial cancels the one that appears when you differentiate the term cn(xa)nc_n(x-a)^n exactly nn times: that term becomes n!cnn!\,c_n at the center while every other term vanishes. To make the polynomial's nnth derivative match f(n)(a)f^{(n)}(a), you need n!cn=f(n)(a)n!\,c_n = f^{(n)}(a), which forces cn=f(n)(a)n!c_n = \frac{f^{(n)}(a)}{n!}. Without the factorial the higher derivatives would not line up.

What is the difference between a Taylor polynomial and a Taylor series?

A Taylor polynomial stops at a chosen degree nn; a Taylor series keeps going forever. Formally, a Taylor polynomial is a partial sum of the Taylor series (LIM-8.E.1). The builder shows a polynomial because you pick a finite degree, and as you raise that degree you are switching on more terms of the full series, tightening the fit around the center.

Do I have to compute every derivative to find a Taylor series?

Often no, and recognizing when to skip it is the point. If ff is exe^x, sinx\sin x, cosx\cos x, or 11x\frac{1}{1-x} after a substitution, constant multiple, derivative, or integral, start from that known Maclaurin series instead of differentiating repeatedly (Topic 10.15). Reserve the from-derivatives method for a nonzero center or a function that does not reduce to one of the standard series, like lnx\ln x centered at 11.