# Derivatives of Logarithmic Functions

**Derivatives of logarithmic functions** are mainly based on the chain rule. However, we can generalize it for any differentiable function with a logarithmic function. The differentiation of log is only under the base \(e,\) but we can differentiate under other bases, too.

## Derivative of \(\ln {x}\)

\[\frac{d}{dx} \ln {x} = \frac{1}{x}\]

Now we will prove this from first principles:

From first principles, \(\frac{d}{dx} f(x) = \displaystyle \lim_{h \rightarrow 0} {\dfrac{f(x+h)-f(x)}{h}}\).

Now let \(f(x) = \ln{x},\) then

\[\begin{align} \dfrac{\text{d}}{\text{d}x}f(x) & = \lim_{h \rightarrow 0} {\dfrac{\ln(x+h) - \ln{x}}{h}} \\ & = \lim_{h \rightarrow 0} {\dfrac{\frac{x}{h}\ln\left(1 + \frac{h}{x}\right)}{x} } \\ & = \lim_{h \rightarrow 0} {\dfrac{\ln{\left(1 + \frac{h}{x}\right)^{\frac{x}{h}}}}{x}} \\ & = \lim_{h \rightarrow 0} {\dfrac{\ln{e}}{x}} \\ & = \dfrac{1}{x}.\ _\square \end{align}\]

Find the derivative of \(\ln {x}\) at \(x = 2\).

We have

\[ \dfrac{\text{d}}{\text{d}x} \ln {x} = \dfrac{1}{x}.\]

Hence

\[ \dfrac{\text{d}}{\text{d}x} \ln x \Bigg |_{x=2}= \dfrac{1}{2}.\ _\square\]

Differentiate \(\ln 5x\)

Solution 1:Use the chain rule.Let \(f(x) = \ln x\) and \(g(x) = 5x\). Then we are asked to find \(( f \circ g ) '\).

Using chain rule, we know that \(( f \circ g ) ' = ( f' \circ g) \times g' . \)

Since \(f' \circ g = \frac{1}{5x}\) and \(g'(x) = 5,\) we have \(( f \circ g ) ' = \frac{1}{5x} \times 5 = \frac{1}{x}.\ _\square\)

Solution 2:Use properties of logarithms.We know the property of logarithms \(\log_a b + \log_a c = \log_a bc\). Using this property,

\[ \ln 5x = \ln x + \ln 5.\]

If we differentiate both sides, we see that

\[\dfrac{\text{d}}{\text{d}x} \ln 5x = \dfrac{\text{d}}{\text{d}x} \ln x\]

since differentiation of \(\ln 5\) which is a constant is \( 0.\)

We have seen that \(\frac{\text{d}}{\text{d}x} \ln x = \frac{1}{x}\), and this is the answer to this question. \(_\square\)

Generalization:For any positive real number \(p\), we can conclude \(\frac{\text{d}}{\text{d}x} \ln px = \frac{1}{x}\). Note that the derivative is independent of \(p\). This can be proven by writing \(p\) instead of \(5\) in the above solutions.

## Derivative of \(\log_{a}x\)

If \(a\) is a positive real number and \(a \neq 1\), then

\[\dfrac{\text{d}}{\text{d}x}\log_{a} {x} = \dfrac{1}{x \ln {a}}.\]

We will use base-changing formula to change the base of the logarithm to \(e:\)

\[\log_{a}{x} = \dfrac{\ln{x}}{\ln{a}} \\ \dfrac{\text{d}}{\text{d}x}\log_{a}x = \dfrac{\text{d}}{\text{d}x} \dfrac{\ln{x}}{\ln{a}}. \]

Since \(\frac{1}{\ln{a}}\) is a constant,

\[ \dfrac{\text{d}}{\text{d}x} \dfrac{\ln x}{\ln a} = \dfrac{1}{\ln a} \dfrac{\text{d}}{\text{d}x} \ln x = \dfrac{1}{x \ln{a}}.\ _\square\]

For any other type of log derivative, we use the base-changing formula.

## Derivative of \(\ln{f(x)}\)

Since this is a composite function, we can differentiate it using chain rule.

\[\dfrac{\text{d}}{\text{d}x}\ln\big(f(x)\big) = \dfrac{f'(x)}{f(x)} \]

Now we will start with \(g(x) = \ln \big(f(x)\big).\) To find its derivative, we will substitute \(u = f(x).\) Now the derivative changes to \(g(x) = \log{u}.\) So,

\[\begin{align} g'(x) &= \frac{d}{dx}\log{u} \\ &= \frac{du}{dx} \times \frac{d}{du} \ln{u} \\ &= \dfrac{f'(x)}{f(x)}.\ _\square \end{align}\]

Find the derivative of \(\ln(x^2 + 4)\).

Using the theorem, the derivative of \(\ln\big(f(x)\big)\) is \(\frac{f'(x)}{f(x)}\). In this problem, \(f(x) = x^2 +4,\) so \(f'(x) = 2x\).

Hence \(\frac{d}{dx}\log\big(x^2 + 4\big) = \frac{2x}{x^2 +4}.\ _\square\)

**Cite as:**Derivatives of Logarithmic Functions.

*Brilliant.org*. Retrieved from https://brilliant.org/wiki/derivative-of-logarithmic-functions/