Tutorials › Calculus II › Efficient Derivative Patterns for High Degrees

Taylor Polynomials · Tutorial 816 of 998

Efficient Derivative Patterns for High Degrees

Use derivative cycles and recurring formulas to find Taylor coefficients without repeatedly differentiating from scratch.

Beginner 10 min read

What You'll Learn

  • Extract Taylor coefficients from derivative values at the center.
  • Use a single formula to generate all derivatives of an exponential function.
  • Track the four-step derivative cycle of sine and cosine.
  • Compute logarithmic derivatives with a sign-and-factorial pattern.
  • Generate real-power derivatives with a falling-product recurrence.
  • Check a Taylor polynomial by comparing its derivatives at the center.

Why derivative patterns help

A Taylor polynomial of degree \(n\) requires the values of a function and its first \(n\) derivatives at a chosen center. When \(n\) is large, differentiating repeatedly and independently is slow and makes sign and factorial errors more likely. Many familiar functions have a pattern that lets us generate all the required derivative values in an organized way.

The goal here is not to find a new type of approximation. It is to compute the coefficients of a Taylor polynomial more efficiently by identifying what happens to the derivatives as the order increases.

Definition: For a function \(f\) with derivatives through order \(n\) at \(x=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. $$ The coefficient of \((x-a)^k\) is the \(k\)th derivative value at the center divided by \(k!\).

Write \(h=x-a\) when it makes the expressions easier to read. The coefficient of \(h^k\) is \(f^{(k)}(a)/k!\), so an efficient calculation has two parts: find a rule for \(f^{(k)}(a)\), then divide each value by its matching factorial. A pattern in the derivatives does not remove the factorial in the Taylor formula.

A general way to organize the calculation

Before calculating, identify what changes when one more derivative is taken. The result might repeat in a cycle, as with sine and cosine; it might gain a constant factor, as with an exponential; or it might gain a new factor in a product, as with a real power. Once that pattern is clear, evaluate it at the center and fill the coefficients in order.

1
Identify the derivative pattern.
Look for a cycle, a constant multiplier, or a recurrence that relates one derivative to the next.
2
Evaluate at the center.
Use the pattern to determine \(f^{(k)}(a)\) for each order needed.
3
Divide by the correct factorial.
Use \(k!\) for the coefficient of \((x-a)^k\), including \(0!=1\).
4
Check the derivative data.
Differentiate the resulting polynomial and confirm that its derivatives at \(a\) match the function’s derivatives through order \(n\).

Exponential derivatives: the same factor at every step

For \(f(x)=e^{cx}\), where \(c\) is a constant, each differentiation multiplies the current expression by \(c\). In fact, for every nonnegative integer \(k\),

$$ f^{(k)}(x)=c^k e^{cx}. $$

This follows by induction. It holds for \(k=0\), since \(f^{(0)}(x)=e^{cx}\) and \(c^0=1\). If it holds for \(k\), differentiating gives \(f^{(k+1)}(x)=c^k c e^{cx}=c^{k+1}e^{cx}\), establishing the next case. The same pattern applies to \(e^{c(x-a)}\); its \(k\)th derivative is \(c^k e^{c(x-a)}\).

Worked Example: A degree-five Maclaurin polynomial for \(e^{2x}\)

Find the Taylor polynomial of degree five centered at zero. Here \(f(x)=e^{2x}\), so \(f^{(k)}(x)=2^k e^{2x}\). At zero, \(e^0=1\), and therefore the derivative values for orders zero through five are \(1,2,4,8,16,32\).

Divide each value by the factorial for its order: \(0!=1\), \(1!=1\), \(2!=2\), \(3!=6\), \(4!=24\), and \(5!=120\). The coefficients are \(1,2,2,4/3,2/3,4/15\), respectively. Thus

$$ P_5(x)=1+2x+2x^2+\frac{4}{3}x^3+\frac{2}{3}x^4+\frac{4}{15}x^5. $$

Check the coefficients by differentiating at zero: \(P_5(0)=1\), \(P_5'(0)=2\), \(P_5''(0)=2(2)=4\), \(P_5'''(0)=6(4/3)=8\), \(P_5^{(4)}(0)=24(2/3)=16\), and \(P_5^{(5)}(0)=120(4/15)=32\). These match \(f^{(k)}(0)=2^k\) at every order from zero through five.

Trigonometric derivatives: keep track of the cycle

The derivatives of sine and cosine repeat every four differentiations. Starting from \(\sin x\), the cycle is \(\sin x,\cos x,-\sin x,-\cos x\), after which the first expression returns. Starting from \(\cos x\), it is \(\cos x,-\sin x,-\cos x,\sin x\). This follows by differentiating each expression once and recording the result. At a nonzero center, the cycle still applies; evaluate the appropriate sine or cosine value at that center.

Worked Example: A degree-six Taylor polynomial for sine at \(\pi/6\)

Let \(f(x)=\sin x\) and take \(a=\pi/6\). The derivative cycle gives \(f,f',f'',f''',f^{(4)},f^{(5)},f^{(6)}=\sin x,\cos x,-\sin x,-\cos x,\sin x,\cos x,-\sin x\). Since \(\sin(\pi/6)=1/2\) and \(\cos(\pi/6)=\sqrt{3}/2\), the derivative values at the center, in order, are \(1/2,\sqrt{3}/2,-1/2,-\sqrt{3}/2,1/2,\sqrt{3}/2,-1/2\).

Divide those values by \(0!=1,1!=1,2!=2,3!=6,4!=24,5!=120,6!=720\), respectively. The resulting coefficients are \(1/2,\sqrt{3}/2,-1/4,-\sqrt{3}/12,1/48,\sqrt{3}/240,-1/1440\). Therefore, with \(h=x-\pi/6\),

$$ P_6(x)=\frac12+\frac{\sqrt{3}}{2}h-\frac14h^2-\frac{\sqrt{3}}{12}h^3+\frac{1}{48}h^4+\frac{\sqrt{3}}{240}h^5-\frac{1}{1440}h^6. $$

For a coefficient \(c_k\) of \(h^k\), the \(k\)th derivative of that term at \(h=0\) is \(k!c_k\). Here the values \(k!c_k\), from \(k=0\) to \(6\), are exactly \(1/2,\sqrt{3}/2,-1/2,-\sqrt{3}/2,1/2,\sqrt{3}/2,-1/2\). Thus the polynomial’s derivatives at \(x=\pi/6\) agree with the sine derivative cycle through degree six.

Logarithmic derivatives: alternate signs and factorials

For \(f(x)=\ln x\), the domain is \(x>0\). The first derivative is \(1/x\). Further differentiations give \(-1/x^2\), \(2/x^3\), and \(-6/x^4\). For every integer \(k\geq 1\), the pattern is

$$ f^{(k)}(x)=(-1)^{k-1}\frac{(k-1)!}{x^k}. $$

To see why the formula continues, suppose it holds at order \(k\). Differentiating multiplies by \(-k\) and changes \(x^{-k}\) to \(x^{-k-1}\). The new coefficient is \((-1)^{k-1}(k-1)!(-k)=(-1)^k k!\), as required for order \(k+1\). At a center \(a>0\), the Taylor coefficient for \(k\geq1\) is consequently \((-1)^{k-1}(k-1)!/(k!a^k)=(-1)^{k-1}/(k a^k)\).

Worked Example: A degree-five Taylor polynomial for \(\ln x\) at \(1\)

At \(a=1\), \(f(1)=\ln 1=0\). The derivative formula gives \(f'(1)=1\), \(f''(1)=-1\), \(f'''(1)=2\), \(f^{(4)}(1)=-6\), and \(f^{(5)}(1)=24\). Dividing in turn by \(1!,2!,3!,4!,5!\) gives coefficients \(1,-1/2,1/3,-1/4,1/5\). Therefore

$$ P_5(x)=(x-1)-\frac{(x-1)^2}{2}+\frac{(x-1)^3}{3}-\frac{(x-1)^4}{4}+\frac{(x-1)^5}{5}. $$

To check, the derivatives of this polynomial at \(1\) are \(0,1,-1,2,-6,24\) at orders zero through five: each coefficient of \((x-1)^k\), multiplied by \(k!\), gives the corresponding value. These agree with \(\ln x\) and its derivatives at \(1\).

Real powers: build a falling product

For a real exponent \(\alpha\), consider \(f(x)=(1+x)^\alpha\) on an interval where \(1+x>0\). Repeated differentiation gives

$$ f^{(k)}(x)=\alpha(\alpha-1)(\alpha-2)\cdots(\alpha-k+1)(1+x)^{\alpha-k}, \qquad k\geq1. $$

Each derivative lowers the exponent by one and multiplies by the exponent currently in front. In particular, at \(x=0\), the derivative value is the product \(\alpha(\alpha-1)\cdots(\alpha-k+1)\). Dividing by \(k!\) gives the Taylor coefficient. This method avoids expanding the product afresh through a long chain of differentiation.

Worked Example: A degree-five Taylor polynomial for \(\sqrt{1+x}\)

Set \(\alpha=1/2\). The derivative values at zero, beginning with \(f(0)=1\), are obtained from the falling products:

$$ \begin{aligned} f'(0)&=\frac12,\\ f''(0)&=\frac12\left(-\frac12\right)=-\frac14,\\ f'''(0)&=\frac12\left(-\frac12\right)\left(-\frac32\right)=\frac38,\\ f^{(4)}(0)&=\frac12\left(-\frac12\right)\left(-\frac32\right)\left(-\frac52\right)=-\frac{15}{16},\\ f^{(5)}(0)&=\frac12\left(-\frac12\right)\left(-\frac32\right)\left(-\frac52\right)\left(-\frac72\right)=\frac{105}{32}. \end{aligned} $$

Now divide by the matching factorials: \(1/2\) by \(1!\) gives \(1/2\); \(-1/4\) by \(2!\) gives \(-1/8\); \(3/8\) by \(3!\) gives \(1/16\); \(-15/16\) by \(4!\) gives \(-5/128\); and \(105/32\) by \(5!\) gives \(7/256\). Thus

$$ P_5(x)=1+\frac12x-\frac18x^2+\frac1{16}x^3-\frac5{128}x^4+\frac7{256}x^5. $$

Check by multiplying each coefficient by its factorial: the resulting derivative values at zero are \(1,1/2,-1/4,3/8,-15/16,105/32\), exactly the values obtained from the falling products. The square root function is defined here for \(x>-1\), which includes the center \(0\).

Common pitfall: confusing derivatives with coefficients

A frequent error is to use the derivative values themselves as the Taylor coefficients. For example, for \(\ln x\) at \(1\), the third derivative is \(f'''(1)=2\). Writing \(2(x-1)^3\) as the cubic term is incorrect: the Taylor coefficient is \(f'''(1)/3!=2/6=1/3\). The correct cubic term is \((x-1)^3/3\). Differentiating that term three times gives \(6/3=2\) at the center, as required.

Another risk is losing track of a cycle. With sine, the second derivative is \(-\sin x\), not \(\sin x\); the minus sign changes every other pair of entries. Write the cycle explicitly before substituting the center rather than trying to recall several signs at once.

Key takeaway: A derivative pattern supplies derivative values, not Taylor coefficients. For every order \(k\), divide \(f^{(k)}(a)\) by \(k!\) before attaching the factor \((x-a)^k\).

Check Your Understanding

Use the derivative patterns and coefficient checks from this tutorial to answer the following questions.

  1. For \(f(x)=e^{3x}\), what is \(f^{(4)}(0)\), and what is the coefficient of \(x^4\) in its degree-four Maclaurin polynomial?
  2. List the first four derivatives of \(\cos x\), beginning with the function itself. What is the fourth derivative?
  3. For \(\ln x\) centered at \(a>0\), give the coefficient of \((x-a)^k\) for \(k\geq1\).
  4. Write the falling product that gives the sixth derivative of \((1+x)^\alpha\) at zero.
  5. Why is it incorrect to use \(f^{(k)}(a)\) directly as the coefficient of \((x-a)^k\)?