CP 4.5 - Maclaurin series and the general term

CP 4.5 - Maclaurin series and the general term

A function's derivatives at zero can reveal an entire power series. You will build Maclaurin expansions from those derivative values, distinguish a truncated approximation from the full series and describe the general term, including when many coefficients vanish.

How derivatives determine the coefficients

How could four polynomial terms give e0.1\mathrm{e}^{0.1} correctly to five decimal places? The answer starts with information about a function at just one point: zero.

For f(x)=exf(x)=\mathrm{e}^x, the value and every derivative at zero equal 11. The line 1+x1+x matches the value and slope there. Adding x2/2x^2/2 matches the second derivative too. The extra term adjusts the curve's bending while preserving its value and slope at zero.

You already know

From A-level Mathematics, differentiate powers, exponentials, logarithms and trigonometric functions, using product and chain rules where needed. Trigonometric arguments are in radians. The notation f(r)f^{(r)} means the derivative of order rr, not the power f(x)rf(x)^r.

Suppose a power series starts c0+c1x+c2x2+⋯c_0+c_1x+c_2x^2+\cdots. At zero its value is c0c_0; its first derivative is c1c_1; its second derivative is 2!c22!c_2. In general, differentiating rr times and setting x=0x=0 isolates r!crr!c_r. This explains the factorial divisor.

[DIAGRAM: asset_name: Matching derivatives near zero; asset_slug: 9fm0-cp30-maclaurin-local; caption: The line matches the value and slope at zero; the quadratic also matches the second derivative; description: A coordinate plot from minus 1 to 1 shows e to the x in grey, 1 plus x in sage and 1 plus x plus x squared over 2 in clay. All pass through (0,1), which is labelled. The quadratic follows the exponential more closely near zero. A legend identifies all three curves and a note states that a truncated expansion is a local approximation.]
The line matches the value and slope at zero

Maclaurin series

A Maclaurin series is a power-series expansion about x=0x=0, with coefficients obtained from derivatives at zero. A truncated expansion keeps only finitely many terms; it generally approximates the function near zero rather than equalling it exactly.

Set f(0)=ff^{(0)}=f and 0!=10!=1. Those conventions let the constant term fit the same general rule as every other term.

Maclaurin expansion

Where the series represents ff,

f(x)=f(0)+xf′(0)+x22!f′′(0)+x33!f′′′(0)+⋯f(x)=f(0)+xf'(0)+\frac{x^2}{2!}f''(0)+\frac{x^3}{3!}f'''(0)+\cdots

The general term indexed from r=0r=0 is

f(r)(0)r!xr\frac{f^{(r)}(0)}{r!}x^r

In the formula booklet.

The coefficient of xrx^r is f(r)(0)/r!f^{(r)}(0)/r!; the term includes xrx^r as well. Some coefficients can be zero, so “the first three non-zero terms” need not end at x2x^2. A function must also be defined and have the required derivatives at zero before this procedure can start. For example, ln⁡x\ln x has no Maclaurin expansion at zero because f(0)f(0) is undefined.

Key idea

Evaluate the derivatives at zero, then divide by the appropriate factorials. A derivative value is not yet the coefficient, and a coefficient is not yet the full term.

The following check isolates the factorial step.

Constructing an expansion from derivatives

Keep derivative functions and derivative values separate: differentiate first, substitute zero second and insert the resulting numbers into the Maclaurin formula last.

A short table can prevent the common mistake of leaving xx inside a supposed coefficient. If the question specifies a highest power, calculate every derivative up to that order, including those whose values might be zero.

Worked example 1: a logarithm with a non-zero constant

Question. Find the Maclaurin expansion of f(x)=ln⁡(2+x)f(x)=\ln(2+x) up to and including the term in x3x^3.

Plan. Find the first three derivatives, evaluate them at zero and divide by 1!1!, 2!2! and 3!3!.

f′(x)=(2+x)−1differentiate the logarithmf′′(x)=−(2+x)−2differentiate againf′′′(x)=2(2+x)−3differentiate once more\begin{aligned} f'(x)&=(2+x)^{-1} &&\text{differentiate the logarithm}\\ f''(x)&=-(2+x)^{-2} &&\text{differentiate again}\\ f'''(x)&=2(2+x)^{-3} &&\text{differentiate once more} \end{aligned}

Thus

