Tutorials › Calculus II › Taylor Approximation of Definite Integrals

Taylor Methods in Computation · Tutorial 882 of 998

Taylor Approximation of Definite Integrals

Use Taylor polynomials to approximate definite integrals, with careful checks on interval-wide validity and a rigorous bound for the integral error.

Advanced 11 min read

What You'll Learn

  • Integrate a Taylor polynomial term by term over a definite interval
  • Use the center and radius of convergence to assess where a Taylor series converges
  • Distinguish convergence of a Taylor series from equality with the function
  • Bound the error in an integral using a pointwise Taylor remainder
  • Decide when term-by-term integration of a series is justified
  • Check an integral approximation by differentiating its polynomial antiderivative

Why Approximate an Integral with a Taylor Polynomial?

A definite integral can be difficult to evaluate exactly even when its integrand is easy to approximate near a chosen point. If a Taylor polynomial is accurate throughout the interval of integration, integrating that polynomial gives a simple approximation to the integral. The central tasks are to compute the polynomial integral correctly and to justify that the approximation is valid across the whole interval.

There are two distinct questions to keep in view. First, can the Taylor polynomial approximate the function on the interval with a controlled remainder? Second, if we start from an infinite Taylor series, does that series converge to the function throughout the interval? A polynomial can be integrated whether or not it approximates the function well; an error argument is what connects its integral to the desired one.

Integrating a Taylor Polynomial

Let \(f\) have derivatives through order \(N\) at a center \(c\). Its Taylor polynomial of degree \(N\) about \(c\) is

$$ T_N(x)=\sum_{k=0}^{N}\frac{f^{(k)}(c)}{k!}(x-c)^k. $$

Integrating each of its finitely many terms gives an exact formula for the integral of the polynomial:

$$ \int_a^b T_N(x)\,dx = \sum_{k=0}^{N} \frac{f^{(k)}(c)}{k!} \frac{(b-c)^{k+1}-(a-c)^{k+1}}{k+1}. $$

This formula does not by itself say how close the result is to \(\int_a^b f(x)\,dx\). To make that comparison, define the pointwise remainder \(R_N(x)=f(x)-T_N(x)\). Linearity of the integral gives

$$ \int_a^b f(x)\,dx = \int_a^b T_N(x)\,dx+\int_a^b R_N(x)\,dx. $$

Thus the integral error is the integral of the pointwise Taylor remainder. In particular, cancellations in the remainder may make the signed error smaller than a bound obtained by integrating its absolute value.

Key formula: If \(f\) and \(T_N\) are integrable on \([a,b]\), then $$ \left|\int_a^b f(x)\,dx-\int_a^b T_N(x)\,dx\right| \leq \int_a^b |f(x)-T_N(x)|\,dx. $$

When Does a Taylor Expansion Apply Throughout the Interval?

For a function represented by a power series about \(c\), the radius of convergence \(R\) describes where that series converges: it converges when \(|x-c|<R\), diverges when \(|x-c|>R\), and requires separate examination at points where \(|x-c|=R\). This statement concerns convergence of the series. It does not by itself establish that the sum equals a particular function \(f\).

For instance, a smooth function can have a Taylor series that converges everywhere but fails to equal the function except at its center. So an argument using an infinite Taylor series must establish both that the series converges on the interval and that its sum there is \(f\). One common sufficient setting is that \(f\) is analytic on a region containing the interval and its Taylor series about \(c\) represents \(f\) there.

If the interval \([a,b]\) lies strictly inside the radius of convergence, so that \(\max_{x\in[a,b]}|x-c|<R\), the power series converges uniformly on \([a,b]\). If its terms are continuous there, its partial sums are continuous, and their uniform limit \(f\) is continuous as well. Under these conditions, term-by-term integration is justified: the integrals of the partial sums converge to the integral of \(f\). If an endpoint lies on the radius boundary, convergence and the conditions for integration must be checked separately.

There is also a useful finite-polynomial approach that does not require an infinite series to represent \(f\). If \(c\in[a,b]\) and \(f^{(N+1)}\) is continuous on \([a,b]\), Taylor's theorem gives a pointwise remainder bound. In particular, if \(|f^{(N+1)}(x)|\leq M\) for every \(x\in[a,b]\), then

$$ |f(x)-T_N(x)| \leq \frac{M}{(N+1)!}|x-c|^{N+1}. $$

Integrating this inequality gives a bound on the definite-integral error:

$$ \left|\int_a^b f(x)\,dx-\int_a^b T_N(x)\,dx\right| \leq \frac{M}{(N+1)!} \int_a^b |x-c|^{N+1}\,dx. $$

