JOVANA
Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
All guides

When There Is No Elementary Antiderivative

Some integrals — the Gaussian, the sine integral, the elliptic ones — have no formula in elementary functions, and that is a theorem, not a failure of cleverness. Learn what that really means, how to tame a divergent integral with the Cauchy principal value, and how to compute any of them numerically.

The wall every integrator eventually hits

By now you own a serious toolkit: u-substitution and parts from Volume I, plus trig substitution, partial fractions, reduction formulas, and the parameter trick from this rung. So it stings the first time you meet an integral that defeats every one of them. Try integral of e^{-x^2} dx, or integral of (sin x)/x dx, or integral of sqrt(1 - k^2 (sin theta)^2) d(theta). You will push on these for hours and get nowhere — and the reason is not that you are missing a trick.

Here is the honest truth. There is a theorem — Liouville's theorem, made fully precise in the 20th century — that says these antiderivatives simply cannot be written as a finite combination of the functions you grew up with: polynomials, roots, exp and log, sines and cosines, and anything built from them by the four arithmetic operations and composition. An integral like these is called a non-elementary integral, and that is a hard mathematical fact, not a confession of defeat. The function e^{-x^2} is perfectly smooth and perfectly integrable; it is only its antiderivative that refuses to live inside the elementary club.

Three famous non-elementary integrals

Meet the headliners. First the Gaussian: integral of e^{-x^2} dx has no elementary antiderivative, yet the full Gaussian integral integral from -infinity to infinity of e^{-x^2} dx = sqrt(pi) is exactly known — a beautiful reminder that a *definite* integral can be clean even when the *indefinite* one is impossible. The named function that fills the gap is the error function, erf(x) = (2/sqrt(pi)) integral from 0 to x of e^{-t^2} dt, the workhorse of probability and statistics.

Second, the sine integral: integral of (sin x)/x dx is non-elementary too, so we define the sine integral Si(x) = integral from 0 to x of (sin t)/t dt. It is the natural answer to a diffraction or signal-processing problem, and its limiting value Si(infinity) = pi/2 again comes out perfectly clean. Third, the elliptic integrals: the arc length of an ellipse, and the exact period of a pendulum swinging at large amplitude, both lead to integral of d(theta)/sqrt(1 - k^2 (sin theta)^2). Liouville's theorem stops you cold here — these are the elliptic integrals, and they earned a whole shelf of tabulated functions of their own.

Do you see the pattern? When the elementary world has no name for an antiderivative, mathematics does not give up — it *adopts the integral as the definition of a new function*. erf, Si, and the elliptic integrals are no more mysterious than sin or ln; they are simply newer arrivals, defined by an integral instead of by a power series or a right triangle. You can tabulate them, plot them, differentiate them (by the Fundamental Theorem, d/dx of Si(x) = (sin x)/x), and expand them in a Taylor series — they are first-class citizens. The whole next rung, Special Functions, is devoted to this menagerie.

How a definite integral can still come out exactly

It feels paradoxical that integral from -infinity to infinity of e^{-x^2} dx is exactly sqrt(pi) while integral of e^{-x^2} dx over a *general* interval is forbidden a formula. The resolution: a definite integral is just a *number*, and a number can be found by a clever global argument that never produces an antiderivative at all. The classic Gaussian trick squares the integral, reads the product as a double integral over the whole plane, and switches to polar coordinates — where the extra factor of r makes the new integrand elementary and the whole thing collapses to pi. You never antidifferentiate e^{-x^2}; you sidestep it.

Taming a divergent integral: the Cauchy principal value

Sometimes the trouble is not the *form* of the antiderivative but a *singularity* that makes the integral diverge outright. Consider integral from -1 to 1 of dx/x. The integrand blows up at x = 0, and as an ordinary improper integral it has no value: the piece from 0+ to 1 runs to +infinity and the piece from -1 to 0- runs to -infinity, and infinity minus infinity is not a number. Yet the function 1/x is perfectly antisymmetric about the origin, so it is maddening that we cannot exploit that cancellation.

The Cauchy principal value rescues exactly this situation. Instead of letting the two sides approach the singularity *independently*, you cut out a *symmetric* gap of half-width epsilon and shrink it together: P.V. integral from -1 to 1 of dx/x = limit as epsilon -> 0+ of [ integral from -1 to -epsilon of dx/x + integral from epsilon to 1 of dx/x ]. With the gap symmetric, the +infinity and -infinity cancel before the limit is taken, and you get a finite, well-defined answer of 0. The principal value is a *prescription* — a rule for how to approach the bad point — and it lets the antisymmetry do its work.

A first nod to numerical quadrature

So how do you actually get a *number* out of integral from 0 to 1 of e^{-x^2} dx when no formula exists? You go back to the very definition. A definite integral is the limit of a Riemann sum: chop [a, b] into n slices, evaluate the integrand at sample points, multiply by the slice widths, and add. Truncating that limit at a finite n gives an approximation you can compute by hand or machine. This is numerical quadrature, and it works for *any* continuous integrand — elementary or not — because it never asks for an antiderivative at all.

Crude rectangles converge slowly, so practical methods spend their effort on the *shape* of each slice. The trapezoidal rule joins sample points with straight lines; Simpson's rule fits little parabolas through points in groups of three and is dramatically more accurate for smooth functions; Gaussian quadrature goes further still, choosing the sample points themselves cleverly so that n well-placed evaluations nail every polynomial up to degree 2n - 1. With a handful of points Simpson's rule already gives erf and Si to many digits — which is precisely how the tables and library functions for these "impossible" integrals are built.

Approximate  integral from 0 to 1 of e^{-x^2} dx   (Simpson, n = 4 panels, h = 0.25)

  x:      0.00     0.25     0.50     0.75     1.00
  f(x):   1.0000   0.9394   0.7788   0.5698   0.3679
  weight:   1        4        2        4        1     (Simpson pattern)

  estimate = (h/3) * [ f0 + 4 f1 + 2 f2 + 4 f3 + f4 ]
           = (0.25/3) * [1.0000 + 3.7576 + 1.5576 + 2.2790 + 0.3679]
           = 0.74683

  exact (= (sqrt(pi)/2) erf(1)) = 0.74682...   -> right to 4 decimals with 5 points
Five evaluations and Simpson's rule already pin a non-elementary integral to four decimals — no antiderivative required.

Putting it together

When you next meet an integral that resists every trick, run this honest triage instead of grinding forever.

  1. Ask whether an elementary antiderivative can even exist. If the integrand is something like e^{-x^2}, (sin x)/x, or 1/sqrt(1 - k^2 (sin theta)^2), Liouville's theorem says no — stop hunting for a formula.
  2. If you need it as a function, accept the named special function — erf, Si, or an elliptic integral — and treat it as a first-class object you can differentiate, expand, and tabulate.
  3. If you only need a definite value, look for a global trick — symmetry, the parameter method, polar squaring, or a contour — that finds the number without the function.
  4. If a singularity makes it diverge but the divergence is symmetric, declare a Cauchy principal value — honestly, as a chosen prescription, not as a plain equality.
  5. When all else is overkill or unavailable, fall back on numerical quadrature — Simpson's or Gaussian — which delivers the number to any precision you ask for.