f(0)=ln⁡2,f′(0)=12,f′′(0)=−14,f′′′(0)=14f(0)=\ln2,\quad f'(0)=\frac12,\quad f''(0)=-\frac14,\quad f'''(0)=\frac14

and

f(x)=ln⁡2+12x+−1/42!x2+1/43!x3+⋯=ln⁡2+x2−x28+x324+⋯\begin{aligned} f(x)&=\ln2+\frac12x+\frac{-1/4}{2!}x^2+\frac{1/4}{3!}x^3+\cdots\\ &=\ln2+\frac x2-\frac{x^2}{8}+\frac{x^3}{24}+\cdots \end{aligned}

Why this step? The quadratic coefficient is −1/8-1/8, not −1/4-1/4, because the second derivative must be divided by 2!2!.

Answer. The requested expansion is ln⁡2+x/2−x2/8+x3/24\ln2+x/2-x^2/8+x^3/24, with higher powers omitted.

Check. At x=0x=0 the polynomial gives ln⁡2\ln2. Its first three derivatives at zero are 1/2,−1/4,1/41/2,-1/4,1/4, agreeing with the original function.

Worked example 2 changes only the coefficient of xx inside the logarithm, from 11 to 33. Each differentiation now brings another factor of 33.

Worked example 2: tracking chain-rule factors

Question. Find the Maclaurin expansion of f(x)=ln⁡(2+3x)f(x)=\ln(2+3x) through the term in x3x^3.

Plan. Apply the chain rule at each derivative, then use the values at zero in the same formula.

f′(x)=3(2+3x)−1first chain-rule factorf′′(x)=−9(2+3x)−2another factor 3f′′′(x)=54(2+3x)−3differentiate the power and inside\begin{aligned} f'(x)&=3(2+3x)^{-1} &&\text{first chain-rule factor}\\ f''(x)&=-9(2+3x)^{-2} &&\text{another factor }3\\ f'''(x)&=54(2+3x)^{-3} &&\text{differentiate the power and inside} \end{aligned}

Therefore

f(0)=ln⁡2,f′(0)=32,f′′(0)=−94,f′′′(0)=274f(0)=\ln2,\quad f'(0)=\frac32,\quad f''(0)=-\frac94,\quad f'''(0)=\frac{27}{4}

and

f(x)=ln⁡2+32x−94x22!+274x33!+⋯=ln⁡2+32x−98x2+98x3+⋯\begin{aligned} f(x)&=\ln2+\frac32x-\frac{9}{4}\frac{x^2}{2!}+\frac{27}{4}\frac{x^3}{3!}+\cdots\\ &=\ln2+\frac32x-\frac98x^2+\frac98x^3+\cdots \end{aligned}

Why this step? Chain-rule factors accumulate. Multiplying only the first derivative by 33 would leave all the later coefficients too small.

Answer. ln⁡2+3x/2−9x2/8+9x3/8\ln2+3x/2-9x^2/8+9x^3/8, with higher powers omitted.

Check. Differentiating the cubic polynomial three times gives 6(9/8)=27/46(9/8)=27/4, exactly the third derivative value required at zero.

These particular logarithm expansions are not printed in the formula booklet: derive them from the supplied general formula. They provide local approximations near zero; the next lesson explains how standard series give their precise intervals of validity.

Watch out

Wrong: f(x)=f(0)+xf′(x)+x2f′′(x)/2+⋯f(x)=f(0)+xf'(x)+x^2f''(x)/2+\cdots. Those derivative functions still vary with xx. Right: the coefficients use f′(0),f′′(0),…f'(0),f''(0),\ldots, which are numbers.

Pearson's schemes reward correct application of the Maclaurin formula separately from finding the derivative values. Show both stages, even when the final polynomial looks familiar.

General terms and missing powers

To find a general term, identify the pattern in derivative values and the powers that actually occur; then state where your index begins.

For a series with every power present, the coefficient index and the power can match. If alternate coefficients vanish, the first, second and third non-zero terms correspond to a different sequence of powers.

Worked example 3: every derivative follows one rule

Question. Find the Maclaurin series for e2x\mathrm{e}^{2x}, including its general term. Use the first four terms to estimate e0.1\mathrm{e}^{0.1}.

Plan. Express the derivative of order rr, evaluate at zero and use x=0.05x=0.05 for the requested exponential.

