OpenStax Calculus 2

Chapter 2: Applications of Integration

2.7 Integrals, Exponential Functions, and Logarithms

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

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

Big idea

There is a gap in the table of antiderivatives. The power rule says the antiderivative of $x^n$ is $\tfrac{x^{n+1}}{n+1}$, and that formula covers every exponent except one. When $n = -1$ the denominator is zero and the rule says nothing. So the function $1/x$, one of the simplest functions there is, has no antiderivative among the powers. Something new is needed, and this section builds it.

The construction is direct. The fundamental theorem of calculus says that if you define a function by an integral with a variable upper limit, its derivative is the integrand. So define a function to be exactly the accumulated area under $1/t$ starting at $t = 1$. By construction its derivative is $1/x$, and the gap is filled. What is not obvious, and is the whole content of this section, is that this newly built function turns out to be the natural logarithm: it converts products into sums, it has an inverse that is an exponential function, and the base of that exponential is the number $e$.

Building logarithms this way has a real payoff. If you start from $b^x$ for arbitrary real $x$ you owe an explanation of what an irrational power means, and the usual explanations are either circular or hand-waved. Starting from an integral, everything is already defined, and every logarithm law falls out of the derivative. The exponential function then arrives as an inverse rather than as a separate construction, and $b^x = e^{x \ln b}$ finally gives irrational exponents an honest meaning.

So treat this as a derivation, not a review. The laws of logarithms are the conclusion, and the argument that produces them is short and repeatable: two functions with the same derivative on an interval differ by a constant, and checking them at one convenient point pins that constant down.

Decoder

For $x > 0$, define the natural logarithm to be the integral of $1/t$ from $1$ to $x$. Then its derivative is $1/x$, it is zero at $x = 1$, and it converts products into sums.

Because the integrand $1/t$ is positive on $(0, \infty)$, this function increases everywhere, which already tells you it is one-to-one and therefore invertible. Its second derivative is $-1/x^2$, so it is concave down. For $x$ between $0$ and $1$ the limits are reversed and the value is negative, which is the correct sign: accumulating backwards subtracts.

The phrase “converts products into sums” is the one that has to be earned, and the argument recurs often enough to carry in your head. Fix a positive constant $a$ and compare $\ln(ax)$ with $\ln x$. By the chain rule the derivative of $\ln(ax)$ is $\tfrac{1}{ax}\cdot a = \tfrac{1}{x}$, the same as that of $\ln x$. Two functions with equal derivatives on $(0, \infty)$ differ by a constant, and setting $x = 1$ shows that constant is $\ln a$. Nothing about exponents was used.

The mistake worth naming is treating $\ln$ as if it were defined on all of the real line. The integral definition requires the path from $1$ to $x$ to avoid $t = 0$, so $\ln x$ exists only for $x > 0$. That is exactly why the antiderivative of $1/x$ is written with an absolute value: $\ln|x|$ works on either side of the origin, though never across it.

Definitions and results

The natural logarithm. For $x > 0$,

$$ \ln x = \int_1^x \frac{1}{t}\, dt $$

Its derivative. By the first part of the fundamental theorem of calculus, since $1/t$ is continuous on $(0, \infty)$,

