Tutorials › AP Calculus › Logarithmic Forms from Substitution

Antiderivatives and Substitution · Tutorial 501 of 999

Logarithmic Forms from Substitution

Recognize a function divided into its derivative, derive the logarithmic antiderivative, and use absolute values correctly on intervals where the denominator is nonzero.

Intermediate 9 min read

What You'll Learn

  • Recognize when an integrand has the form \(g'(x)/g(x)\)
  • Derive the logarithmic antiderivative using substitution
  • Include the absolute value when the inner function may be negative
  • Identify intervals where a logarithmic antiderivative is valid
  • Adjust for constant factors in the numerator
  • Check each result by differentiating it

When a Denominator Reappears in Its Derivative

Some integrals have a recognizable structure: the numerator is the derivative of the denominator, or a constant multiple of it. For instance, the derivative of \(x^2+1\) is \(2x\), so an integrand such as \(\frac{2x}{x^2+1}\) suggests a logarithm.

The key is to recognize the relationship between the numerator and denominator, not merely that the integrand is a rational expression. When the relationship matches, substitution reduces the integral to the basic form \(\int \frac{1}{u}\,du\). The resulting antiderivative uses the natural logarithm of an absolute value.

Key pattern: If \(g\) is differentiable and \(g(x)\ne 0\) on an interval, then \(\int \frac{g'(x)}{g(x)}\,dx=\ln|g(x)|+C\) on that interval.

Why the Absolute Value Is Necessary

The real natural logarithm \(\ln y\) is defined only when \(y>0\). But a differentiable function \(g(x)\) need not be positive. It may be negative throughout an interval, and the quotient \(\frac{g'(x)}{g(x)}\) is still defined there as long as \(g(x)\ne0\).

The absolute value makes the logarithm real on either kind of interval: if \(g(x)\ne0\), then \(|g(x)|>0\), so \(\ln|g(x)|\) is defined. The function \(g\) cannot change sign within an interval without passing through zero. Thus, the formula applies on any interval on which \(g\) is nonzero, including intervals where \(g\) is negative.

Definition: A logarithmic-form integrand is an integrand that can be written as \(\frac{g'(x)}{g(x)}\), or as a constant multiple of that expression, for a differentiable function \(g\) that is nonzero on the interval under consideration.

Deriving the Logarithmic Rule

The rule follows from substitution. Let \(u=g(x)\), so that \(du=g'(x)\,dx\). Wherever \(g(x)\ne0\), the integral becomes the integral of \(1/u\). The absolute value in the antiderivative is required because \(u\) can be positive or negative.

$$ \int \frac{g'(x)}{g(x)}\,dx = \int \frac{1}{u}\,du = \ln|u|+C = \ln|g(x)|+C. $$

The underlying derivative identity can also be checked directly. For \(g(x)>0\), differentiating \(\ln|g(x)|=\ln(g(x))\) gives \(g'(x)/g(x)\). For \(g(x)<0\), \(|g(x)|=-g(x)\), so differentiating \(\ln(-g(x))\) gives \(-g'(x)/(-g(x))=g'(x)/g(x)\). Both cases give the same result.

Theorem: If \(g\) is differentiable and nonzero throughout an interval \(I\), then \(\frac{d}{dx}\ln|g(x)|=\frac{g'(x)}{g(x)}\) for every \(x\in I\). Consequently, \(\ln|g(x)|+C\) is an antiderivative of \(\frac{g'(x)}{g(x)}\) on \(I\).

The condition \(g(x)\ne0\) matters: at a zero of \(g\), the quotient is undefined, and so is \(\ln|g(x)|\). If \(g\) has zeros, apply the rule on intervals that do not contain those zeros. The constant of integration may be different on different intervals.

Worked Example: A Polynomial Denominator That Can Be Negative

Worked Example: A Polynomial Denominator That Can Be Negative

Evaluate \(\int \frac{6x^2+4x}{2x^3+2x^2+7}\,dx\) on an interval where the denominator is nonzero.

Set \(g(x)=2x^3+2x^2+7\). Differentiate it:

$$ g'(x)=6x^2+4x. $$

The numerator is exactly \(g'(x)\). Therefore, the logarithmic-form rule gives

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

The absolute value is not optional here. For example, at \(x=-3\), the denominator is

$$ 2(-3)^3+2(-3)^2+7 = -54+18+7 = -29. $$

Thus the denominator is negative at \(x=-3\), and \(\ln(2x^3+2x^2+7)\) would not be a real-valued expression there. The absolute value gives \(\ln|-29|=\ln 29\). The formula is valid on any interval that does not include a zero of the denominator.

To check the antiderivative, differentiate:

$$ \frac{d}{dx}\ln|2x^3+2x^2+7| = \frac{6x^2+4x}{2x^3+2x^2+7}. $$

This is the original integrand wherever its denominator is nonzero.

Worked Example: A Quadratic With a Negative Value

Worked Example: A Quadratic With a Negative Value

Evaluate \(\int \frac{4x+6}{2x^2+6x-1}\,dx\) on any interval where the denominator is nonzero.

Let \(g(x)=2x^2+6x-1\). Its derivative is

$$ g'(x)=4x+6. $$

The numerator matches \(g'(x)\), so

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

For instance, at \(x=0\), the denominator is \(2(0)^2+6(0)-1=-1\). The integrand is defined there, and the antiderivative is \(\ln|-1|+C=0+C\). This illustrates why the formula must allow a negative denominator.

Differentiate the result to check it:

$$ \frac{d}{dx}\ln|2x^2+6x-1| = \frac{4x+6}{2x^2+6x-1}. $$

The derivative agrees with the original integrand wherever the denominator is nonzero.

Constant Multiples of the Pattern

The numerator need not equal the denominator’s derivative exactly. If it is a constant multiple, factor that constant out of the integral. For a constant \(k\),

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

provided \(g\) is differentiable and nonzero on the interval. The factor \(k\) stays outside the logarithm as a multiplier. This follows from the constant multiple rule for integrals; it is not generally correct to place \(k\) inside the logarithm without changing the expression.

Worked Example: A Constant Multiple of the Derivative

Evaluate \(\int \frac{4x}{x^2-1}\,dx\) on an interval where \(x^2-1\ne0\).

Choose \(g(x)=x^2-1\). Then

$$ g'(x)=2x, \qquad 4x=2g'(x). $$

Rewrite the integrand to show the constant multiple:

$$ \frac{4x}{x^2-1} = 2\frac{2x}{x^2-1} = 2\frac{g'(x)}{g(x)}. $$

Therefore,

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

To check, differentiate:

$$ \frac{d}{dx}\left(2\ln|x^2-1|\right) = 2\frac{2x}{x^2-1} = \frac{4x}{x^2-1}. $$

This matches the integrand. The excluded points are \(x=-1\) and \(x=1\), where the denominator is zero; the antiderivative applies separately on intervals that avoid those points.

A Reliable Recognition Process

When you suspect a logarithmic form, compare the numerator with the derivative of the denominator. A quick substitution can make the match explicit. Use this sequence:

1
Identify a candidate inner function.
For a fraction, try the denominator as \(g(x)\), and check that it is nonzero on the interval.
2
Differentiate it.
Compute \(g'(x)\) and compare it with the numerator, including any constant factor.
3
Write the matching form.
Express the integrand as \(g'(x)/g(x)\), or \(k g'(x)/g(x)\) for a constant \(k\).
4
Integrate and check.
Use \(\ln|g(x)|+C\), include any constant multiplier, and differentiate the result to verify it.

The match must be genuine. For example, if the denominator is \(x^2+1\), its derivative is \(2x\), not \(x+1\). The expression \(\frac{x+1}{x^2+1}\) is not directly of the form \(k g'(x)/g(x)\) for that denominator with a single constant \(k\). Do not apply the logarithmic rule just because the integrand contains a fraction.

Common Mistake: Dropping the Absolute Value

A frequent incorrect step is to write \(\int \frac{g'(x)}{g(x)}\,dx=\ln(g(x))+C\) without checking whether \(g(x)>0\). That expression can fail to be real-valued when \(g(x)<0\), even though the integrand itself is defined.

For the first worked example, substituting \(x=-3\) gives a denominator of \(-29\). The incorrect proposed antiderivative \(\ln(2x^3+2x^2+7)\) would require \(\ln(-29)\), which is not defined as a real logarithm. The correction is

$$ \ln|2x^3+2x^2+7|, $$

which is real at \(x=-3\), since \(|-29|=29>0\). Differentiating this corrected expression still returns the original quotient on any interval where the denominator is nonzero.

Takeaway: Use \(\ln|g(x)|\), not merely \(\ln(g(x))\), whenever the sign of \(g\) has not been restricted to positive values. The rule is valid only where \(g(x)\ne0\).

Check Your Understanding

For each question, identify the inner function, check the derivative match, and state any values that must be excluded.

  1. Find an antiderivative of \(\frac{2x}{x^2+4}\).
  2. Find an antiderivative of \(\frac{6x-3}{3x^2-3x+5}\).
  3. Find an antiderivative of \(\frac{8x}{x^2-9}\), and state where the formula applies.
  4. Why is \(\ln|g(x)|\) appropriate when \(g(x)\) is negative?
  5. Does the logarithmic-form rule apply directly to \(\frac{x+2}{x^2+1}\) by taking \(g(x)=x^2+1\)? Explain by comparing the numerator and \(g'(x)\).

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