Euler Hall — free maths guides

An integral done by series

Evaluate a definite integral by expanding the integrand. The idea in plain words, a worked example, and a check with the answers shown — part of the free Calculus II guides.

Expand, integrate term by term, bound the truncation

Some integrands have no elementary antiderivative. That is a theorem, not a gap in your knowledge:∫e−x2dx\int e^{-x^2}dx,∫sin⁡xxdx\int\frac{\sin x}{x}dx and∫sin⁡(x2)dx\int\sin(x^2)dx are all of this kind.

The definite integrals still have perfectly good VALUES, and a series computes them:

The three steps. Expand the integrand; integrate term by term (raising each power and dividing by the new one); bound the truncation — usually with the alternating bound, since these series alternate.

The bound is what makes it an answer. Without it you have an approximation with unknown error; with it you have a guarantee, which is what a numerical value is supposed to be.

Watch the radius.∫01\int_0^1 stays inside the radius of every series used above;∫02\int_0^2 of11+x2\frac{1}{1+x^2} would not, since that series has radius 1.

The classic use is normal probability.Φ(z)=12π∫0ze−t2/2dt\Phi(z)=\frac{1}{\sqrt{2\pi}}\int_0^ze^{-t^2/2}dt has no closed form and is tabulated from exactly this series — which is why tables exist at all.

Why the series integrates legally

A power series may be integrated term by term inside its radius. That is the theorem from the term-by-term skill, and it applies here because the integrand's expansion has a positive radius and the interval of integration lies inside it.

The integrated series converges at least as well. Integrating divides the coefficients byn+1n+1, which improves the ratio, so the resulting series converges on at least the same interval.

The bound follows from the same theorem. For an alternating series whose terms decrease, the truncation error is at most the first omitted term — and the integrated series is usually alternating, because the integrand's was.

When the interval reaches an endpoint the argument needs care, since term-by-term integration at the radius is not automatic. That is why the examples use[0,1][0,1] with radius-1 series only when the integrand's expansion is valid there.

Worked example: the error function at 1

Compute∫01e−x2dx\int_0^1e^{-x^2}dx to four decimals.

e−x2=1−x2+x42−x66+x824−⋯e^{-x^2}=1-x^2+\frac{x^4}{2}-\frac{x^6}{6}+\frac{x^8}{24}-\cdots

Integrating:1−13+110−142+1216−⋯1-\frac13+\frac{1}{10}-\frac{1}{42}+\frac{1}{216}-\cdots

Numerically:1−0.333333+0.1−0.023810+0.004630−0.000694=0.7467931-0.333333+0.1-0.023810+0.004630-0.000694=0.746793.

The next term is11320≈0.00076\frac{1}{1320}\approx0.00076, so the alternating bound gives an error below0.00080.0008 — three decimals, so quoting0.74680.7468 is honest and0.746790.74679 is not.

The true value is0.7468240.746824, and it is inside the bound. That is the whole method: expand, integrate, bound, quote only the digits the bound supports.

By the end you can
  • Evaluate a definite integral by expanding the integrand
  • Bound the truncation error of the resulting series
  • Explain why an integral may have a value without an elementary antiderivative
Check yourself
  1. 1. Three terms of∫01cos⁡(x2)dx\int_0^1\cos(x^2)dx.
  2. 2. Bound the error in the previous answer.
  3. 3. Why is∫02dx1+x2\int_0^2\frac{dx}{1+x^2} not safely done by series?
Answers
  1. 1.1−15+19=0.91111-\frac15+\frac{1}{9}=0.9111.
  2. 2. The next term is113≈0.077\frac{1}{13}\approx0.077 — so the error is large; more terms are needed.
  3. 3. The series has radius 1, and the interval touches the radius at 2.
Work out where to start — free, no accountAnswer six real questions — free, no account