Logarithmic Functions log_b(x): Graphs, Rules, Derivative, Integral
Logarithmic functions log_b x: definition, graphs, log rules, change of base, the derivative 1/(x ln b), the integral and worked examples.
Exponential and logarithmic functions Updated 3 min read
At a glance
- Domain
- (0, \infty)
- Range
- (-\infty, \infty)
- Derivative
- \frac{1}{x\ln b}
- Integral
- \frac{x\ln x - x}{\ln b} + C
- Change of base
- \log_b x = \frac{\ln x}{\ln b}
- Inverse
- b^x
On this page
A logarithmic function \log_b x returns the exponent you need on the base b to produce x. For example \log_2 8 = 3 because 2^3 = 8. Logarithms undo exponential functions, and in calculus every logarithm is a constant multiple of the natural logarithm.
Definition and formula
Common bases: \log_{10}x (often written \log x), \ln x = \log_e x, and \log_2 x in computer science.
Graphs of logarithmic functions
Key properties
- Domain (0, \infty), range all reals.
- Passes through (1, 0) and (b, 1) for every base.
- Vertical asymptote x = 0.
- Increasing if b > 1, decreasing if 0 < b < 1.
- Inverse of b^x: b^{\log_b x} = x for x > 0 and \log_b(b^x) = x for all x. The graph is b^x reflected across y = x.
- Slow growth: for b > 1, \log_b x \to \infty but slower than any positive power of x.
Log rules
For x, y > 0:
| Rule | Formula |
|---|---|
| Product | \log_b(xy) = \log_b x + \log_b y |
| Quotient | \log_b\frac{x}{y} = \log_b x - \log_b y |
| Power | \log_b(x^k) = k\log_b x |
| Change of base | \log_b x = \frac{\ln x}{\ln b} |
| Special values | \log_b 1 = 0, \log_b b = 1 |
Derivative of log_b x
Change of base makes this a constant multiple of \ln x:
With the chain rule, \frac{d}{dx}\log_b g(x) = \frac{g'(x)}{g(x)\ln b}. When b = e, \ln e = 1 and you recover \frac{d}{dx}\ln x = \frac{1}{x}.
Integral of log_b x
Worked examples
Example 1: evaluate. \log_3 81 = 4 because 3^4 = 81, and \log_2\frac{1}{8} = -3 because 2^{-3} = \frac{1}{8}.
Example 2: derivative. \frac{d}{dx}\log_{10}x = \frac{1}{x\ln 10}. At x = 10 the slope is \frac{1}{10\ln 10} \approx 0.0434.
Example 3: chain rule. \frac{d}{dx}\log_2(x^2 + 1) = \frac{2x}{(x^2 + 1)\ln 2}.
Example 4: use log rules first. \frac{d}{dx}\log_5\left(x^3\sqrt{x}\right) = \frac{d}{dx}\tfrac{7}{2}\log_5 x = \frac{7}{2x\ln 5}.
Example 5: solving an exponential equation. To solve 2^x = 10, take \log_2 of both sides: x = \log_2 10 = \frac{\ln 10}{\ln 2} \approx 3.32.
Common mistakes
- Forgetting the \ln b in the derivative. \frac{d}{dx}\log_{10}x \ne \frac{1}{x}.
- Splitting a log of a sum. \log_b(x + y) \ne \log_b x + \log_b y.
- Writing \frac{\log_b x}{\log_b y} = \log_b(x - y). The quotient rule is for the log of a quotient, not a quotient of logs.
- Flipping the change of base. It is \frac{\ln x}{\ln b}, not \frac{\ln b}{\ln x}.
How it connects
Logarithms turn exponential equations into linear ones and products into sums, the idea behind logarithmic differentiation. They also appear in the integral of \frac{1}{x} and in many improper integrals. For the derivative rules side by side with exponentials, read the guide to derivatives of exponential and logarithmic functions.
Practice it now
Exponentials and logarithms
Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.
Practice this lesson