Tutorials › Calculus I › Logarithmic Patterns Of The Form f Prime Over f

Substitution and Reversing the Chain Rule · Tutorial 1129 of 1495

Logarithmic Patterns Of The Form f Prime Over f

Learn when a numerator-over-function pattern integrates to a logarithm, how to use substitution, and why the domain where the denominator is nonzero matters.

Intermediate 9 min read

What You'll Learn

  • Identify an integrand whose numerator is a constant multiple of the derivative of its denominator.
  • Use the substitution u = f(x) to derive the logarithmic antiderivative.
  • State the nonzero condition that makes the logarithmic pattern valid.
  • Use absolute value when the inner function may be negative.
  • Find the intervals on which an antiderivative is valid.
  • Check logarithmic antiderivatives by differentiating them.

Introduction

Some integrals have a useful pattern: the numerator is the derivative of the function in the denominator, possibly multiplied by a constant. For example, in \(\frac{2x}{x^2+1}\), the denominator \(x^2+1\) has derivative \(2x\), exactly the numerator.

This pattern leads to a logarithm. Recognizing it is an application of substitution as the reverse chain rule: the derivative of a logarithm of a function produces that function’s derivative divided by the function itself. The denominator’s nonzero condition is essential, so we will also keep track of where the resulting antiderivative is valid.

The logarithmic pattern

