OpenStax Calculus 2

Chapter 1: Integration

1.6 Integrals Involving Exponential and Logarithmic Functions

Study guide for Calculus Volume 2 (Gilbert Strang, 2016 edition)

Independent study guide. Not affiliated with OpenStax or Rice University.

Big idea

Two functions dominate the models people actually build: the exponential, which describes anything whose growth is proportional to its size, and the natural logarithm, which is its inverse. Their derivatives are among the cleanest in calculus, so reading those derivative rules backwards gives integration formulas that are just as clean. This section collects them and then shows the substitutions that put ordinary-looking integrands into their shape.

The exponential is the easy half. Since $e^x$ is its own derivative, it is its own antiderivative, and any constant in the exponent survives the reversal as a divisor. Almost every exponential integral you meet is one substitution away from that fact, with the substitution naming whatever sits in the exponent.

The logarithm enters from the other side, as the missing case of the power rule. Antidifferentiating $x^n$ by raising the exponent breaks down at $n = -1$, because the recipe would ask you to divide by zero. That gap is filled by the natural logarithm, and filling it correctly requires care about sign: $\ln x$ is undefined for negative inputs, yet $1/x$ is perfectly well behaved there, so the antiderivative has to be stated with an absolute value.

Once both formulas are in hand, a pattern appears that is worth naming on its own. Any integrand built as a derivative sitting over the function it came from integrates to a logarithm of that function. Recognizing that shape converts a large family of rational and trigonometric integrands into one-line problems.

Decoder

The exponential is its own antiderivative, $\int e^{u}\,du = e^{u} + C$, and the reciprocal integrates to a logarithm of absolute value, $\int \frac{du}{u} = \ln|u| + C$.

The second formula is the one to read slowly. The absolute value is not a safety decoration; it is what makes the statement true on both sides of zero. For $u > 0$ the derivative of $\ln u$ is $1/u$ directly. For $u < 0$, write $\ln|u| = \ln(-u)$, and the chain rule gives $\frac{-1}{-u} = \frac{1}{u}$ again. One formula, both signs, which is exactly what you need since $1/u$ exists for every $u \ne 0$.

The formula still says nothing about crossing zero. No antiderivative of $1/u$ is continuous across $u = 0$, so an integral whose interval contains the origin is not covered by this rule at all. Check the interval before evaluating.

Two mistakes account for most lost marks here. Writing $\ln x$ where $\ln|x|$ belongs is the first, and it turns a correct answer into a wrong one the moment the interval is negative. The second is treating $\int \frac{dx}{x^2+1}$ as a logarithm because it has a fraction with a sum underneath. The logarithm rule wants the exact derivative of the denominator on top, and $1$ is not the derivative of $x^2+1$.

Definitions and results

Natural exponential. $\int e^{x}\,dx = e^{x} + C$, and by substitution $\int e^{kx}\,dx = \frac{1}{k}e^{kx} + C$ for any constant $k \ne 0$.

Exponential with a general inner function. Setting $u = g(x)$ gives

$$ \int e^{\,g(x)}\,g'(x)\,dx = e^{\,g(x)} + C $$

Other bases. Since $\frac{d}{dx}a^{x} = a^{x}\ln a$ for $a > 0$ with $a \ne 1$,

$$ \int a^{x}\,dx = \frac{a^{x}}{\ln a} + C $$

The reciprocal. For $x \ne 0$,

$$ \int \frac{1}{x}\,dx = \ln|x| + C $$

This is the case the power rule for antiderivatives cannot reach.

The logarithmic pattern. Whenever the numerator is the derivative of the denominator,

