Skip to content
All apps

Taylor approximation

About this app

Build a function from its derivatives, term by term. Drag the expansion point and explore six functions, highlighted terms and shaded convergence regions.

The idea

The Taylor polynomial of degree n replaces a smooth function f near an expansion point a with a polynomial: Tₙ(x) = ∑ f⁽ᵏ⁾(a)/k! · (x − a)ᵏ for k = 0 to n. Its value and first n derivatives at a match those of f. Higher degrees extend the region where the approximation is good, but only within the radius of convergence R of the Taylor series. For eˣ, sin x and cos x, R is infinite; for ln x, √x and 1/(1 − x), R is finite.

What the app shows

The exact function f and its approximation Tₙ are drawn in the same plot. Six examples are available: eˣ, sin x, cos x, ln x, √x and 1/(1 − x). You set the degree n from 0 to 16 and drag the point a directly in the plot. An optional formula panel writes out Tₙ and highlights the most recent term in colour. A values panel shows f(a), the convergence region and the error |f − Tₙ| at the right edge of the view; the region outside R is shaded.

Things to try

Press “Build term by term” and watch each new term pull the approximation closer to f. Then pick ln x or 1/(1 − x) and increase n: inside the shaded boundary Tₙ follows the function ever more closely, outside it the approximation runs away. Move a and notice that the function and its approximation always touch at the expansion point.

Frequently asked questions

What is a Taylor polynomial?
A Taylor polynomial approximates a function near a point a using its derivatives there: Tₙ(x) = f(a) + f′(a)(x − a) + f″(a)/2! · (x − a)² + … up to degree n. T₁ is the tangent line and T₂ the best-fitting parabola at a.
What is the radius of convergence of a Taylor series?
The radius of convergence R tells you for which x the infinite Taylor series converges: for |x − a| < R. For eˣ, sin and cos, R is infinite. For 1/(1 − x) around a = 0, R = 1 because of the pole at x = 1, and beyond it no number of extra terms helps.
Why is there a k! in the Taylor formula?
The k-th derivative of (x − a)ᵏ equals k!. For the k-th derivative of the polynomial at a to equal f⁽ᵏ⁾(a), the coefficient has to be f⁽ᵏ⁾(a)/k!. That way all derivatives up to order n agree.
What can I adjust in the app?
You choose one of six functions, set the degree n between 0 and 16 and drag the expansion point a in the plot. The formula with its newest term highlighted, the error at the edge of the view and the shaded region outside the radius of convergence update live.

Subject: Analysis (one-dimensional)

More from Analysis (one-dimensional)

A VisuApp by heyprof: interactive, free in your browser, no sign-up. What is a VisuApp? · All apps