Why the Base Changes the Derivative
A logarithm answers an exponent question: \(\log_a x\) is the power to which the base \(a\) must be raised to obtain \(x\). Changing the base changes the scale on which that exponent is measured. As a result, logarithms with different bases have derivatives that differ by a constant factor.
The natural logarithm is especially useful in calculus because its derivative is already known: for \(x>0\), \(\frac{d}{dx}\ln x=\frac{1}{x}\). The change-of-base formula lets us express every logarithm with a valid base in terms of \(\ln x\), and therefore derive its derivative from this fact.
The base is fixed while \(x\) varies. The conditions on \(a\) ensure that the logarithm is defined and that \(\ln a\ne 0\), so division by \(\ln a\) will be valid.
Deriving Change of Base
Let \(y=\log_a x\). By the definition of the logarithm, \(a^y=x\). Since both sides are positive, take natural logarithms. The logarithm power rule gives \(\ln(a^y)=y\ln a\), so \(y\ln a=\ln x\). Because \(a\ne1\), \(\ln a\ne0\), and we can solve for \(y\).
This identity is the key step: it rewrites a logarithm in base \(a\) as a constant multiple of the natural logarithm. The denominator \(\ln a\) depends only on the fixed base, not on \(x\).
The Derivative Formula
Now differentiate the change-of-base expression with respect to \(x\). Since \(1/\ln a\) is constant, the constant-multiple rule and the derivative of \(\ln x\) give the result.
The condition \(x>0\) is essential: the real logarithm \(\log_a x\) is defined only for positive \(x\). The base conditions are also essential. If \(a=1\), then \(1^y=1\) for every \(y\), so this does not define a logarithm for general positive \(x\); and the formula would have a zero denominator since \(\ln 1=0\).
Why the Formula Has This Form
The factor \(1/x\) comes from differentiating \(\ln x\). The factor \(1/\ln a\) converts from the natural-logarithm scale to the scale of base \(a\). For example, a logarithm in base \(2\) changes more rapidly than \(\ln x\) by the constant factor \(1/\ln2\), while a logarithm in base \(10\) changes more slowly by the factor \(1/\ln10\).
The sign of the derivative also follows from the formula. If \(a>1\), then \(\ln a>0\), so \(1/(x\ln a)>0\) for \(x>0\). If \(0<a<1\), then \(\ln a<0\), so the derivative is negative. Thus the formula records both the rate of change and whether the logarithm increases or decreases.
Write \(\log_a x=\frac{\ln x}{\ln a}\), with \(a\) fixed and valid.
Use \(\frac{d}{dx}\ln x=\frac{1}{x}\), which applies for \(x>0\).
The constant \(1/\ln a\) remains, giving \(1/(x\ln a)\).
Worked Examples
Worked Example: Differentiating a Base-Two Logarithm
Find the derivative of \(f(x)=\log_2 x\), then evaluate it at \(x=8\).
The base \(2\) is positive and not equal to \(1\), and the domain is \(x>0\). By change of base,
Since \(\ln2\) is a constant,
At \(x=8\), substitute \(8\) for \(x\):
As a check, differentiating the change-of-base expression \(f(x)=\frac{\ln x}{\ln2}\) directly gives \(\frac{1}{\ln2}\cdot\frac{1}{x}\), which at \(x=8\) is exactly \(\frac{1}{8\ln2}\). The derivative is positive because \(\ln2>0\).
Worked Example: A Base-Ten Logarithm at a Specific Input
Find the derivative of \(g(x)=\log_{10}x\) at \(x=100\), and give a decimal approximation rounded to six decimal places.
Change of base gives \(g(x)=\frac{\ln x}{\ln10}\). Differentiating with respect to \(x\),
Substitute \(x=100\):
Using \(\ln10\approx2.302585093\), the denominator is \(100\ln10\approx230.2585093\), so \(g'(100)\approx0.004342945\). Rounded to six decimal places, the slope is \(0.004343\).
To check, differentiate \(g(x)=\frac{\ln x}{\ln10}\) directly: \(g'(x)=\frac{1}{x\ln10}\). Substituting \(100\) reproduces the exact value \(\frac{1}{100\ln10}\) used above.
Worked Example: A Base Between Zero and One
Find the derivative of \(h(x)=\log_{1/3}x\) at \(x=3\), and explain its sign.
The base \(1/3\) is positive and not equal to \(1\), so the derivative formula applies for \(x>0\):
Since \(\ln(1/3)=-\ln3\), substitution of \(x=3\) gives
Using \(\ln3\approx1.098612289\), the denominator \(3\ln3\approx3.295836867\), so \(-\frac{1}{3\ln3}\approx-0.303413075\). Rounded to six decimal places, the slope is \(-0.303413\).
For a check, differentiate the change-of-base expression \(h(x)=\frac{\ln x}{\ln(1/3)}\). Its derivative is \(\frac{1}{x\ln(1/3)}\), which at \(x=3\) is \(-\frac{1}{3\ln3}\), as obtained. The negative sign agrees with \(\ln(1/3)<0\).
A Common Mistake: Dropping the Base Factor
A frequent error is to treat \(\log_a x\) as though it were \(\ln x\), and therefore write its derivative as \(1/x\). That misses the constant \(1/\ln a\) introduced by change of base.
For instance, this incorrect rule would give a slope of \(1/2=0.5\) at \(x=2\). But the correct calculation is
The correction is to convert to the natural logarithm before differentiating, or to use the established formula with its base factor intact. A related sign error can occur for bases less than \(1\): because \(\ln a<0\) in that case, the derivative is negative, not positive.
Using the Result Carefully
Before applying the derivative formula, check that \(a\) is a fixed real number with \(a>0\) and \(a\ne1\), and that the input \(x\) is positive. Then substitute the base and input into \(1/(x\ln a)\). Keeping the base in the natural logarithm is important: the denominator is \(x\ln a\), not \(x\log_a\) of some quantity.
The result matters because it connects every fixed-base logarithmic derivative to the natural logarithm derivative. It also makes the effect of the base explicit: the input contributes the factor \(1/x\), while the base contributes the constant \(1/\ln a\). The sign gives useful information about the direction of change without needing to estimate the logarithm itself.
Check Your Understanding
Use the derivative formula and the stated domain and base conditions to answer these questions.
- For which values of \(a\) and \(x\) is \(\log_a x\) defined as a real logarithm?
- Use change of base to derive the derivative of \(\log_5x\).
- Find the exact derivative of \(\log_{10}x\) at \(x=10\).
- What is the sign of the derivative of \(\log_{1/4}x\) for \(x>0\), and why?
- Identify the missing factor in the incorrect claim \(\frac{d}{dx}\log_3x=\frac{1}{x}\), and write the correct derivative.