From Natural Logarithms to Other Bases
The logarithm \(\log_b x\) measures a quantity using base \(b\), while the natural logarithm \(\ln x\) uses base \(e\). Changing the base changes the values of the logarithm by a constant scale factor. That same factor must appear when finding an antiderivative.
Throughout this tutorial, \(b\) is a fixed real number satisfying \(b>0\) and \(b\ne 1\), and \(x>0\). The restrictions on \(b\) ensure that \(\log_b x\) is defined as a real logarithm; the restriction on \(x\) is its domain.
Since \(b\ne 1\), we have \(\ln b\ne 0\). Thus the change-of-base formula expresses \(\log_b x\) as a constant multiple of \(\ln x\). The natural-logarithm antiderivative established in the earlier material is \(x\ln x-x+C\). We can use that formula together with linearity to obtain the antiderivative for any allowed base.
The General Formula
To see why this formula works, first replace the logarithm with its natural-logarithm expression. The factor \(1/\ln b\) is constant with respect to \(x\), so it can be taken outside the integral. Then use the antiderivative of \(\ln x\):
The constant is written as \(C\) after the factor is applied because any constant multiple of an arbitrary constant is still an arbitrary constant. A direct differentiation also verifies the formula and makes the necessary scale factor especially clear:
Here \(b\) is held fixed during differentiation, so \(\ln b\) is a nonzero constant. The derivative identity proves that the displayed expression is an antiderivative on \(x>0\). The arbitrary constant accounts for the full family of antiderivatives on this interval.
Worked Examples
Worked Example: Integrating a Base-2 Logarithm
Find \(\int \log_2 x\,dx\), for \(x>0\).
The change-of-base formula gives \(\log_2 x=\frac{\ln x}{\ln 2}\). Since \(\ln 2\) is a fixed nonzero constant,
To check, differentiate the result:
The derivative matches the integrand, as required.
Worked Example: Integrating a Base-10 Logarithm
Find \(\int \log_{10} x\,dx\), for \(x>0\).
Use \(\log_{10}x=\frac{\ln x}{\ln 10}\). Applying the antiderivative of \(\ln x\) gives
Differentiate to check:
The denominator is \(\ln 10\), not \(10\): it comes from the change-of-base formula.
Worked Example: A Base Between Zero and One
Find \(\int \log_{1/2}x\,dx\), for \(x>0\).
The base \(1/2\) is valid: it is positive and is not equal to one. Its natural logarithm is \(\ln(1/2)=-\ln 2\), which is negative but nonzero. Therefore,
To verify, differentiate:
The negative sign is necessary because \(\ln(1/2)=-\ln 2\). It does not mean the antiderivative rule fails for bases below one.
Using a Known Natural-Logarithm Antiderivative
The formula can be remembered as the natural-logarithm result multiplied by the change-of-base factor. In particular, \(\log_b x\) is not generally the same function as \(\ln x\): its value is \(\ln x\) divided by \(\ln b\). Omitting that divisor changes the derivative.
For a real logarithm with fixed base \(b\), require \(b>0\), \(b\ne1\), and \(x>0\).
Write \(\log_b x=\frac{\ln x}{\ln b}\), with \(\ln b\) a nonzero constant.
Replace \(\int \ln x\,dx\) by \(x\ln x-x+C\), keeping the factor \(1/\ln b\).
The derivative should simplify to \(\frac{\ln x}{\ln b}=\log_b x\).
The base may be greater than one or between zero and one. If \(b>1\), then \(\ln b>0\); if \(0<b<1\), then \(\ln b<0\). In both cases the same formula applies, because the only required denominator condition is \(\ln b\ne0\). The excluded base \(b=1\) would make \(\ln b=0\), and \(\log_1 x\) is not defined as a logarithm.
A Common Missing-Factor Error
A tempting but incorrect expression is \(x\log_b x-x+C\). It resembles the natural-logarithm antiderivative, but the product rule shows why it does not work for a general base. In fact,
This is not generally equal to \(\log_b x\). For example, with \(b=2\), the incorrect expression has derivative \(\log_2 x+\frac{1}{\ln 2}-1\), which contains an extra nonzero constant. The correction is to integrate using the change-of-base factor:
The two forms on the last line are equivalent because \(x\ln x/\ln b=x\log_b x\). Differentiating either gives exactly \(\log_b x\). This comparison is also a useful way to spot the missing factor: both the logarithmic term and the accompanying linear term must have the scaling dictated by \(1/\ln b\).
Why the Formula Is Useful
Logarithms with different bases appear in different settings, but their antiderivatives do not require a separate rule for every base. The change-of-base formula reduces each one to the natural logarithm, whose antiderivative is already known. The result also makes clear how a base affects the scale: changing \(b\) changes the constant divisor \(\ln b\), while the dependence on \(x\) remains \(x\ln x-x\).
When using the formula, keep three points in view:
- The base \(b\) is fixed and must satisfy \(b>0\) and \(b\ne1\).
- The variable must satisfy \(x>0\), the real domain of \(\log_b x\).
- The denominator \(\ln b\) must remain in the result; it is the scale factor that makes the derivative correct.
These checks are enough to avoid the most common errors. After writing an antiderivative, differentiate it: the final expression must simplify to the original logarithm, including its base.
Check Your Understanding
Use the change-of-base formula and check each proposed antiderivative by differentiating.
- Find an antiderivative of \(\log_3 x\) for \(x>0\).
- What conditions must the fixed base \(b\) satisfy for \(\log_b x\) to be a real logarithm?
- Why is \(\ln b\) nonzero under the allowed-base conditions?
- Find an antiderivative of \(\log_{1/4}x\), and explain the sign of its denominator.
- Differentiate \(x\log_b x-x\). For which part of the calculation does the missing-factor error become visible?