An antiderivative with no formula, and an area of exactly ln 2
Integrate (x − 1)/ln x from 0 to 1. Substitution, parts and partial fractions get nowhere with it, and its antiderivative cannot be written without a special function. The answer is ln 2, exactly.
Here is an integral that the techniques of a first calculus course get nowhere with:
∫₀¹ (x − 1) / ln x dx
The integrand is perfectly tame. At x = 0.5 it is 0.72135, near x = 1 it creeps up towards 1, and at the other end it sinks towards 0. It is the logarithmic mean of x and 1, so it lies between √x and (1 + x)/2, and the area is trapped between 2/3 and 3/4. The trouble is the antiderivative. Written down, it needs a special function: li(x²) − li(x), where li, the logarithmic integral, is the antiderivative of 1/ln x and one of the functions Liouville's theory proves cannot be built from powers, exponentials, logarithms and trigonometric functions.
The area is exactly ln 2 = 0.693147, and getting it takes three lines, provided you stop looking at the integral you were given.
Give the integral a dial
Replace the x in the numerator with xᵃ and call the result a function of a:
I(a) = ∫₀¹ (xᵃ − 1) / ln x dx
The integral we want is I(1). The one we can do instantly is I(0), because x⁰ − 1 = 0 and so I(0) = 0. Now differentiate with respect to a, under the integral sign, treating x as a constant. The derivative of xᵃ with respect to a is xᵃ ln x, and the ln x that made the problem hopeless cancels:
I′(a) = ∫₀¹ xᵃ dx = 1 / (a + 1)
An integral with no usable antiderivative has become the first one anybody learns. Integrate back in a and use I(0) = 0 to fix the constant:
I(a) = ln(a + 1), so I(1) = ln 2
Check it by brute force, integrating numerically at several settings of the dial:
- a = 0.5: 0.405465, and ln 1.5 = 0.405465
- a = 1: 0.693147, and ln 2 = 0.693147
- a = 3: 1.386294, and ln 4 = 1.386294
- a = 9: 2.302585, and ln 10 = 2.302585
The logarithm comes from integrating 1/(a + 1) with respect to the dial.
It is the same logarithm that fills the power rule's one gap, at n = −1, arriving by a side door.
A different box of tools
Richard Feynman made this method famous by using it on everybody else's integrals. He learned it as a schoolboy from Advanced Calculus by Frederick Woods, a book his high-school physics teacher, Mr. Bader, had given him, and he describes the result in Surely You're Joking, Mr. Feynman!: people at MIT or Princeton would bring him an integral they had failed on, he would try differentiating under the integral sign, "and often it worked." The reason he gave was the box of tools, which was "different from everybody else's, and they had tried all their tools on it before giving the problem to me."
The example Woods himself works on page 154 is the classic one. Put a decaying factor in front of sin x / x:
J(b) = ∫₀^∞ e−bx sin x / x dx
Differentiating in b removes the awkward 1/x, leaving an integral of e−bx sin x that two rounds of integration by parts settle, and the result is J(b) = π/2 − arctan b. At b = 1 that is π/4 = 0.785398, and a numerical integration agrees to all six places. Let b shrink to zero and the formula points at one of the most quoted results in analysis, ∫₀^∞ sin x / x dx = π/2. That result is true, but taking the limit needs an argument of its own, because this integral converges only conditionally; Conrad gives it a whole appendix.
That last integral is miserable to approach head-on. Its antiderivative is another special function, and summing the area directly converges at a crawl: out to x = 100 it gives 1.56223, out to x = 1,000 it gives 1.57023, still 0.0006 short of π/2 = 1.570796.
The condition, and an example where it fails
Differentiating under the integral sign is not always allowed, and the cleanest demonstration uses the very integral we just finished. Stretch it: for any b greater than 0, substituting x = bt shows
∫₀^∞ sin(bx) / x dx = π/2
whatever b is. A constant has derivative zero. But differentiate inside instead, and the 1/x cancels against the factor x that the chain rule brings down, leaving ∫₀^∞ cos(bx) dx. That integral has no value at all: its running total is sin(bX)/b, which swings between −1/b and +1/b forever. Integrated up to X = 1,000 with b = 1, it stands at 0.8269; half a unit further on, at 0.9953. It never settles, so the two sides of the "rule" are zero and nothing.
What went wrong is the order of two limits. The rule swaps differentiation with integration, and that swap can fail even on a finite interval; here the infinite range is what breaks it. The swap is guaranteed safe when the differentiated integrand is held down, everywhere and for every value of the parameter nearby, by one fixed function whose integral is finite. Conrad's notes state the conditions and collect cases where they fail. In Woods' version, for b kept above any fixed positive number, the factor e−bx does exactly that holding down, which is why the method is legitimate there and not in the stretched version. The first example passes too: differentiating (xᵃ − 1)/ln x in a gives xᵃ, which never exceeds 1 on [0, 1] for a ≥ 0.
References (4)
- section 8 (the integral of (xᵗ − 1)/log x), section 3 and Appendix B (the damped sine integral, as in Woods), section 12 (Example 12.1, where the rule fails); the Feynman passage is quoted from the head of these notes K. Conrad, "Differentiating under the integral sign", expository notes, University of Connecticut.
- quoted as Conrad reproduces it; the book itself was not re-read for this page R. P. Feynman, Surely You’re Joking, Mr. Feynman!, Bantam, New York, 1985, pp. 71–72.
- the book Feynman names; its page 154, reproduced in Conrad’s Appendix B, works the damped sine integral F. S. Woods, Advanced Calculus, new edition, Ginn and Co., 1934.
- why the antiderivative of 1/ln x, the logarithmic integral, is not elementary B. Conrad, "Impossibility theorems for elementary integration", Clay Mathematics Institute Academy Colloquium lecture notes (2005), Example 4.7.