D5 - Building Maclaurin series

D5 - Building Maclaurin series

How can a polynomial imitate an exponential or a sine curve near zero? You will use derivatives at zero to build a Maclaurin expansion, identify its general term and distinguish a finite approximation from an infinite series.

Successive derivatives at zero

Can a polynomial match both the height and the shape of a curve near zero? Matching the value is a start, but matching the gradient and further derivatives gives much more information.

For example, 1+x1+x has the same value and first derivative as ex\mathrm{e}^x at zero: both values are 1 and both gradients are 1. Its second derivative is zero, whereas the exponential's is 1. Adding x2/2x^2/2 fixes that second derivative without changing the value or gradient at zero.

Successive derivatives

f(r)(x)f^{(r)}(x) means the result of differentiating ff exactly rr times. Thus f(1)=f′f^{(1)}=f', f(2)=f′′f^{(2)}=f'' and f(0)=ff^{(0)}=f. The number f(r)(0)f^{(r)}(0) is found by differentiating first, then substituting x=0x=0.

If y=f(x)y=f(x), the same notation can be written f′(x)=dy/dxf'(x)=\mathrm{d}y/\mathrm{d}x and f(r)(x)=dry/dxrf^{(r)}(x)=\mathrm{d}^r y/\mathrm{d}x^r. These are derivatives, not powers of ff.

Do not substitute zero before differentiating: that would replace the function by a constant and lose its changing shape. Recall also that the chain rule gives a factor aa each time eax\mathrm{e}^{ax} is differentiated.

Worked example 1: derivative values for an exponential

Question. For f(x)=e2xf(x)=\mathrm{e}^{2x}, find f(0)f(0), f′(0)f'(0), f′′(0)f''(0) and f′′′(0)f'''(0).

Plan. Differentiate the function three times, keeping each chain factor, then evaluate at zero.

f(x)=e2xf(0)=1f′(x)=2e2xf′(0)=2f′′(x)=4e2xf′′(0)=4f′′′(x)=8e2xf′′′(0)=8\begin{aligned} f(x)&=\mathrm{e}^{2x} & f(0)&=1\\ f'(x)&=2\mathrm{e}^{2x} & f'(0)&=2\\ f''(x)&=4\mathrm{e}^{2x} & f''(0)&=4\\ f'''(x)&=8\mathrm{e}^{2x} & f'''(0)&=8 \end{aligned}

Each differentiation multiplies the previous coefficient by 2; e0=1\mathrm{e}^0=1.

Answer. The four values are 1,2,4,81,2,4,8.

Check. The identity f′=2ff'=2f gives f′′=2f′f''=2f' and f′′′=2f′′f'''=2f''; the values must therefore double at each step, as they do.

Change only the sign in the exponent. The magnitudes stay the same, but odd derivatives change sign.

Worked example 2: a negative chain factor

Question. For g(x)=e−2xg(x)=\mathrm{e}^{-2x}, find the corresponding four values at zero.

Plan. Apply the chain rule with factor −2-2 at every step.

g(x)=e−2xg(0)=1g′(x)=−2e−2xg′(0)=−2g′′(x)=4e−2xg′′(0)=4g′′′(x)=−8e−2xg′′′(0)=−8\begin{aligned} g(x)&=\mathrm{e}^{-2x} & g(0)&=1\\ g'(x)&=-2\mathrm{e}^{-2x} & g'(0)&=-2\\ g''(x)&=4\mathrm{e}^{-2x} & g''(0)&=4\\ g'''(x)&=-8\mathrm{e}^{-2x} & g'''(0)&=-8 \end{aligned}

Answer. 1,−2,4,−81,-2,4,-8.

Check. Since g(x)=f(−x)g(x)=f(-x), reflection in the vertical axis reverses odd derivatives at zero and preserves even ones. This agrees with the values above.

The derivative values are information about the function; they are not yet the coefficients of its expansion.

Finding the coefficients

A derivative value must be divided by a factorial to become a power-series coefficient. To see why, start with a polynomial P(x)=a0+a1x+a2x2+a3x3P(x)=a_0+a_1x+a_2x^2+a_3x^3.

P(0)=a0P′(0)=a1P′′(0)=2a2P′′′(0)=6a3\begin{aligned} P(0)&=a_0\\ P'(0)&=a_1\\ P''(0)&=2a_2\\ P'''(0)&=6a_3 \end{aligned}

Differentiating xrx^r exactly rr times gives r!r!. Lower powers have disappeared, and higher powers still contain xx, so they vanish at zero. This isolates one coefficient at a time. Recall r!=r(r−1)⋯1r!=r(r-1)\cdots1 and 0!=10!=1. You have met the same factorial notation in the binomial coefficient (nr)=n!/[r!(n−r)!]\binom nr=n!/[r!(n-r)!], also written nCr{}^n\mathrm{C}_r or nCr{}_n\mathrm{C}_r, for integers 0≤r≤n0\le r\le n.

Maclaurin coefficients

The polynomial matching ff and its first NN derivatives at zero is

TN(x)=∑r=0Nf(r)(0)r!xrT_N(x)=\sum_{r=0}^{N}\frac{f^{(r)}(0)}{r!}x^r

When the infinite expansion represents the function,

f(x)=f(0)+f′(0)x+f′′(0)2!x2+f′′′(0)3!x3+⋯f(x)=f(0)+f'(0)x+\frac{f''(0)}{2!}x^2+\frac{f'''(0)}{3!}x^3+\cdots

This is the Maclaurin series, an expansion in powers of xx about zero. The formula is supplied in the examination booklet.

The matching calculation explains the coefficients; it does not by itself establish where the infinite expansion equals the function.

Worked example 3: converting values into coefficients

Question. A function has f(0)=2f(0)=2, f′(0)=3f'(0)=3, f′′(0)=−4f''(0)=-4 and f′′′(0)=12f'''(0)=12. Find its cubic Maclaurin polynomial.

Plan. Put each derivative value over its matching factorial.

T3(x)=2+3x+−42!x2+123!x3match derivative orders=2+3x−2x2+2x32!=2,3!=6\begin{aligned} T_3(x)&=2+3x+\frac{-4}{2!}x^2+\frac{12}{3!}x^3 && \text{match derivative orders}\\ &=2+3x-2x^2+2x^3 && 2!=2,\quad 3!=6 \end{aligned}

Answer. T3(x)=2+3x−2x2+2x3T_3(x)=2+3x-2x^2+2x^3.

Check. Differentiating this polynomial gives T3′′=−4+12xT_3''=-4+12x and T3′′′=12T_3'''=12; its value, gradient and these two derivative values at zero recover the supplied data.

Change only the third derivative. This should affect only the cubic coefficient, not the earlier terms.

Worked example 4: a sign change in one derivative

Question. Now let g(0)=2g(0)=2, g′(0)=3g'(0)=3, g′′(0)=−4g''(0)=-4 and g′′′(0)=−12g'''(0)=-12. Find its cubic Maclaurin polynomial.

Plan. Use the same coefficient rule, preserving the new negative sign.

T3(x)=2+3x−42!x2−123!x3=2+3x−2x2−2x3\begin{aligned} T_3(x)&=2+3x-\frac4{2!}x^2-\frac{12}{3!}x^3\\ &=2+3x-2x^2-2x^3 \end{aligned}

Answer. 2+3x−2x2−2x32+3x-2x^2-2x^3.

Check. Its third derivative is −12-12; the constant, linear and quadratic contributions at zero are unchanged. The polynomial therefore satisfies all four conditions independently.

The coefficient of x3x^3 is f′′′(0)/6f'''(0)/6, not f′′′(0)f'''(0).

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account