Tutorials › Calculus I › Antiderivatives Of Logarithms With Different Bases

Antiderivatives and Basic Integrals · Tutorial 1060 of 1495

Antiderivatives Of Logarithms With Different Bases

Use the natural-logarithm antiderivative and the change-of-base formula to integrate logarithms with different bases, including bases between zero and one.

Beginner 8 min read

What You'll Learn

  • State the domain and base restrictions for a logarithm with base b.
  • Convert log base b of x into a natural logarithm.
  • Find the general antiderivative and explain the role of the factor ln b.
  • Work through examples with bases greater than one and between zero and one.
  • Verify antiderivatives by differentiating them.
  • Identify and correct a common missing-factor error.

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.

Definition: For \(b>0\), \(b\ne 1\), and \(x>0\), the logarithm \(\log_b x\) is the real number \(y\) such that \(b^y=x\). The change-of-base formula is \(\log_b x=\frac{\ln x}{\ln b}\).

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

Theorem: If \(b>0\) is fixed and \(b\ne 1\), then for \(x>0\), \[ \int \log_b x\,dx = \frac{x\ln x-x}{\ln b}+C, \] where \(C\) is an arbitrary constant.

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\):

$$ \begin{aligned} \int \log_b x\,dx &=\int \frac{\ln x}{\ln b}\,dx\\ &=\frac{1}{\ln b}\int \ln x\,dx\\ &=\frac{1}{\ln b}(x\ln x-x)+C. \end{aligned} $$

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:

$$ \frac{d}{dx}\left(\frac{x\ln x-x}{\ln b}\right) = \frac{1}{\ln b}\left(\frac{d}{dx}(x\ln x)-\frac{d}{dx}(x)\right) = \frac{1}{\ln b}\bigl((\ln x+1)-1\bigr) = \frac{\ln x}{\ln b} = \log_b x. $$

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,

$$ \begin{aligned} \int \log_2 x\,dx &=\int \frac{\ln x}{\ln 2}\,dx\\ &=\frac{1}{\ln 2}\int \ln x\,dx\\ &=\frac{x\ln x-x}{\ln 2}+C. \end{aligned} $$

To check, differentiate the result:

$$ \begin{aligned} \frac{d}{dx}\left(\frac{x\ln x-x}{\ln 2}+C\right) &=\frac{(\ln x+1)-1}{\ln 2}\\ &=\frac{\ln x}{\ln 2}\\ &=\log_2 x. \end{aligned} $$

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

$$ \begin{aligned} \int \log_{10} x\,dx &=\frac{1}{\ln 10}\int \ln x\,dx\\ &=\frac{x\ln x-x}{\ln 10}+C. \end{aligned} $$

Differentiate to check:

$$ \begin{aligned} \frac{d}{dx}\left(\frac{x\ln x-x}{\ln 10}+C\right) &=\frac{(\ln x+1)-1}{\ln 10}\\ &=\frac{\ln x}{\ln 10}\\ &=\log_{10}x. \end{aligned} $$

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,

$$ \begin{aligned} \int \log_{1/2}x\,dx &=\frac{x\ln x-x}{\ln(1/2)}+C\\ &=-\frac{x\ln x-x}{\ln 2}+C. \end{aligned} $$

To verify, differentiate:

$$ \begin{aligned} \frac{d}{dx}\left(-\frac{x\ln x-x}{\ln 2}+C\right) &=-\frac{(\ln x+1)-1}{\ln 2}\\ &=-\frac{\ln x}{\ln 2}\\ &=\frac{\ln x}{\ln(1/2)}\\ &=\log_{1/2}x. \end{aligned} $$

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.

1
Check the domain.
For a real logarithm with fixed base \(b\), require \(b>0\), \(b\ne1\), and \(x>0\).
2
Change the base.
Write \(\log_b x=\frac{\ln x}{\ln b}\), with \(\ln b\) a nonzero constant.
3
Use the natural-logarithm antiderivative.
Replace \(\int \ln x\,dx\) by \(x\ln x-x+C\), keeping the factor \(1/\ln b\).
4
Differentiate to check.
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,

$$ \begin{aligned} \frac{d}{dx}(x\log_b x-x) &=\log_b x+x\frac{d}{dx}(\log_b x)-1\\ &=\log_b x+x\left(\frac{1}{x\ln b}\right)-1\\ &=\log_b x+\frac{1}{\ln b}-1. \end{aligned} $$

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:

$$ \frac{x\ln x-x}{\ln b}+C = x\log_b x-\frac{x}{\ln b}+C. $$

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.

  1. Find an antiderivative of \(\log_3 x\) for \(x>0\).
  2. What conditions must the fixed base \(b\) satisfy for \(\log_b x\) to be a real logarithm?
  3. Why is \(\ln b\) nonzero under the allowed-base conditions?
  4. Find an antiderivative of \(\log_{1/4}x\), and explain the sign of its denominator.
  5. Differentiate \(x\log_b x-x\). For which part of the calculation does the missing-factor error become visible?

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