Logo
T
Overview
T

T

December 18, 2025
1 min read

Taylor polynomial approximation

Theorem (Taylor's formula (with error))

Given a function ff whose (n+1)th(n+1)th derivative exists for all xx \in Ω,\Omega, where Ω\Omega is an open interval such that aΩ.a \in \Omega. We have:

f(x)=f(a)+f(a)(xa)+f(a)2!(xa)2++f(nth derivative)(a)n!(xa)n+Rn(x)\begin{equation} f(x)=f(a)+f'(a)(x-a)+\frac{f''(a)}{2!}(x-a)^2+\dots+\frac{f^{(n_{th} \space \text{derivative})}(a)}{n!}(x-a)^n+R_n(x) \end{equation}

where Rn(x),R_n(x), the remainder/error is

Rn(x)=f((n+1)th derivative)(ξ)Γ(n+2)(xa)n+1\begin{equation} R_n(x)=\frac{f^{((n+1)th \space \text{derivative})}(\xi)}{\Gamma(n+2)}(x-a)^{n+1} \end{equation}

where Γ\Gamma is the gamma function (note Γ\Gamma (n+2)=(n+1)!)n+2)=(n+1)!) and ξ[x,a].\xi \in [x,a].

With this we can numerically approximate certain a function and its derivative at a single point.

Example

Given f(x)=e2.7x2f(x)=e^{2.7x^2} with a=2,a=2, find a polynomial of degree 22 using Definition 2.1 to evaluate f(x)f(x) at x=3x=3 and x=5x=5, (i.e. e2.7(3)2e^{2.7(3)^2} and e2.7(5)2.e^{2.7(5)^2}.)

Solution

First observe what the data is. We are given a function f(x)=e2.7x2f(x)=e^{2.7x^2} and have been asked to evaluate it at f(3)f(3) and f(5)f(5) by finding a polynomial of degree 22. We’ll start by denoting the polynomial of degree 2 P2(x),P_2(x), and then find what P2(x)P_2(x) is. By Definition 2.1

P2(x)=f(a)+f(a)(xa)+f(a)2!(xa)2\begin{equation} P_2(x) = f(a)+f'(a)(x-a)+\frac{f''(a)}{2!}(x-a)^2 \\ \end{equation}

From a degree 22 polynomial we need the first two derivatives of f(a)f(a) to go any further, so we’ll do that now.

f(a)=e2.7x2,f(a)=2e2.7x,f(a)=2e2.7.\begin{equation} f(a)=e^{2.7x^2} , f'(a)= 2e^{2.7x} , f''(a)=2e^{2.7}. \end{equation}

Plugging eqref(6) into eqref(5) with a=2a=2 returns

P2(x)=e2.7(2)2+2e2.7(2)(x2)+2e2.72!(x2)2=49020.8011364+442.812832408(x2)+14.8797317249(x2)2P_2(x) = e^{2.7(2)^2}+2e^{2.7(2)}(x-2)+\frac{2e^{2.7}}{2!}(x-2)^2 \\ = 49020.8011364+442.812832408(x-2)+14.8797317249(x-2)^2

Notice that P2(x)f(x),P_2(x)\approx f(x), so evaluating P2(3)f(3)P_2(3)\approx f(3) and P2(5)f(5)P_2(5)\approx f(5) will give us our solution.

P2(3)=49020.8011364+442.812832408(32)+14.8797317249(32)2=49478.4937005P_2(3) = 49020.8011364+442.812832408(3-2)+14.8797317249(3-2)^2 \\ = 49478.4937005

and

P2(5)=49020.8011364+442.812832408(52)+14.8797317249(52)2=50483.1572191P_2(5) = 49020.8011364+442.812832408(5-2)+14.8797317249(5-2)^2 \\ = 50483.1572191

as desired.

Taylor Error

Lagrange polynomial approximation