Type a command or search the notes. Tab cycles completions. Up and down recall history when blank. Escape dismisses, then leaves the prompt.
MATH
[1251]

Taylor polynomials

Match derivative data at a centre to obtain a local polynomial approximation.

This page approximates ff near a point aa by the polynomial in powers of x−ax-a that matches its value, slope, curvature and higher derivatives up to a chosen degree. Interpolation is the other polynomial construction in the course: it matches values at distinct nodes rather than derivatives at one centre.

The degree-one Taylor model is the tangent-line step used by Euler's method. The degree-two term, built from f′′(a)f''(a), is the one-variable version of the quadratic Hessian model used for functions of several variables.

Build a local model from derivative data

The centre aa is the point where the approximation is anchored. Matching only the value gives a constant model; matching the first derivative as well gives the tangent line. Each further matched derivative makes the polynomial share more of the local behaviour of ff.

[DEFINITION]

Taylor polynomial

If ff has derivatives through order nn at aa, its Taylor polynomial of degree at most nn about aa is

Pn(x)=∑k=0nf(k)(a)k!(x−a)k.P_n(x)=\sum_{k=0}^{n}\frac{f^{(k)}(a)}{k!}(x-a)^k.

The polynomial is centred at aa: its powers measure displacement from aa, not from the origin. The factorial occurs because the kk-th derivative of (x−a)k(x-a)^k at aa is k!k!. In this chapter Pn(x)P_n(x) names the Taylor polynomial; the similar notation Pn(F)P_n(F) in vector spaces denotes the whole space of polynomials of degree at most nn over a field FF.

[DEFINITION]

Maclaurin polynomial

The Maclaurin polynomial of degree at most nn is the Taylor polynomial about a=0a=0:

Pn(x)=∑k=0nf(k)(0)k!xk.P_n(x)=\sum_{k=0}^{n}\frac{f^{(k)}(0)}{k!}x^k.

Maclaurin polynomials are convenient when the derivatives at zero have a simple pattern.

Why the coefficients are forced

[THEOREM]

Matching derivatives determines the coefficients

Suppose QQ is a polynomial of degree at most nn satisfying

Q(j)(a)=f(j)(a),0≤j≤n.Q^{(j)}(a)=f^{(j)}(a),\qquad 0\le j\le n.

Then Q=PnQ=P_n, where PnP_n is the Taylor polynomial of ff about aa.

How accurate this model is away from the centre is measured by the remainder in Taylor's theorem.

[PROOF]

Write QQ in powers of x−ax-a:

Q(x)=c0+c1(x−a)+⋯+cn(x−a)n.Q(x)=c_0+c_1(x-a)+\cdots+c_n(x-a)^n.

Evaluating at aa gives Q(a)=c0Q(a)=c_0. After differentiating once, evaluating at aa gives Q′(a)=c1Q'(a)=c_1 and after differentiating jj times it gives

Q(j)(a)=j!cj.Q^{(j)}(a)=j!c_j.

The matching condition therefore forces

cj=f(j)(a)j!c_j=\frac{f^{(j)}(a)}{j!}

for every 0≤j≤n0\le j\le n. These are exactly the coefficients of PnP_n, so Q=PnQ=P_n.

Construct the polynomial in practice

Choose a centre close to the values of xx you care about, so that the powers (x−a)k(x-a)^k stay small.

[METHOD]

Construct a Taylor polynomial

To construct the degree-nn Taylor polynomial of ff about aa:

  1. choose the centre aa and degree nn;
  2. calculate f(a),f′(a),…,f(n)(a)f(a),f'(a),\ldots,f^{(n)}(a);
  3. substitute those values into Pn(x)=∑k=0nf(k)(a)k!(x−a)k;P_n(x)=\sum_{k=0}^{n}\frac{f^{(k)}(a)}{k!}(x-a)^k;
  4. use Taylor's theorem to quantify the error of the approximation.