$$ \int \frac{g'(x)}{g(x)}\,dx = \ln\big|g(x)\big| + C $$

If $g$ is positive on the interval in question, the bars may be dropped, and it is conventional to do so.

Tangent and cotangent. Substituting $u = \cos x$ in $\int \tan x\,dx$ gives

$$ \int \tan x\,dx = -\ln|\cos x| + C = \ln|\sec x| + C, \qquad \int \cot x\,dx = \ln|\sin x| + C $$

The logarithm as an integrand. The antiderivative of $\ln x$ is worth memorizing, and it is easy to confirm:

$$ \int \ln x\,dx = x\ln x - x + C $$

Differentiating the right side gives $\ln x + x\cdot\frac{1}{x} - 1 = \ln x$.

Logs appearing inside. An integrand containing $\ln x$ together with a factor of $1/x$ is a substitution waiting to happen, since $u = \ln x$ makes $du = dx/x$.

Worked examples

Exponentials with something in the exponent

Find $\displaystyle\int e^{3x}\,dx$ and $\displaystyle\int_0^1 x e^{x^2}\,dx$.

For the first, set $u = 3x$, so $du = 3\,dx$ and $dx = \tfrac{1}{3}du$:

$$ \int e^{3x}\,dx = \frac{1}{3}\int e^{u}\,du = \frac{1}{3}e^{3x} + C $$

For the second, the exponent is $x^2$ and its derivative $2x$ is present up to the constant $2$. With $u = x^2$ the limits move from $x = 0, 1$ to $u = 0, 1$, and

$$ \int_0^1 x e^{x^2}\,dx = \frac{1}{2}\int_0^1 e^{u}\,du = \frac{1}{2}\big(e - 1\big) $$

That is about $0.859$. A quick sanity check: the integrand rises from $0$ to $e \approx 2.72$ across an interval of width $1$, so a value under $1$ is reasonable.

The derivative-over-function pattern

Find $\displaystyle\int \frac{2x}{x^2+1}\,dx$ and $\displaystyle\int \frac{dx}{3x-5}$.

In the first, the numerator is exactly the derivative of the denominator, so $u = x^2+1$ gives $\int du/u$ and

$$ \int \frac{2x}{x^2+1}\,dx = \ln\big(x^2+1\big) + C $$

No absolute value is written because $x^2+1$ is positive for every $x$.

In the second, $u = 3x-5$ gives $du = 3\,dx$, so

$$ \int \frac{dx}{3x-5} = \frac{1}{3}\ln|3x-5| + C $$

Here the bars stay, since $3x-5$ is negative for $x < 5/3$.

Why the bars matter

Evaluate $\displaystyle\int_{-4}^{-1}\frac{dx}{x}$.

The interval lies entirely to the left of the origin, so the integrand is defined throughout and the rule applies. Evaluating,

$$ \int_{-4}^{-1}\frac{dx}{x} = \big[\ln|x|\big]_{-4}^{-1} = \ln 1 - \ln 4 = -\ln 4 $$

Writing $\ln x$ instead would have asked for $\ln(-1)$, which does not exist. The check is the sign: $1/x$ is negative on this whole interval, so the integral must come out negative, and $-\ln 4 \approx -1.386$ does.

By contrast, $\int_{-1}^{2} dx/x$ is not $\ln 2 - \ln 1$. The interval straddles $x = 0$, where the integrand blows up, so the integral does not exist as an ordinary definite integral.

Logarithms inside the integrand

Evaluate $\displaystyle\int_1^{e} \frac{(\ln x)^2}{x}\,dx$ and find $\displaystyle\int_0^{\pi/3}\tan x\,dx$.

For the first, take $u = \ln x$, so $du = dx/x$, exactly the leftover factor. The limits change to $u = \ln 1 = 0$ and $u = \ln e = 1$:

$$ \int_1^{e}\frac{(\ln x)^2}{x}\,dx = \int_0^1 u^2\,du = \frac{1}{3} $$

For the second, use the tangent formula derived above:

$$ \int_0^{\pi/3}\tan x\,dx = \big[-\ln|\cos x|\big]_0^{\pi/3} = -\ln\frac{1}{2} + \ln 1 = \ln 2 $$

Both answers are positive, which matches the graphs: $(\ln x)^2/x$ and $\tan x$ are nonnegative across the intervals used.

Practice

Start with the formulas on their own: exponentials with a constant in the exponent, other bases, reciprocals, and the standard logarithmic antiderivatives.

Practice

Generated problems for this section, graded instantly.

Then the substitutions that produce them. These place a function in the exponent or in the denominator and expect you to spot its derivative among the other factors.

Practice

Generated problems for this section, graded instantly.

Quiz

Five items on exponential antiderivatives, the logarithm of an absolute value, and substitutions leading to each.

Quiz

5 problems with a score at the end.