Key result: If \(f\) is differentiable and nonzero throughout an interval, and \(k\) is a constant, then $$ \int k\frac{f'(x)}{f(x)}\,dx = k\ln|f(x)|+C $$ on that interval. The absolute value is required when \(f(x)\) may be negative.

The numerator must match the derivative of the denominator’s inner function, up to a constant factor. The denominator itself must not be zero on the interval under consideration. If the integrand is undefined at a point, a single antiderivative cannot be defined across that point.

To see the pattern, let \(u=f(x)\). Then \(du=f'(x)\,dx\), so the integral takes the form \(k\int \frac{1}{u}\,du\). Since an antiderivative of \(1/u\) on any interval not containing zero is \(\ln|u|\), substituting back gives the stated result. The derivation is justified in detail below.

Worked examples

Worked Example: A cubic expression in the denominator

Evaluate \(\int \frac{6x^2}{x^3+2}\,dx\), and state where the result is valid.

Set \(u=x^3+2\). Then \(du=3x^2\,dx\), so \(6x^2\,dx=2\,du\). Substitution gives

$$ \int \frac{6x^2}{x^3+2}\,dx = 2\int \frac{1}{u}\,du = 2\ln|u|+C = 2\ln|x^3+2|+C. $$

The denominator is zero when \(x^3+2=0\), or \(x=-\sqrt[3]{2}\). Thus the integrand and antiderivative are valid on intervals that do not cross that point: \((-\infty,-\sqrt[3]{2})\) and \((-\sqrt[3]{2},\infty)\). The constant of integration may be chosen separately on each interval.

Check by differentiating:

$$ \frac{d}{dx}\left(2\ln|x^3+2|\right) = 2\frac{3x^2}{x^3+2} = \frac{6x^2}{x^3+2}, \qquad x\ne-\sqrt[3]{2}. $$

This recovers the integrand wherever it is defined.

Worked Example: A constant multiple of the derivative

Evaluate \(\int \frac{6x-12}{x^2-4x+7}\,dx\).

Let \(f(x)=x^2-4x+7\). Its derivative is \(f'(x)=2x-4\), and the numerator satisfies \(6x-12=3(2x-4)=3f'(x)\). Therefore the integrand has the required form with \(k=3\):

$$ \int \frac{6x-12}{x^2-4x+7}\,dx = 3\int \frac{f'(x)}{f(x)}\,dx = 3\ln|x^2-4x+7|+C. $$

Here \(x^2-4x+7=(x-2)^2+3\), which is positive for every real \(x\). The absolute value can therefore be removed, and the antiderivative is valid on all of \(\mathbb{R}\):

$$ 3\ln|x^2-4x+7| = 3\ln(x^2-4x+7). $$

Check by differentiation:

$$ \frac{d}{dx}\left(3\ln(x^2-4x+7)\right) = 3\frac{2x-4}{x^2-4x+7} = \frac{6x-12}{x^2-4x+7}. $$

The derivative is exactly the original integrand.

Worked Example: A denominator that changes sign

Evaluate \(\int \frac{2x}{x^2-9}\,dx\), specifying the intervals on which an antiderivative is valid.

Choose \(f(x)=x^2-9\), for which \(f'(x)=2x\). The numerator matches \(f'(x)\) without an extra factor, giving

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

The denominator is zero at \(x=-3\) and \(x=3\). The integrand is therefore defined on the three intervals \((-\infty,-3)\), \((-3,3)\), and \((3,\infty)\). The logarithmic antiderivative applies separately on each interval, with a potentially different constant on each one.

The absolute value cannot be omitted from a formula covering all three intervals: \(x^2-9\) is negative when \(-3<x<3\). To check the answer on any of these intervals, differentiate:

$$ \frac{d}{dx}\ln|x^2-9| = \frac{2x}{x^2-9}. $$

This equality holds wherever \(x^2-9\ne0\), exactly the domain of the integrand.

Why the rule works

The formula follows directly from the chain rule. On an interval where \(f(x)\ne0\), the sign of \(f(x)\) does not change: if it changed sign, continuity would force \(f\) to be zero somewhere between the two values. Thus, on that interval, either \(f(x)>0\) throughout or \(f(x)<0\) throughout. In either case, \(\ln|f(x)|\) is defined and differentiable.

For a positive input \(y\), the derivative of \(\ln y\) is \(1/y\). Applying the chain rule to the absolute-value expression on an interval where \(f\) has fixed nonzero sign gives the following calculation.

1
Differentiate the logarithm.
Since \(f\) is nonzero on the interval, \(\ln|f(x)|\) is defined there.
2
Apply the chain rule.
Whether \(f\) is positive or negative, the derivative of \(\ln|f(x)|\) is \(f'(x)/f(x)\).
3
Include the constant factor.
Multiplying the logarithm by \(k\) multiplies its derivative by \(k\).
$$ \frac{d}{dx}\left(k\ln|f(x)|\right) = k\frac{f'(x)}{f(x)}. $$

This proves the integration rule: the expression on the left is an antiderivative of the integrand on the right wherever \(f(x)\ne0\). Equivalently, substitution \(u=f(x)\) reduces the integral to \(k\int \frac{1}{u}\,du\); the chain-rule calculation verifies that substituting back produces an antiderivative in \(x\).

Recognizing the match and tracking the domain

When inspecting an integrand, identify the function in the denominator and differentiate it. Then compare that derivative with the numerator. If the numerator is a constant multiple \(k\) of the derivative, the logarithmic rule applies. If it is not, this pattern does not by itself evaluate the integral.

For instance, in \(\frac{5x}{x^2+4}\), the denominator’s derivative is \(2x\), so the numerator is \(\frac{5}{2}\) times that derivative. The factor \(\frac{5}{2}\) must remain in the answer. By contrast, a numerator with a different dependence on \(x\) does not match merely because the denominator is a function of \(x\).

For a real-valued logarithm, the input to \(\ln\) must be positive. That is why the formula uses \(\ln|f(x)|\), not simply \(\ln(f(x))\), when \(f\) may be negative. The absolute value makes the logarithm’s input positive at every point where \(f\ne0\), but it does not make the expression defined where \(f=0\).

Domain condition: Apply the logarithmic pattern only on intervals where the denominator function \(f(x)\) is nonzero. If \(f\) has zeros, split its domain at those zeros and consider each interval separately.

A common mistake: losing the constant factor

A frequent error is to write \(\ln(f(x))+C\) without checking whether its derivative equals the integrand. For example, consider \(\int \frac{4x}{x^2+5}\,dx\). Since the derivative of \(x^2+5\) is \(2x\), the numerator \(4x\) is twice that derivative.

The incorrect calculation \(\int \frac{4x}{x^2+5}\,dx=\ln(x^2+5)+C\) fails when checked:

$$ \frac{d}{dx}\ln(x^2+5) = \frac{2x}{x^2+5} \ne \frac{4x}{x^2+5}. $$

The correct calculation keeps the factor of \(2\):

$$ \int \frac{4x}{x^2+5}\,dx = 2\int \frac{2x}{x^2+5}\,dx = 2\ln(x^2+5)+C. $$

Because \(x^2+5>0\) for every real \(x\), this expression is defined on all of \(\mathbb{R}\). Its derivative confirms the correction:

$$ \frac{d}{dx}\left(2\ln(x^2+5)\right) = 2\frac{2x}{x^2+5} = \frac{4x}{x^2+5}. $$

Why this pattern matters

Recognizing \(f'(x)/f(x)\) lets you integrate a broad family of expressions without expanding, factoring, or otherwise changing the function. The same structure appears whenever a quantity is multiplied by the derivative of its denominator. The method is reliable when both parts of the match are checked: the numerator must be the correct constant multiple, and the denominator function must stay nonzero on the interval.

A useful final check is to differentiate the proposed answer. It reveals a missing constant factor and confirms that the result applies on the stated domain. It also reminds you that a formula for an indefinite integral describes antiderivatives on intervals where the original integrand is defined.

Check Your Understanding

For each question, identify the derivative match and pay attention to where the denominator is nonzero.

  1. Evaluate \(\int \frac{8x^3}{2x^4+1}\,dx\). What substitution reveals the logarithmic pattern?
  2. Evaluate \(\int \frac{3}{3x+2}\,dx\), and check the constant factor by differentiation.
  3. On which intervals is \(\int \frac{2x}{x^2-16}\,dx\) defined? Write an antiderivative valid on each interval.
  4. Why is \(\ln|f(x)|\) appropriate when \(f(x)\) may be negative?
  5. A proposed antiderivative is \(\ln(x^2+1)+C\) for \(\frac{6x}{x^2+1}\). Differentiate the proposed answer and correct it.

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): 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