$$ \frac{d}{dx} \ln x = \frac{1}{x}, \qquad \frac{d}{dx} \ln\big(u(x)\big) = \frac{u'(x)}{u(x)} $$

the second by the chain rule.

The missing antiderivative. On any interval not containing the origin,

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

The logarithm laws. For positive $a$ and $b$ and any real $r$,

$$ \ln(ab) = \ln a + \ln b, \qquad \ln\!\left(\frac{a}{b}\right) = \ln a - \ln b, \qquad \ln(a^r) = r \ln a $$

Each is proved the same way: both sides have the same derivative in the variable, and both sides agree at one point.

Estimating from the definition. Because the integrand is decreasing, a crude bound comes free. On $[1, 2]$ the function $1/t$ lies between $\tfrac{1}{2}$ and $1$, so $\tfrac{1}{2} \le \ln 2 \le 1$. The true value is about $0.693$.

The number $e$. Since $\ln$ is continuous and increasing, and takes values as large and as negative as you like, there is exactly one positive number whose logarithm is $1$. That number is called $e$, so $\ln e = 1$ and $e \approx 2.71828$.

The exponential function. The inverse of $\ln$ is written $\exp$, or $e^x$. It satisfies $e^{\ln x} = x$ for $x > 0$ and $\ln(e^x) = x$ for all $x$. Differentiating the second identity implicitly gives the property that defines it:

$$ \frac{d}{dx} e^x = e^x, \qquad \int e^x\, dx = e^x + C, \qquad \int e^{kx} dx = \frac{1}{k} e^{kx} + C $$

General bases. For $b > 0$, define $b^x = e^{x \ln b}$. This agrees with repeated multiplication when $x$ is a whole number and gives irrational exponents a meaning. The chain rule then gives

$$ \frac{d}{dx} b^x = b^x \ln b, \qquad \int b^x\, dx = \frac{b^x}{\ln b} + C \quad (b \ne 1) $$

Logarithms to other bases. Define $\log_b x = \dfrac{\ln x}{\ln b}$ for $b > 0$, $b \ne 1$. Its derivative is $\dfrac{1}{x \ln b}$, and the factor $\ln b$ in the denominator is exactly why base $e$ is the convenient one for calculus.

Worked examples

Differentiating an accumulation function

Let $G(x) = \displaystyle\int_1^{x^2} \frac{1}{t}\, dt$ for $x > 0$. Find $G'(x)$ two ways.

Using the fundamental theorem with the chain rule: the upper limit is $u = x^2$, so

$$ G'(x) = \frac{1}{u} \cdot \frac{du}{dx} = \frac{1}{x^2} \cdot 2x = \frac{2}{x} $$

Using the definition instead, $G(x) = \ln(x^2)$, and the power law rewrites that as $2\ln x$, whose derivative is $\tfrac{2}{x}$. The two agree, which is a small confirmation that the power law and the chain rule are telling the same story.

Without the extra factor you would be claiming the accumulation grows at the rate of the integrand alone, ignoring that the upper limit is sweeping forward at speed $2x$.

Proving the product law

Show that $\ln(ab) = \ln a + \ln b$ for positive $a$ and $b$.

Fix $a > 0$ and define $h(x) = \ln(ax)$ for $x > 0$. By the chain rule,

$$ h'(x) = \frac{1}{ax} \cdot a = \frac{1}{x} $$

So $h$ and $\ln$ have the same derivative on the interval $(0, \infty)$, which means $h(x) - \ln x$ is constant there. Evaluate the constant at the convenient point $x = 1$:

$$ h(1) - \ln 1 = \ln(a) - 0 = \ln a $$

Therefore $\ln(ax) = \ln x + \ln a$ for every $x > 0$, and putting $x = b$ gives the claim.

The same three lines prove the power law. With $h(x) = \ln(x^r)$ the chain rule gives $h'(x) = \tfrac{1}{x^r}\cdot r x^{r-1} = \tfrac{r}{x}$, which matches the derivative of $r \ln x$; both vanish at $x = 1$, so the constant is zero.

An integral that produces a logarithm, and one that consumes it

Evaluate $\displaystyle\int_1^{e} \frac{\ln x}{x}\, dx$.

Substitute $u = \ln x$, so $du = \tfrac{1}{x}\,dx$. The limits move with the substitution: $x = 1$ gives $u = \ln 1 = 0$, and $x = e$ gives $u = \ln e = 1$.

$$ \int_1^{e} \frac{\ln x}{x}\, dx = \int_0^1 u\, du = \left[ \frac{u^2}{2} \right]_0^1 = \frac{1}{2} $$

Compare with $\displaystyle\int_1^{e}\frac{1}{x}\,dx$, which is $\ln e - \ln 1 = 1$ straight from the definition. The extra factor $\ln x$ is small near $x = 1$ and reaches only $1$ at the right end, so half the second integral is the right size.

For a related indefinite integral, $\displaystyle\int \frac{2x}{x^2 + 5}\,dx = \ln(x^2 + 5) + C$, since the numerator is exactly the derivative of the denominator and the denominator is never zero.

Exponentials with other bases

Evaluate $\displaystyle\int_0^1 2^x\,dx$ and differentiate $y = 5^{x^2}$.

For the integral, use $\int b^x dx = \tfrac{b^x}{\ln b} + C$:

$$ \int_0^1 2^x\, dx = \left[ \frac{2^x}{\ln 2} \right]_0^1 = \frac{2 - 1}{\ln 2} = \frac{1}{\ln 2} \approx 1.443 $$

Sanity check: the integrand climbs from $1$ to $2$ over an interval of length $1$, so the answer must lie between those, and $1.44$ does.

For the derivative, write the function as $5^{u}$ with $u = x^2$ or, equivalently, as $e^{x^2 \ln 5}$. Either route gives

$$ \frac{dy}{dx} = 5^{x^2} (\ln 5)(2x) $$

The factor $\ln 5$ is the price of using a base other than $e$; it is absent only when the base is $e$, which is what makes $e$ the natural choice.

Practice

First, derivatives of functions defined by integrals. These are direct applications of the first part of the fundamental theorem, including cases where the upper limit is itself a function and the chain rule contributes a factor.

Practice

Generated problems for this section, graded instantly.

Then antiderivatives involving exponentials and logarithms, including the reciprocal that the power rule could not handle and integrands whose numerator is the derivative of the denominator.

Practice

Generated problems for this section, graded instantly.

Quiz

Five items on the integral definition of the natural logarithm, the laws that follow from it, and derivatives and integrals of exponentials.

Quiz

5 problems with a score at the end.