Tutorials › AP Calculus › The Logarithmic Antiderivative

Antiderivatives and Substitution · Tutorial 485 of 999

The Logarithmic Antiderivative

Use the derivative of the natural logarithm to find and verify antiderivatives of reciprocal linear expressions.

Intermediate 8 min read

What You'll Learn

  • Explain why the power rule for antiderivatives does not apply when the exponent is negative one
  • Find the antiderivative of one over x on intervals that do not contain zero
  • Integrate a reciprocal linear expression using its slope as a factor
  • Use absolute values to state logarithmic antiderivatives on positive and negative domains
  • Check an antiderivative by differentiating it
  • Identify common errors involving absolute values and constant factors

Why a Logarithm Appears

The power rule gives antiderivatives for many powers of \(x\), but it has an important exception. When the integrand is \(1/x=x^{-1}\), the usual power-rule calculation would require dividing by \(-1+1=0\). That division is not defined. A different function is needed, and the natural logarithm provides it.

This result is more than a special formula to memorize. It follows from the derivative of the natural logarithm, and it extends directly to expressions with a linear denominator. The central habit is to check the derivative of the proposed answer: that check confirms both the formula and its constant factor.

Key idea: On any interval that does not contain zero, an antiderivative of \(1/x\) is \(\ln|x|\). More generally, if \(a\ne 0\), an antiderivative of \(1/(ax+b)\) is \((1/a)\ln|ax+b|\), wherever \(ax+b\ne 0\).

The Antiderivative of One Over \(x\)

The natural logarithm \(\ln x\) is defined for positive \(x\), and its derivative is \(1/x\). Thus, when \(x>0\), differentiating \(\ln x\) gives the desired integrand. But \(1/x\) is also defined for negative \(x\), so a formula for its antiderivative should work on negative intervals too.

For \(x\ne 0\), the expression \(\ln|x|\) is defined. Its derivative is \(1/x\) on both sides of zero. For \(x>0\), \(|x|=x\), so \(\ln|x|=\ln x\). For \(x<0\), \(|x|=-x\), so the chain rule gives \(\frac{d}{dx}\ln(-x)=\frac{1}{-x}(-1)=1/x\).

Antiderivative formula: For any interval on which \(x\ne 0\),

\(\displaystyle \int \frac{1}{x}\,dx=\ln|x|+C.\)

Here \(C\) is an arbitrary constant. The formula applies separately on intervals to the left or right of zero; it does not define an antiderivative across zero, where the integrand is undefined.

The absolute value is essential to a formula that covers both positive and negative inputs. On a domain restricted to \(x>0\), \(\ln x+C\) is equivalent. On a domain restricted to \(x<0\), \(\ln(-x)+C\) is also equivalent. The compact expression \(\ln|x|+C\) covers either kind of interval without choosing a sign in advance.

Why the Logarithmic Formula Works

The formula can be justified completely by differentiation. An antiderivative of a function \(f\) on an interval is a function \(F\) whose derivative equals \(f\) at every point in that interval. Therefore, to establish the logarithmic formula, we differentiate the proposed function on each part of its domain.

1
Consider positive inputs.
If \(x>0\), then \(|x|=x\), and \(\frac{d}{dx}\ln|x|=\frac{d}{dx}\ln x=1/x\).
2
Consider negative inputs.
If \(x<0\), then \(|x|=-x\), and \(\frac{d}{dx}\ln|x|=\frac{d}{dx}\ln(-x)=\frac{1}{-x}(-1)=1/x\).
3
Include the constant.
Since the derivative of \(C\) is zero, \(\frac{d}{dx}\bigl(\ln|x|+C\bigr)=1/x\) wherever \(x\ne 0\).

This proves the formula on any interval that lies entirely on one side of zero. The restriction matters: \(1/x\) is undefined at zero, so there cannot be an antiderivative of this integrand on an interval that includes zero.

Reciprocal Linear Expressions

A linear expression \(ax+b\) changes at the constant rate \(a\). When \(a\ne 0\), the denominator \(ax+b\) is zero at \(x=-b/a\), so the reciprocal is defined only away from that value. The antiderivative formula applies on any interval that does not include this point.

To find the formula, differentiate \(\ln|ax+b|\). The chain rule gives a factor of \(a\):

$$ \frac{d}{dx}\ln|ax+b|=\frac{a}{ax+b}, \qquad ax+b\ne 0. $$

The derivative is \(a\) times the integrand \(1/(ax+b)\). Multiplying the logarithm by \(1/a\) cancels that factor. This explains why the slope of the linear expression appears in the denominator of the antiderivative.

Theorem: If \(a\ne 0\), then on any interval where \(ax+b\ne 0\),

\(\displaystyle \int \frac{1}{ax+b}\,dx=\frac{1}{a}\ln|ax+b|+C.\)

More generally, for a constant \(k\), \(\displaystyle \int \frac{k}{ax+b}\,dx=\frac{k}{a}\ln|ax+b|+C\). The second formula follows by multiplying the first integrand by \(k\).

Worked Examples

Worked Example: Integrate One Over a Negative Input

Find an antiderivative of \(\displaystyle \frac{1}{x}\) on the interval \(x<0\).

The integrand is defined throughout this interval, and \(|x|=-x\) there. The logarithmic formula gives

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

