Taylor Polynomials

The tangent line at x=ax = a has the same value and the same slope as ff there. A polynomial of higher degree can also match the second derivative, the third, and so on. It usually stays close to ff over a wider stretch.

Matching derivatives

Write a polynomial in powers of x−ax - a.
c0+c1(x−a)+c2(x−a)2+⋯+cn(x−a)n\begin{aligned} &c_0 + c_1(x - a) + c_2(x - a)^2 \\[4pt] &\qquad + \cdots + c_n(x - a)^n \end{aligned}
Differentiating kk times turns (x−a)k(x - a)^k into k!k! and sends every lower power to 0. Every higher power still contains a factor of x−ax - a. So at x=ax = a the kkth derivative is k! ckk!\,c_k, and matching f(k)(a)f^{(k)}(a) forces the coefficient.
A Taylor polynomial about x=0x = 0 is also called a Maclaurin polynomial. In many cases, raising the degree makes PnP_n approximate ff well over a longer interval around aa.

Interactive: Taylor Polynomials

Below, f(x)=sin⁡xf(x) = \sin x and a=0a = 0. The derivatives of sin⁡x\sin x at 00 repeat 0,1,0,−10, 1, 0, -1, so every even-power term is 0. Raising the degree from odd to even leaves the polynomial unchanged.

When f is known only through its derivatives

A Taylor polynomial needs only the values of ff and its derivatives at one point. Those values can come from a table, a graph, or a differential equation, with no formula for ff at all.