This bound requires the stated derivative bound on the entire interval, not merely near \(c\). That requirement is important: a Taylor approximation is constructed locally, while the integral depends on values throughout \([a,b]\).

Worked Example: Approximating an Exponential Integral

Worked Example: Approximating an Exponential Integral

Approximate \(\int_0^1 e^x\,dx\) using the degree-four Taylor polynomial about \(c=0\), and give a rigorous error bound.

The derivatives of \(e^x\) are all \(e^x\), so \(f^{(k)}(0)=1\) for every \(k\). Therefore,

$$ T_4(x)=1+x+\frac{x^2}{2}+\frac{x^3}{6}+\frac{x^4}{24}. $$

Integrate the terms separately:

$$ \begin{aligned} \int_0^1 T_4(x)\,dx &=1+\frac{1}{2}+\frac{1}{6}+\frac{1}{24}+\frac{1}{120}\\ &=\frac{120+60+20+5+1}{120}\\ &=\frac{206}{120} =\frac{103}{60}. \end{aligned} $$

For the error, \(f^{(5)}(x)=e^x\), so \(|f^{(5)}(x)|\leq e\) on \([0,1]\). Taylor's remainder bound with \(N=4\) gives

$$ |e^x-T_4(x)|\leq \frac{e x^5}{5!}=\frac{e x^5}{120}. $$

Consequently,

$$ \left|\int_0^1 e^x\,dx-\frac{103}{60}\right| \leq \int_0^1\frac{e x^5}{120}\,dx =\frac{e}{120}\cdot\frac{1}{6} =\frac{e}{720}. $$

Check the polynomial integration by differentiating an antiderivative:

$$ \frac{d}{dx}\left(x+\frac{x^2}{2}+\frac{x^3}{6}+\frac{x^4}{24}+\frac{x^5}{120}\right) = 1+x+\frac{x^2}{2}+\frac{x^3}{6}+\frac{x^4}{24} =T_4(x). $$

Evaluating that antiderivative from \(0\) to \(1\) gives \(103/60\), as above. The error bound applies because the fifth derivative is bounded on the full interval.

Why the Integral Error Bound Works

The error estimate follows from the basic inequality for integrals: if \(R_N\) is integrable, then the absolute value of its integral cannot exceed the integral of its absolute value. A pointwise Taylor estimate can therefore be converted into an integral estimate without assuming that the remainder has a constant sign.

1
Write the remainder.
Set \(R_N(x)=f(x)-T_N(x)\). The difference between the desired integral and the polynomial integral is \(\int_a^b R_N(x)\,dx\).
2
Bound it pointwise.
Use Taylor's theorem and a bound on \(|f^{(N+1)}|\) throughout the interval to bound \(|R_N(x)|\).
3
Integrate the bound.
Apply \(\left|\int R_N\right|\leq\int|R_N|\) and evaluate the resulting elementary integral.

The method works because it preserves the distinction between local approximation and global integration. The Taylor theorem controls the error at each point; integration then accumulates those pointwise errors over the interval.

Worked Example: Integrating a Logarithm Near Its Expansion Center

Worked Example: Integrating a Logarithm Near Its Expansion Center

Approximate \(\int_1^{3/2}\ln x\,dx\) using a degree-three Taylor polynomial about \(c=1\), and bound the error.

Write \(u=x-1\). The Taylor polynomial of \(\ln x\) about \(x=1\), through degree three, is

$$ T_3(x)=u-\frac{u^2}{2}+\frac{u^3}{3}, \qquad u=x-1. $$

As \(x\) runs from \(1\) to \(3/2\), \(u\) runs from \(0\) to \(1/2\), and \(dx=du\). Thus

$$ \begin{aligned} \int_1^{3/2}T_3(x)\,dx &=\int_0^{1/2}\left(u-\frac{u^2}{2}+\frac{u^3}{3}\right)\,du\\ &=\left[\frac{u^2}{2}-\frac{u^3}{6}+\frac{u^4}{12}\right]_0^{1/2}\\ &=\frac18-\frac1{48}+\frac1{192} =\frac{24-4+1}{192} =\frac7{64}. \end{aligned} $$

For the remainder, \(f^{(4)}(x)=-6/x^4\). On \([1,3/2]\), its absolute value is at most \(6\). Taylor's theorem gives

$$ |\ln x-T_3(x)| \leq \frac{6}{4!}|x-1|^4 =\frac{(x-1)^4}{4}. $$

Therefore, the integral error is bounded by

$$ \left|\int_1^{3/2}\ln x\,dx-\frac7{64}\right| \leq \int_0^{1/2}\frac{u^4}{4}\,du =\frac14\left[\frac{u^5}{5}\right]_0^{1/2} =\frac1{640}. $$

