Tutorials › Calculus II › Common Taylor Polynomial Calculation Errors

Taylor Polynomials · Tutorial 823 of 998

Common Taylor Polynomial Calculation Errors

Use the Taylor polynomial formula carefully, diagnose common calculation errors, and verify a polynomial by checking its values and derivatives at the center.

Beginner 9 min read

What You'll Learn

  • Write the Taylor polynomial with the correct derivative order and factorial.
  • Keep the center consistent in both derivative evaluation and polynomial powers.
  • Distinguish a polynomial of degree at most n from one with every power present.
  • Check a proposed Taylor polynomial by differentiating it at the center.
  • Identify when a zero coefficient explains an absent power.

Why Taylor Calculations Need Care

A Taylor polynomial is built from derivatives evaluated at a chosen center. Its formula is compact, but several details must agree: the derivative order, the factorial, the center, and the power of the centered variable. A mistake in any one of these can produce a plausible-looking polynomial that does not match the function’s derivatives at the center.

This tutorial focuses on diagnosing those errors. The main check is direct: a Taylor polynomial of degree \(n\) centered at \(a\) must have the same value and the same derivatives through order \(n\) as the function at \(a\). That check often reveals an error before the polynomial is used as a local model.

The Formula and Its Parts

Definition: If \(f\) has derivatives through order \(n\) at \(a\), its Taylor polynomial of degree \(n\) centered at \(a\) is $$ P_n(x)=\sum_{k=0}^{n}\frac{f^{(k)}(a)}{k!}(x-a)^k. $$ Here \(f^{(0)}(a)=f(a)\), \(0!=1\), and \(k!\) is the factorial of \(k\).