f(r)(x)=2re2xeach derivative multiplies by 2f(r)(0)=2rset x=0f(x)=∑r=0∞2rxrr!Maclaurin formula=1+2x+2x2+43x3+⋯simplify the first coefficients\begin{aligned} f^{(r)}(x)&=2^r\mathrm{e}^{2x} &&\text{each derivative multiplies by }2\\ f^{(r)}(0)&=2^r &&\text{set }x=0\\ f(x)&=\sum_{r=0}^{\infty}\frac{2^rx^r}{r!} &&\text{Maclaurin formula}\\ &=1+2x+2x^2+\frac43x^3+\cdots &&\text{simplify the first coefficients} \end{aligned}

Thus

e0.1≈1+0.1+0.005+0.0016=1.1051666…\mathrm{e}^{0.1}\approx1+0.1+0.005+\frac{0.001}{6} =1.1051666\ldots

Why this step? The function is e2x\mathrm{e}^{2x}, so 2x=0.12x=0.1 requires x=0.05x=0.05. Substituting x=0.1x=0.1 would estimate e0.2\mathrm{e}^{0.2}.

Answer. The general term is 2rxr/r!2^rx^r/r!, for r=0,1,2,…r=0,1,2,\ldots. The estimate is 1.105171.10517 to five decimal places.

Check. A calculator gives e0.1=1.1051709…\mathrm{e}^{0.1}=1.1051709\ldots, which also rounds to 1.105171.10517. This confirms the opening surprise for this particular input; a truncated polynomial does not have the same accuracy far from zero.

Worked example 4 changes the function to sin⁡(2x)\sin(2x), keeping the same inner scale 22. The derivative values now alternate in sign and vanish at every even order.

Worked example 4: indexing the non-zero terms

Question. Find the first three non-zero terms of the Maclaurin series for sin⁡(2x)\sin(2x), and its general non-zero term TnT_n, with n=1n=1 for the first.

Plan. Follow the sine/cosine derivative cycle, retain the odd derivative orders and translate the term index into the power 2n−12n-1.

r012345f(r)(0)020−8032\begin{array}{c|rrrrrr} r&0&1&2&3&4&5\\\hline f^{(r)}(0)&0&2&0&-8&0&32 \end{array}

Consequently,

sin⁡(2x)=2x−83!x3+325!x5+⋯=2x−43x3+415x5+⋯simplify factorials\begin{aligned} \sin(2x)&=2x-\frac8{3!}x^3+\frac{32}{5!}x^5+\cdots\\ &=2x-\frac43x^3+\frac4{15}x^5+\cdots &&\text{simplify factorials} \end{aligned}

At derivative order 2n−12n-1, the value is (−1)n−122n−1(-1)^{n-1}2^{2n-1}. Thus the required term is

Tn=(−1)n−1(2x)2n−1(2n−1)!(n=1,2,3,…)T_n=\frac{(-1)^{n-1}(2x)^{2n-1}}{(2n-1)!} \qquad(n=1,2,3,\ldots)

Why this step? The non-zero term with index nn has power 2n−12n-1, not nn. Its factorial must use that same power, and (−1)n−1(-1)^{n-1} starts the signs with a plus.

Answer. The first three terms are 2x−4x3/3+4x5/152x-4x^3/3+4x^5/15, with general non-zero term TnT_n above.

Check. Substituting n=1,2,3n=1,2,3 into TnT_n gives exactly those three terms, including the negative second term.

The booklet supplies the underlying exponential and sine series, as well as the general Maclaurin formula. The scaled expressions here follow by the displayed derivative arguments; their precise ranges will be collected in the next lesson.

Watch out

Wrong: use (−1)n(-1)^n while declaring that n=1n=1 is the first sine term. That starts with a minus sign. Right: test your general expression at its first two indices before submitting it.

The following function has even powers, including its non-zero constant. Its third non-zero term therefore has power 44, not 33.

Quick Recap

  • The coefficient of xrx^r is f(r)(0)/r!f^{(r)}(0)/r!; the full term also includes xrx^r.
  • Differentiate, evaluate at zero, then substitute into the supplied formula.
  • Zero derivative values remove powers, so count non-zero terms separately from derivative orders.
  • Check a general term at its first two indices, and treat a finite truncation as a local approximation.

Four terms give e0.1≈1.1051666…\mathrm{e}^{0.1}\approx1.1051666\ldots, correctly rounding to 1.105171.10517.