Calculus › Section F · Logarithmic, exponential, and other transcendental functions › Topic F.2

The natural logarithm: integrals

Now the payoff flows the other way: 1/x finally gets its antiderivative, and a whole family of quotients, tan x among them, turn out to be logarithms in disguise.

Closing the loop

F.1 defined the natural logarithm as an accumulation function of \(\frac{1}{t}\) and harvested its derivative, \(\frac{1}{x}\). Integration is the reverse journey, so the conclusion writes itself: \(\frac{1}{x}\), the one integrand the reverse power rule could not reach, has antiderivative the natural logarithm. This topic cashes that in systematically. The surprise waiting at the end is breadth: because any quotient whose numerator is the derivative of its denominator is a chain rule read backwards, a large family of rational-looking integrals, and several trig ones, all condense into logarithms.

The log rule

The statement, with the absolute value doing real work:

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

Why the bars? The integrand lives on two branches, negative \(x\) as well as positive, and F.1 showed \(\frac{d}{dx}\ln|x| = \frac{1}{x}\) on both. With \(u\) in place of \(x\) the rule generalises through the chain rule: whenever a numerator is the derivative of the denominator,

\int \frac{u'}{u}\,dx = \ln|u| + C

That single sentence, top is derivative of bottom, is the pattern to spot, and it is the substitution \(u\) = denominator from E.5 in disguise.

Worked example: a linear denominator

Evaluate \(\int \frac{2}{3x + 1}\,dx\). Set \(u = 3x + 1\), so \(du = 3\,dx\) and the constant \(2\) pulls out: the integral is \(\frac{2}{3}\int \frac{du}{u} = \frac{2}{3}\ln|3x + 1| + C\). Differentiate to verify: \(\frac{2}{3} \cdot \frac{3}{3x+1} = \frac{2}{3x + 1}\). Correct. The general rule for linear insides is exactly E.5's shortcut: integrate as though the inside were plain \(x\), then divide by its slope. Keep the bars in the final answer, since nothing restricts \(3x + 1\) to positive values.

Worked example: derivative over itself

Evaluate \(\int \frac{x}{x^2 - 4}\,dx\). The denominator's derivative is \(2x\), and the numerator supplies an \(x\), off by the constant \(2\), which is adjustable. With \(u = x^2 - 4\), \(du = 2x\,dx\), so \(x\,dx = \frac{1}{2}\,du\), and

\int \frac{x}{x^2 - 4}\,dx = \frac{1}{2}\ln|x^2 - 4| + C

Check by differentiating: \(\frac{1}{2} \cdot \frac{2x}{x^2 - 4} = \frac{x}{x^2-4}\). The top-derivative-of-bottom scan took one second; the constant repair took one line. Notice the absolute value matters here: \(x^2 - 4\) is negative between \(-2\) and \(2\).

Harvesting the trig integrals

Two familiar functions surrender immediately to the pattern. For tangent, \(\tan x = \frac{\sin x}{\cos x}\), and the numerator is nearly the denominator's derivative, since \((\cos x)' = -\sin x\):

\int \tan x\,dx = -\ln|\cos x| + C = \ln|\sec x| + C

the two forms equal by the quotient law of logs. Cotangent is the mirror: \(\int \cot x\,dx = \ln|\sin x| + C\). For cotangent, \(\cot x = \frac{\cos x}{\sin x}\) and the numerator is exactly the derivative of \(\sin x\). Each verifies by differentiating straight back.

The secant trick

What about \(\int \sec x\,dx\), where no numerator derivative is in sight? The historical trick is to multiply and divide by \(\sec x + \tan x\):

\int \sec x \cdot \frac{\sec x + \tan x}{\sec x + \tan x}\,dx = \int \frac{\sec^2 x + \sec x \tan x}{\sec x + \tan x}\,dx

and now the numerator is exactly the derivative of \(\sec x + \tan x\), since \((\sec x)' = \sec x \tan x\) and \((\tan x)' = \sec^2 x\). The log rule gives \(\ln|\sec x + \tan x| + C\). Nobody is expected to guess this manoeuvre; what matters is that you can verify the answer by differentiating it.

Worked example: a definite integral with a log

Evaluate \(\int_1^3 \frac{1}{x}\,dx\). Since \(x > 0\) on \([1, 3]\), the bars can be dropped. The log rule makes it immediate:

\int_1^3 \frac{1}{x}\,dx = \big[\ln x\big]_1^3 = \ln 3 - \ln 1 = \ln 3 - 0 = \ln 3 \approx 1.0986

Notice \(\ln 1 = 0\) doing quiet work, this is the anchor the definition was built on. The same number is the area bounded by \(y = \frac{1}{x}\), the x-axis, and the vertical lines \(x = 1\) and \(x = 3\), a genuinely curved region whose area is exactly a logarithm.

Divide before you integrate

Some quotients avoid the log rule entirely because they split first. Compute \(\int \frac{x^2 + 1}{x}\,dx\): the top is not the bottom's derivative, so no single log applies, but division gives \(x + \frac{1}{x}\), two basic rules instead:

\int \left(x + \frac{1}{x}\right)dx = \frac{x^2}{2} + \ln|x| + C

The standing habit for rational-looking integrands is consequently two scans in order: first, is the top the bottom's derivative (the log rule), and if not, can polynomial division or simple splitting produce cheaper pieces? Long division is a first-line tool again in I.5, so the habit compounds.

Common mistakes to avoid

The recurrent slips: dropping the absolute values, so log-of-negative becomes possible nonsense; forcing the log rule when the numerator merely resembles the denominator's derivative but misses by a variable factor, that is E.5's fatal mismatch again; writing \(\ln x + C\) answers for definite integrals and forgetting to subtract the lower-limit value (\(\ln 1 = 0\) hides this error); integrating \(\frac{1}{x}\) with the power rule anyway, inventing \(\frac{x^0}{0}\); and losing the minus sign in \(\int \tan x\,dx = -\ln|\cos x| + C\). Verify by differentiating every time, and each of these exposes itself.

Key takeaways

\(\int \frac{1}{x}\,dx = \ln|x| + C\), bars included, because \(\frac{1}{x}\) is defined for negative \(x\) too. The pattern to scan for is numerator equals denominator's derivative, possibly repaired by a constant: \(\int \frac{u'}{u}\,dx = \ln|u| + C\). Tangent and cotangent are hidden logs, and secant surrenders to the famous multiply-by-itself-plus-tangent trick. Definite log integrals evaluate cleanly because \(\ln 1 = 0\). When the pattern fails, try splitting or division first rather than forcing the rule. Next: inverse functions in F.3, which lead to the exponential function as the inverse of \(\ln x\) in F.4.

Flashcards

Flashcard

∫ dx/x

ln|x| + C

The reverse power rule's missing case.

Test your understanding

Question 1 of 5

What is ∫ (1/x) dx?

Question 2 of 5

Evaluate ∫ x/(x² − 4) dx.

Question 3 of 5

What is ∫ tan x dx?

Question 4 of 5

Evaluate ∫ from 1 to 3 of (1/x) dx.

Question 5 of 5

Evaluate ∫ (x² + 1)/x dx.

Standards: 6

← Previous topicNext topic →