To check the polynomial integration, differentiate its antiderivative with respect to \(u\):

$$ \frac{d}{du}\left(\frac{u^2}{2}-\frac{u^3}{6}+\frac{u^4}{12}\right) =u-\frac{u^2}{2}+\frac{u^3}{3}. $$

This recovers \(T_3\) in the variable \(u\), and evaluating at the correct limits gives \(7/64\). The bound is valid on the full interval because the fourth derivative is bounded there.

A Series Must Represent the Function on the Whole Interval

A tempting shortcut is to integrate the terms of a Taylor series even when the interval extends beyond its radius of convergence. The next example shows why that is unsafe, and how changing the center can restore a valid expansion across the interval.

Worked Example: Choosing a Center That Covers the Interval

Approximate \(\int_0^2 \frac{1}{1+x}\,dx\). The Taylor series about \(0\) is the geometric series \(\sum_{n=0}^{\infty}(-x)^n\), which has radius \(1\). It therefore does not provide a convergent expansion throughout \([0,2]\).

Instead, expand about \(c=1\), writing \(u=x-1\). Then

$$ \frac{1}{1+x} =\frac{1}{2+u} =\frac12\frac{1}{1+u/2} =\sum_{n=0}^{\infty}\frac{(-1)^n u^n}{2^{n+1}}. $$

Since \(|u|\leq1\) on \([0,2]\), the ratio satisfies \(|u/2|\leq1/2\). The geometric series converges uniformly there and equals the function. Its degree-four partial sum is

$$ T_4(x)=\frac12-\frac{u}{4}+\frac{u^2}{8}-\frac{u^3}{16}+\frac{u^4}{32}. $$

Integrate over \(u\in[-1,1]\). The odd powers have zero integral, while \(\int_{-1}^1 1\,du=2\), \(\int_{-1}^1u^2\,du=2/3\), and \(\int_{-1}^1u^4\,du=2/5\). Hence

$$ \int_0^2 T_4(x)\,dx =\frac12(2)+\frac18\left(\frac23\right)+\frac1{32}\left(\frac25\right) =1+\frac1{12}+\frac1{80} =\frac{263}{240}. $$

The geometric remainder after degree four is \((-u/2)^5/[2(1+u/2)]\). Since \(1+u/2\geq1/2\) on \([-1,1]\),

$$ \left|\frac{1}{1+x}-T_4(x)\right| \leq \frac{|u|^5}{32}. $$

Thus the integral error is at most

$$ \int_{-1}^{1}\frac{|u|^5}{32}\,du =\frac{2}{32}\int_0^1u^5\,du =\frac{1}{96}. $$

As a check, an antiderivative of the polynomial in \(u\) is \(u/2-u^2/8+u^3/24-u^4/64+u^5/160\). Its values at \(1\) and \(-1\) differ by \(263/240\), confirming the polynomial integral. The centered expansion is valid throughout the interval, unlike the expansion about zero.

Common Pitfall: Treating Convergence as Equality

A power series can converge on an interval without being the Taylor series representation of the function there. Convergence only describes the behavior of the series; the equality between its sum and \(f(x)\) is an additional mathematical claim. Therefore, integrating a convergent Taylor series term by term is not justified until that equality and the conditions for integration have been established.

For example, it is not enough to argue, “the Taylor series has radius \(R\), and the interval lies inside that radius, so its integral is the desired integral.” The radius guarantees convergence inside the disk or interval, not equality with an arbitrary function having those Taylor coefficients. A safe alternative for a finite-degree approximation is to use Taylor's theorem with a derivative bound on the entire interval, as in the first two examples.

Another mistake is to bound the remainder only at the center. A bound at \(x=c\) says nothing about the rest of the interval. The integral estimate requires a bound valid for every \(x\in[a,b]\), or a carefully derived pointwise bound that can itself be integrated.

Check Your Understanding

For each question, identify both the polynomial calculation and the condition that makes the approximation trustworthy.

  1. Write the formula for \(\int_a^b T_N(x)\,dx\) in terms of the Taylor coefficients at \(c\).
  2. What does the radius of convergence establish, and what does it not establish about a function's Taylor series?
  3. If \(|f^{(N+1)}(x)|\leq M\) on an interval containing \(c\), what pointwise remainder bound follows from Taylor's theorem?
  4. Why must a derivative bound used for an integral error estimate hold across the interval rather than just at the expansion center?
  5. What additional issue must be checked if an endpoint of the integration interval lies exactly on the radius of convergence?

Test yourself: Calculus II final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon
Clinical Biostats