Skip to content
All apps

Taylor remainder and error

About this app

Compare a function with its Taylor polynomial. Drag a measurement point to inspect the error and explore the Lagrange remainder and convergence limits.

The remainder term

The remainder Rₙ(x) = f(x) − Tₙ(x) measures how far the Taylor polynomial is from the true value. In Lagrange form, Rₙ(x) = f⁽ⁿ⁺¹⁾(ξ)/(n + 1)! · (x − a)ⁿ⁺¹ for some ξ between a and x. So near a the error is tiny and grows like |x − a|ⁿ⁺¹. Whether it tends to zero as n increases depends on whether x lies inside the interval of convergence of the Taylor series.

What the app shows

The app draws f, the approximation Tₙ and the gap between them as a shaded area. You can choose eˣ, sin x, cos x, ln x, √x or 1/(1 − x). The degree n runs from 0 to 16 and the expansion point a from −3 to 3. A draggable probe point x* reads off the error at one location; the error panel shows its value and tells you whether x* is inside the radius of convergence. The Lagrange formula is shown alongside.

What to look for

“Shrink the error” raises n step by step, and the shaded error area melts towards the expansion point. Right at a the error is zero and flat. With ln x, √x or 1/(1 − x), drag x* beyond the radius of convergence: there the error grows despite a high n, because the series no longer converges.

Frequently asked questions

What is the Lagrange remainder?
The Lagrange remainder is a formula for the error of a Taylor approximation: Rₙ(x) = f⁽ⁿ⁺¹⁾(ξ)/(n + 1)! · (x − a)ⁿ⁺¹ for an unknown point ξ between a and x. If M bounds |f⁽ⁿ⁺¹⁾| on the interval, then |Rₙ(x)| ≤ M · |x − a|ⁿ⁺¹/(n + 1)!.
How do you estimate the error of a Taylor polynomial?
Find an upper bound M for the absolute value of the (n + 1)-th derivative between a and x and plug it into the Lagrange remainder. For sin x every derivative is at most 1 in absolute value, so |Rₙ(x)| ≤ |x − a|ⁿ⁺¹/(n + 1)!.
Why does the error not shrink outside the radius of convergence?
Outside the radius of convergence the Taylor series diverges and its terms do not become small as n grows. Each extra term pushes Tₙ further instead of bringing it closer to f. For 1/(1 − x) around a = 0 this happens for |x| ≥ 1.
What does the Taylor remainder app show?
It displays the error f − Tₙ as a shaded area between the function and its approximation. You set n and a, drag a probe point x* and read the error there, with a note on whether x* lies inside or outside the radius of convergence.

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