Each index \(k\) identifies a matching trio: the \(k\)th derivative \(f^{(k)}(a)\), the divisor \(k!\), and the power \((x-a)^k\). The term for \(k=0\) is the constant \(f(a)\); the term for \(k=1\) uses \(f'(a)(x-a)\). The terms continue in the same order up to \(k=n\).

The phrase degree \(n\) means that powers above \(n\) are not included. It does not promise that the coefficient of \((x-a)^n\) is nonzero, or that every lower power appears. If a derivative at the center is zero, its corresponding term is zero.

Why the Derivative Order and Factorial Match

The factorial is not an optional adjustment. It ensures that differentiating the \(k\)th term \(k\) times gives \(f^{(k)}(a)\) at the center. The same fact also gives a reliable way to check a proposed polynomial.

1
Differentiate one term.
For \(k\geq j\), differentiating \((x-a)^k\) \(j\) times gives \(\frac{k!}{(k-j)!}(x-a)^{k-j}\).
2
Evaluate at the center.
If \(k>j\), the result still contains a positive power of \(x-a\), so it is zero at \(x=a\). If \(k<j\), differentiating \(j\) times gives zero.
3
Keep the one surviving term.
For \(k=j\), the coefficient \(f^{(j)}(a)/j!\) is multiplied by \(j!\). The result is \(f^{(j)}(a)\).

Thus, for every \(j\) from \(0\) through \(n\), \(P_n^{(j)}(a)=f^{(j)}(a)\). This is a complete justification for the derivative check: in the \(j\)th derivative, all terms except the one indexed by \(j\) vanish at the center, and that term’s factorial cancels exactly.

Worked Example: Checking Derivative Order and Factorials

Worked Example: Checking Derivative Order and Factorials

Find the degree-three Taylor polynomial for \(f(x)=\ln x\) centered at \(a=1\). Then examine what happens if the third derivative is mistakenly placed in the squared-term slot.

Differentiate in order:

$$ f(x)=\ln x,\qquad f'(x)=\frac{1}{x},\qquad f''(x)=-\frac{1}{x^2},\qquad f'''(x)=\frac{2}{x^3}. $$

Evaluate each derivative at \(1\):

$$ f(1)=0,\qquad f'(1)=1,\qquad f''(1)=-1,\qquad f'''(1)=2. $$

Use derivative order \(k\) with factorial \(k!\) and power \((x-1)^k\):

$$ \begin{aligned} P_3(x) &=f(1)+\frac{f'(1)}{1!}(x-1) +\frac{f''(1)}{2!}(x-1)^2 +\frac{f'''(1)}{3!}(x-1)^3\\ &=0+(x-1)-\frac{1}{2}(x-1)^2+\frac{1}{3}(x-1)^3. \end{aligned} $$

Check the result by differentiating:

$$ \begin{aligned} P_3'(x)&=1-(x-1)+(x-1)^2, & P_3'(1)&=1=f'(1),\\ P_3''(x)&=-1+2(x-1), & P_3''(1)&=-1=f''(1),\\ P_3'''(x)&=2, & P_3'''(1)&=2=f'''(1). \end{aligned} $$

Now put the third-derivative value \(2\) in the squared-term slot, but retain the factorial for that slot. The resulting term is \(\frac{2}{2!}(x-1)^2=(x-1)^2\). Its second derivative at \(1\) is \(2\), not the required value \(-1\). If the factorial is also omitted, the term becomes \(2(x-1)^2\), whose second derivative is \(4\). In either case the check fails. The squared-term slot must use \(f''(1)=-1\), not \(f'''(1)=2\).

Worked Example: Keeping the Center Consistent

Worked Example: Keeping the Center Consistent

Find the degree-two Taylor polynomial for \(f(x)=x^2+1\) centered at \(a=1\), and check why using powers of \(x\) in place of powers of \(x-1\) is an error.

The needed derivatives and their values at the center are:

$$ f(1)=2,\qquad f'(x)=2x,\quad f'(1)=2,\qquad f''(x)=2,\quad f''(1)=2. $$

Substitute these into the formula, keeping the center \(1\) in each power:

$$ \begin{aligned} P_2(x) &=f(1)+\frac{f'(1)}{1!}(x-1)+\frac{f''(1)}{2!}(x-1)^2\\ &=2+2(x-1)+(x-1)^2\\ &=2+2x-2+x^2-2x+1\\ &=x^2+1. \end{aligned} $$

At the center, the polynomial gives \(P_2(1)=1+1=2=f(1)\). Also, \(P_2'(x)=2x\), so \(P_2'(1)=2=f'(1)\), and \(P_2''(x)=2\), so \(P_2''(1)=2=f''(1)\).

A mistaken expression \(2+2x+x^2\) uses the right numerical derivative values but the wrong powers. At \(x=1\), it gives \(2+2+1=5\), whereas \(f(1)=2\). The correction is to use \((x-a)^k\), not \(x^k\), whenever the center is \(a\). Only when \(a=0\) do these powers become \(x^k\).

Worked Example: Missing Powers and the Meaning of Degree

Worked Example: Missing Powers and the Meaning of Degree

Find the degree-four Taylor polynomial for \(f(x)=\sin x\) centered at \(0\). Use the result to explain why a Taylor polynomial need not contain every power up to its stated degree.

The function and its first four derivatives, evaluated at \(0\), are:

$$ \begin{aligned} f(0)&=0, & f'(x)=\cos x,\quad f'(0)&=1,\\ f''(x)&=-\sin x, & f''(0)&=0,\\ f'''(x)&=-\cos x, & f'''(0)&=-1,\\ f^{(4)}(x)&=\sin x, & f^{(4)}(0)&=0. \end{aligned} $$

Write every slot through order four, including the zero coefficients:

$$ \begin{aligned} P_4(x) &=0+\frac{1}{1!}x+\frac{0}{2!}x^2 -\frac{1}{3!}x^3+\frac{0}{4!}x^4\\ &=x-\frac{x^3}{6}. \end{aligned} $$

The \(x^2\) and \(x^4\) terms are absent because their coefficients are zero, not because the calculation stopped early. The polynomial has degree three, which is less than or equal to four. Check it: \(P_4(0)=0\), \(P_4'(x)=1-\frac{x^2}{2}\), \(P_4'(0)=1\), \(P_4''(x)=-x\), \(P_4''(0)=0\), \(P_4'''(x)=-1\), and \(P_4^{(4)}(x)=0\). These agree with the corresponding derivatives of \(\sin x\) at \(0\).

A Practical Error Check

When a Taylor polynomial looks wrong, compare its terms against the formula before expanding or simplifying. This separates structural errors from ordinary algebra errors. In particular, do not assume that a polynomial is correct merely because its terms seem to have plausible coefficients.

Takeaway: For a Taylor polynomial centered at \(a\), the \(k\)th term is \(\frac{f^{(k)}(a)}{k!}(x-a)^k\). The derivative order, factorial, and centered power must all use the same index \(k\).

Common warning signs include using \(f^{(k)}(a)\) beside a different power, evaluating derivatives at a point other than the stated center, or treating a zero coefficient as if it justified skipping the calculation. Once the polynomial is assembled, check that \(P_n^{(j)}(a)=f^{(j)}(a)\) for each \(j=0,1,\ldots,n\). A failed check identifies that something in the calculation needs correction.

Common Mistakes and Corrections

MistakeWhy it failsCorrection
Using a derivative of the wrong orderThe coefficient in the \(k\)th slot must reproduce the \(k\)th derivative at the center.Match \(f^{(k)}(a)\) with \(k!\) and \((x-a)^k\).
Omitting \(k!\)Repeated differentiation multiplies the power by \(k!\).Divide the \(k\)th derivative value by \(k!\).
Using \(x^k\) at a nonzero centerThe polynomial may not even have the correct value at \(a\).Use \((x-a)^k\) for every term.
Expecting every power through \(n\) to appearA derivative at the center may be zero.Include the slot; simplify it to zero only after evaluating its coefficient.

These checks concern the polynomial’s construction and its derivatives at the center. They do not, by themselves, establish how accurate the polynomial is away from the center. For the calculation at hand, however, they provide a direct way to catch the errors addressed here.

Check Your Understanding

For each question, use the Taylor polynomial formula and its derivative check to explain your answer.

  1. In the term of order \(3\), which derivative, factorial, and power belong together for a polynomial centered at \(a\)?
  2. If \(f''(a)=6\), what is the coefficient of \((x-a)^2\), and what is the second derivative of that term at \(a\)?
  3. Why is replacing \((x-a)^k\) with \(x^k\) generally incorrect when \(a\neq 0\)?
  4. Can a degree-five Taylor polynomial have no \(x^5\) term? Give the reason.
  5. What values should you compare when checking a proposed degree-\(n\) Taylor polynomial at its center?