Can You Pull the Logarithm of a Constant Out of an Integral?
At a glance
- 1. Check the expression
If the logarithm’s argument is constant, its value is constant with respect to the integration variable.
- 2. Use linearity
A constant factor can be moved outside an integral; integrate the remaining function as usual.
- 3. Keep log rules separate
A logarithm of a product splits into a sum, not a product of logarithms.
- 4. Check the domain
For real logarithms, the constant inside the log must be positive.
If is a fixed positive number, then does not depend on the integration variable . It is therefore an ordinary constant, and you may factor it out of an integral when it multiplies the rest of the integrand:
The key condition is that the logarithm is of a constant, not that a logarithm can be moved outside an integral in general. Integration is linear, so constant multipliers can be factored out. Logarithms do not have a general rule that lets you exchange the logarithm and the integral.
Why the constant can be factored out
An indefinite integral is an antiderivative with respect to a specified variable. If is fixed while varies, then is fixed too. The constant-multiple rule says
where is independent of . Set to get the stated rule.
For real logarithms, the input must satisfy . The base also matters if you write a base explicitly: for , require , , and . Any valid fixed base gives a number that is constant with respect to .
Worked example
Evaluate
First, evaluate the logarithm: , since . Then factor out that constant and integrate the polynomial:
Differentiating the result gives , which agrees with the original integrand .
If the integrand is just the logarithm of a constant, the same idea gives
This formula assumes is fixed and positive for a real logarithm.
When the logarithm is inside a product
Suppose instead that the integrand is . For positive real inputs, the product rule for logarithms gives
Thus, where both terms are defined,
Here the constant logarithm becomes an additive term in the integrand, whose integral is . It does not become a multiplier of the entire integral. For example, for , not .
For a definite integral, the same distinction applies. If is integrable on , then
If the integrand is and the logarithm law applies throughout the interval, then the constant term contributes :
Common mistakes
- Treating as . The product rule is , when the real logarithms are defined.
- Factoring out a quantity that depends on . You may factor out if is fixed, but not or as a constant multiplier.
- Dropping the integration variable’s effect. The antiderivative of a constant is , not merely .
- Ignoring the logarithm’s domain. For real logarithms, arguments must be positive. If the argument can be zero or negative on the interval, the real-valued log expression may not be defined there.
The practical test is simple: identify the integration variable. If the entire factor is independent of that variable and multiplies the integrand, pull it out using the constant-multiple rule. If the variable occurs inside the logarithm, first use a valid logarithm identity—or leave the expression as it is.
References
- James Stewart, Calculus: Early Transcendentals
- Tom M. Apostol, Calculus, Volume 1
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.