Read the pattern in standard functions

At zero, parity and repeating derivative cycles often make the coefficients visible at once. At a nonzero centre the same rule applies, but every power is a power of the displacement x−ax-a.

[EXAMPLE]

A Maclaurin polynomial for sin⁡x\sin x

The derivatives at zero alternate between 0,1,0,−10,1,0,-1. The odd-degree polynomial is

P2m+1(x)=∑k=0m(−1)kx2k+1(2k+1)!=x−x33!+x55!−⋯+(−1)mx2m+1(2m+1)!.P_{2m+1}(x) =\sum_{k=0}^{m}(-1)^k\frac{x^{2k+1}}{(2k+1)!} =x-\frac{x^3}{3!}+\frac{x^5}{5!}-\cdots +(-1)^m\frac{x^{2m+1}}{(2m+1)!}.
[EXAMPLE]

A Maclaurin polynomial for cos⁡x\cos x

The derivatives cycle as

cos⁡x,−sin⁡x,−cos⁡x,sin⁡x,cos⁡x,…\cos x,\quad-\sin x,\quad-\cos x,\quad\sin x,\quad\cos x,\ldots

At zero, the odd derivatives vanish. Therefore

P6(x)=1−x22!+x44!−x66!.P_6(x)=1-\frac{x^2}{2!}+\frac{x^4}{4!}-\frac{x^6}{6!}.

Only even powers occur, as expected for the even function cos⁡x\cos x.

[EXAMPLE]

Moving the centre to π/4\pi/4

Let h=x−π/4h=x-\pi/4. Since

cos⁡π4=sin⁡π4=22,\cos\frac{\pi}{4}=\sin\frac{\pi}{4}=\frac{\sqrt2}{2},

the degree-three Taylor polynomial is

P3(x)=22−22h−24h2+212h3=22(1−h−h22+h36).\begin{aligned} P_3(x) &=\frac{\sqrt2}{2} -\frac{\sqrt2}{2}h -\frac{\sqrt2}{4}h^2 +\frac{\sqrt2}{12}h^3\\ &=\frac{\sqrt2}{2} \left(1-h-\frac{h^2}{2}+\frac{h^3}{6}\right). \end{aligned}

The coefficient rule is unchanged from the Maclaurin case; only the displacement changes from xx to x−π/4x-\pi/4.

When derivatives repeat, record the pattern instead of differentiating each order from scratch.

[EXAMPLE]

Standard finite expansions

For exe^x, every derivative is exe^x, so every derivative at zero is 11:

Pn(x)=∑k=0nxkk!=1+x+x22!+⋯+xnn!.P_n(x)=\sum_{k=0}^{n}\frac{x^k}{k!} =1+x+\frac{x^2}{2!}+\cdots+\frac{x^n}{n!}.

For ln⁡(1+x)\ln(1+x) and k≥1k\ge1,

dkdxkln⁡(1+x)∣x=0=(−1)k+1(k−1)!,\left.\frac{d^k}{dx^k}\ln(1+x)\right|_{x=0} =(-1)^{k+1}(k-1)!,

so

Pn(x)=∑k=1n(−1)k+1xkk=x−x22+x33−⋯+(−1)n+1xnn.P_n(x)=\sum_{k=1}^{n}(-1)^{k+1}\frac{x^k}{k} =x-\frac{x^2}{2}+\frac{x^3}{3}-\cdots +(-1)^{n+1}\frac{x^n}{n}.

Replacing xx by −x-x gives the finite expansion

−x−x22−x33−⋯−xnn-x-\frac{x^2}{2}-\frac{x^3}{3}-\cdots-\frac{x^n}{n}

for ln⁡(1−x)\ln(1-x).

All of these are finite approximations. For a fixed xx, increasing nn produces a sequence of approximations whose error is the remainder in Taylor's theorem. Passing to the infinite Taylor series needs a convergence argument and a proof that this remainder tends to zero.

On this page