Since \(x<0\), the same expression can be written \(\ln(-x)+C\). Check by differentiating:

$$ \frac{d}{dx}\bigl(\ln(-x)+C\bigr) =\frac{1}{-x}(-1)+0 =\frac{1}{x}. $$

The derivative equals the original integrand at every \(x<0\), so the antiderivative is verified.

Worked Example: Integrate a Reciprocal Linear Expression

Find \(\displaystyle \int \frac{6}{3x-2}\,dx\).

Here the numerator is \(6\), and the denominator has slope \(3\). The coefficient in front of the logarithm is \(6/3=2\). Thus

$$ \int \frac{6}{3x-2}\,dx=2\ln|3x-2|+C. $$

The denominator is zero when \(3x-2=0\), so \(x=2/3\) is excluded. The formula applies on any interval that does not contain \(2/3\). Check by differentiating the proposed answer:

$$ \frac{d}{dx}\bigl(2\ln|3x-2|+C\bigr) =2\cdot\frac{3}{3x-2}+0 =\frac{6}{3x-2}. $$

This is the original integrand, as required.

Worked Example: Account for a Negative Slope

Find \(\displaystyle \int \frac{5}{4-2x}\,dx\).

Write the denominator as \(ax+b\), so \(a=-2\) and \(b=4\). The numerator divided by this slope is \(5/(-2)=-5/2\). Therefore

$$ \int \frac{5}{4-2x}\,dx=-\frac{5}{2}\ln|4-2x|+C. $$

The denominator vanishes at \(4-2x=0\), or \(x=2\), so the expression is considered on an interval that does not contain \(2\). Differentiate to check both the sign and the factor:

$$ \frac{d}{dx}\left(-\frac{5}{2}\ln|4-2x|+C\right) =-\frac{5}{2}\cdot\frac{-2}{4-2x}+0 =\frac{5}{4-2x}. $$

The two negative factors cancel, giving the original integrand. This confirms that the coefficient must include the negative slope.

Conditions and Limits of the Formula

Before applying a logarithmic antiderivative, check that the denominator really has the required form and that it is nonzero on the interval under consideration. For \(1/(ax+b)\), the stated formula requires \(a\ne 0\). If \(a=0\), the denominator is the constant \(b\); when \(b\ne 0\), the integrand is constant \(1/b\), not a reciprocal linear expression with a nonzero slope.

The logarithmic formula also does not say that every fraction has a logarithmic antiderivative of this form. It applies when the numerator is constant and the denominator is linear, or when the numerator is a constant multiple of the derivative of the denominator. More complicated rational expressions may require other methods. In this lesson, the useful recognition pattern is specifically a constant over a nonconstant linear expression.

As with other indefinite integrals, the answer represents a family of antiderivatives. On a given interval, adding any constant \(C\) does not change the derivative. If the domain has separate pieces on either side of the point where the denominator is zero, the constants on those separate intervals need not be the same: the derivative condition cannot connect values across a point outside the domain.

Common Mistakes

A frequent error is to omit the factor coming from the slope of the denominator. For example, the following calculation is wrong:

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

Differentiate the proposed answer to test it:

$$ \frac{d}{dx}\ln|3x+1|=\frac{3}{3x+1}, $$

which is three times the requested integrand. The correction is to divide by the slope \(3\):

$$ \int \frac{1}{3x+1}\,dx=\frac{1}{3}\ln|3x+1|+C, \qquad \frac{d}{dx}\left(\frac{1}{3}\ln|3x+1|\right) =\frac{1}{3}\cdot\frac{3}{3x+1} =\frac{1}{3x+1}. $$

Another common error is writing \(\ln x\) for an integrand \(1/x\) without restricting to \(x>0\). On a negative interval, \(\ln x\) is not defined as a real-valued function. Writing \(\ln|x|\) correctly covers all \(x\ne 0\), while still respecting the fact that the integrand itself is undefined at zero.

Quick check: After finding a logarithmic antiderivative, differentiate it. The chain-rule factor from the inside expression must cancel with the coefficient outside the logarithm, and the logarithm's argument must be nonzero on the interval.

Why This Antiderivative Matters

The logarithmic antiderivative completes an important exception in the basic power-rule patterns. Powers other than \(x^{-1}\) can be handled by the power rule for antiderivatives, while \(1/x\) leads to \(\ln|x|\). Recognizing this exception prevents an invalid division by zero and gives a reliable way to handle reciprocal linear expressions.

It also builds a useful connection between differentiation and integration. The factor \(1/a\) in the answer is not an arbitrary adjustment: it compensates for the factor \(a\) produced when the logarithm is differentiated by the chain rule. Whenever a logarithm appears in an antiderivative, verifying it by differentiation is a direct way to catch sign and scale errors.

Check Your Understanding

For each question, state any domain restriction and use differentiation to check your proposed antiderivative.

  1. Find an antiderivative of \(1/x\) on an interval where \(x>0\).
  2. Find an antiderivative of \(1/(5x+2)\).
  3. Find an antiderivative of \(8/(2x-7)\).
  4. Why is an interval containing \(x=0\) not a valid interval for an antiderivative of \(1/x\)?
  5. What is wrong with using \(\ln|2x+1|+C\) as an antiderivative of \(1/(2x+1)\)?

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon