Integrating Exponentials and Logarithms

One over x integrates to the natural log.

eˣ is its own integral

eˣ differentiates to itself, so it integrates to itself: ∫ eˣ dx = eˣ + C. Check: eˣ + C differentiates to eˣ.

The area under y = eˣ from x = 0 to x = 1 is [eˣ]₀¹ = e¹ − e⁰ = e − 1 ≈ 1.718.

With a multiple of x in the power, divide by it. e^(3x) differentiates to 3e^(3x) by the chain rule, so ∫ e^(3x) dx = e^(3x)/3 + C, and in general ∫ e^(ax) dx = e^(ax)/a + C for any constant a other than 0. For a = −1 that gives ∫ e^(−x) dx = −e^(−x) + C. The integral of e^(2x) from 0 to 1 is (e² − 1)/2 ≈ 3.195.

xy

The curve y = eˣ, shaded from x = 0 to x = 1, with the tangent at (1, e). The tangent is y = ex, whose gradient e equals the height of the curve there. The shaded area is e − 1 ≈ 1.718.

The gap in the power rule

The power rule integrates xⁿ to xⁿ⁺¹/(n + 1) + C. For 1/x, which is x⁻¹, it would give x⁰ / 0: adding one to −1 makes 0, and there is no dividing by 0.

No power of x can fill the gap. A power xᵏ differentiates to k xᵏ⁻¹, and to land on x⁻¹ it would need k = 0, which makes the multiplier in front 0 as well. Yet the region under y = 1/x from 1 to 4 plainly has an area, so 1/x does have an antiderivative. It is not a power.

ln x fills it

The natural logarithm differentiates to 1/x, so for x > 0, ∫ 1/x dx = ln x + C.

The area under y = 1/x from 1 to 4 is ln 4 − ln 1 = ln 4 ≈ 1.386, since ln 1 = 0. From 1 to e it is ln e − ln 1 = 1 exactly, which is one way to define e: the number at which the area under y = 1/x, measured from 1, reaches 1.

x

The curve y = 1/x, shaded from x = 1, where its height is 1, to x = 4, where it is 0.25. The shaded area is ln 4 ≈ 1.386.

Areas that add when lengths multiply

The area under 1/x behaves like a logarithm. The strip from 2 to 4 is the strip from 1 to 2 made twice as wide and half as tall: each point x of the first strip moves to 2x, where the height 1/(2x) is half of 1/x. Stretching by 2 one way and squashing by 2 the other leaves the area unchanged.

So the area from 1 to 4 is the area from 1 to 2 twice, and ln 4 = 2 ln 2. The same argument works for any a and b: the area from 1 to ab is the area from 1 to a plus the area from 1 to b, so ln(ab) = ln a + ln b.

x11ab = 3a = 1.5b = 2ln a = 0.405ln b = 0.693ln ab = 1.099y = 1/x

the region from a to ab is the region from 1 to b stretched a times wider and squashed a times shorter — the same area — so area(1 → ab) = area(1 → a) + area(1 → b)

Set a and b so that ab = 6, and compare the three areas

Under y = 1/x, the gold region runs from 1 to a = 1.5 and has area ln 1.5 = 0.405. The dashed outline runs from 1 to b = 2 and has area ln 2 = 0.693. The green region runs from a to ab = 3: it is the dashed one stretched 1.5 times wider and 1.5 times shorter, so it has the same area. Gold and green together run from 1 to 3, and ln 3 = 1.099 = 0.405 + 0.693. Drag a and b so that ab = 6.

Negative x and the absolute value

For x < 0, ln x has no value, but 1/x does. There ln(−x) works instead: by the chain rule it differentiates to (−1)/(−x) = 1/x. The two cases together are written with an absolute value: ∫ 1/x dx = ln|x| + C, for every x except 0.

So the integral of 1/x from −4 to −1 is ln 1 − ln 4 = −ln 4 ≈ −1.386, negative because the curve is below the axis there.

A definite integral of 1/x must not cross 0. Between −1 and 1 the curve has no value at 0, and the region on each side of 0 is infinitely large. Putting the limits into ln|x| would give ln 1 − ln 1 = 0, a number with no meaning here.

Related integrals

A linear bracket underneath divides by its multiplier, as e^(ax) did: ∫ 1/(2x + 1) dx = ½ ln|2x + 1| + C. The integral from 0 to 1 is ½ ln 3 − ½ ln 1 = ½ ln 3 ≈ 0.549. A constant on top stays outside: ∫ 5/x dx = 5 ln|x| + C.

Another base turns into e. 2ˣ differentiates to 2ˣ ln 2, so ∫ 2ˣ dx = 2ˣ/(ln 2) + C. The integral from 0 to 3 is (8 − 1)/(ln 2) ≈ 10.10.

ln x itself is integrated by parts, with ln x as the part to differentiate and 1 as the part to integrate: ∫ ln x dx = x ln x − x + C. Check with the product rule: x ln x differentiates to ln x + 1, and taking away the derivative of x leaves ln x.

The usual mistakes

Applying the power rule to 1/x. It gives x⁰ / 0, which has no meaning.

Applying the power rule to eˣ. The x is in the exponent, not the base, so eˣ⁺¹/(x + 1) does not differentiate back to eˣ.

Forgetting to divide by a. ∫ e^(3x) dx is e^(3x)/3 + C; e^(3x) + C differentiates to 3e^(3x).

Dropping the absolute value. ln x has no value for negative x, while 1/x does, so the integral is ln|x| + C.

Integrating 1/x across 0. The region is unbounded on both sides of 0, so the integral from −1 to 1 has no value.

Practice Integrating Exponentials and Logarithms in the app