Differentiation of Functions

Differentiation Logo

Derivatives of Logarithmic Functions

On the page Definition of the Derivative, we have found the expression for the derivative of the natural logarithm function y = ln x :

\[\left( {\ln x} \right)^\prime = \frac{1}{x}.\]

Now we consider the logarithmic function with arbitrary base and obtain a formula for its derivative.

So, let's take the logarithmic function y = logax, where the base a is greater than zero and not equal to 1: a > 0, a ≠ 1. According to the definition of the derivative, we give an increment Δx > 0 to the independent variable x assuming that x + Δx > 0. The logarithmic function will increment, respectively, by the value of Δy where

\[\Delta y = {\log _a}\left( {x + \Delta x} \right) - {\log _a}x.\]

Divide both sides by \(\Delta x:\)

\[\frac{{\Delta y}}{{\Delta x}} = \frac{1}{{\Delta x}}\left[ {{{\log }_a}\left( {x + \Delta x} \right) - {{\log }_a}x} \right] = \frac{1}{{\Delta x}}{\log _a}\frac{{x + \Delta x}}{x} = \frac{1}{{\Delta x}}{\log _a}\left( {1 + \frac{{\Delta x}}{x}} \right).\]

Denote \({\frac{{\Delta x}}{x}} = {\frac{1}{n}}\). Then the last relation can be rewritten as

\[\frac{{\Delta y}}{{\Delta x}} = \frac{1}{{\Delta x}}{\log _a}\left( {1 + \frac{{\Delta x}}{x}} \right) = \frac{1}{x} \cdot n\,{\log _a}\left( {1 + \frac{1}{n}} \right).\]

Using the power property for logarithms, we obtain:

\[\frac{{\Delta y}}{{\Delta x}} = \frac{1}{x}{\log _a}{\left( {1 + \frac{1}{n}} \right)^n}.\]

Supposing that \(\Delta x \to 0\) (in this case \(n \to \infty\)), we find the limit of the ratio of the increments, i.e. the derivative of the logarithmic function:

\[\lim\limits_{\Delta x \to 0} \frac{{\Delta y}}{{\Delta x}} = \lim\limits_{n \to \infty } \left[ {\frac{1}{x}{{\log }_a}{{\left( {1 + \frac{1}{n}} \right)}^n}} \right] = \frac{1}{x}{\log _a}\left[ {\lim\limits_{n \to \infty } {{\left( {1 + \frac{1}{n}} \right)}^n}} \right].\]

Here we used the property of the limit of a composite function given that the logarithmic function is continuous. The limit in the square brackets converges to the famous trancendential number \(e\), which is approximately equal to \(2.718281828\ldots:\)

\[\lim\limits_{n \to \infty } {\left( {1 + \frac{1}{n}} \right)^n} = e \approx 2.718281828459 \ldots \]

Consequently, the derivative of the logarithmic function has the form

\[\left( {{{\log }_a}x} \right)^\prime = \frac{1}{x}{\log _a}e.\]

By the change-of-base formula for logarithms, we have:

\[{\log _a}e = \frac{{\ln e}}{{\ln a}} = \frac{1}{{\ln a}}.\]


\[y'\left( x \right) = {\left( {{{\log }_a}x} \right)^\prime } = \frac{1}{{x\ln a}}.\]

If \(a = e\), we obtain the natural logarithm the derivative of which is expressed by the formula \({\left( {\ln x} \right)^\prime } = {\frac{1}{x}}.\)

We note another important special case − the derivative of the common logarithm (to base \(10\)):

\[{\left( {\log _{10}x} \right)^\prime } = \frac{{\log _{10}e}}{x} = \frac{M}{x},\]

where the number \(M\) is equal to \(M = {\log _{10}}e \approx 0.43429 \ldots \)

Note that we derived the formula \(\left( {{{\log }_a}x} \right)^\prime = \frac{1}{{x\ln a}}\) from first principles - using the limit definition of the derivative. As the logarithmic function with base \(a\) \(\left({a \gt 0}\right.\), \(\left.{a \ne 1}\right)\) and exponential function with the same base form a pair of mutually inverse functions, the derivative of the logarithmic function can also be found using the inverse function theorem.

Suppose we are given a pair of mutually inverse functions \(y = f\left( x \right) = {\log_a}x\) and \(x = \varphi \left( y \right) = {a^y}.\) Then

\[\left( {{{\log }_a}x} \right)^\prime = f^\prime\left( x \right) = \frac{1}{{\varphi ^\prime\left( y \right)}} = \frac{1}{{\left( {{a^y}} \right)^\prime}} = \frac{1}{{{a^y}\ln a}} = \frac{1}{{{a^{{{\log }_a}x}}\ln a}} = \frac{1}{{x\ln a}}.\]

In the particular case \(a = e\), the derivative is given by

\[\left( {\ln x} \right)^\prime = \frac{1}{x}.\]

In the examples below, determine the derivative of the given function.

Solved Problems

Click or tap a problem to see the solution.

Example 1

\[y = \frac{{\ln x}}{x}\]

Example 2

\[y = x\ln x - x\]

Example 3

\[y = x\ln {\frac{1}{x}}\]

Example 4

\[y = \ln \left( {{x^2} - 2x} \right)\]

Example 5

\[y = \frac{1}{{\ln x}}\]

Example 6

\[y = \ln \left( {\sin x} \right)\]

Example 1.

\[y = \frac{{\ln x}}{x}\]


Differentiate using the quotient rule:

\[y'\left( x \right) = \left( {\frac{{\ln x}}{x}} \right)^\prime = \frac{{{{\left( {\ln x} \right)}^\prime } \cdot x - \ln x \cdot x'}}{{{x^2}}} = \frac{{\frac{1}{x} \cdot x - \ln x \cdot 1}}{{{x^2}}} = \frac{{1 - \ln x}}{{{x^2}}},\]

where \(x \gt 0.\)

Example 2.

\[y = x\ln x - x\]


Using the product and difference rules, we have

\[\require{cancel} y'\left( x \right) = \left[ {x\ln x - x} \right]^\prime = {\left( {x\ln x} \right)^\prime } - x' = x'\ln x + x{\left( {\ln x} \right)^\prime } - x' = 1 \cdot \ln x + x \cdot \frac{1}{x} - 1 = \ln x + \cancel{1} - \cancel{1} = \ln x\;\;\left( {x \gt 0} \right).\]

Example 3.

\[y = x\ln {\frac{1}{x}}\]


Using the product rule, the chain rule and the derivative of the natural logarithm, we have

\[y^\prime = \left( {x\ln \frac{1}{x}} \right)^\prime = x^\prime \cdot \ln \frac{1}{x} + x \cdot \left( {\ln \frac{1}{x}} \right)^\prime = 1 \cdot \ln \frac{1}{x} + x \cdot \frac{1}{{\frac{1}{x}}} \cdot \left( {\frac{1}{x}} \right)^\prime = \ln \frac{1}{x} + x \cdot x \cdot \left( { - \frac{1}{{{x^2}}}} \right) = \ln \frac{1}{x} - \frac{{\cancel{x^2}}}{{\cancel{x^2}}} = \ln \frac{1}{x} - 1.\]

Example 4.

\[y = \ln \left( {{x^2} - 2x} \right)\]


\[y^\prime = \left[ {\ln \left( {{x^2} - 2x} \right)} \right]^\prime = \frac{1}{{{x^2} - 2x}} \cdot \left( {{x^2} - 2x} \right)^\prime = \frac{{2x - 2}}{{{x^2} - 2x}}.\]

Example 5.

\[y = \frac{1}{{\ln x}}\]


By the power rule and the chain rule,

\[y^\prime = \left( {\frac{1}{{\ln x}}} \right)^\prime = \left[ {{{\left( {\ln x} \right)}^{ - 1}}} \right]^\prime = - 1 \cdot {\left( {\ln x} \right)^{ - 2}} \cdot \left( {\ln x} \right)^\prime = - \frac{1}{{{{\ln }^2}x}} \cdot \frac{1}{x} = - \frac{1}{{x\,{{\ln }^2}x}}.\]

Example 6.

\[y = \ln \left( {\sin x} \right)\]


By the chain rule,

\[y^\prime = \left( {\ln \left( {\sin x} \right)} \right)^\prime = \frac{1}{{\sin x}} \cdot \left( {\sin x} \right)^\prime = \frac{1}{{\sin x}} \cdot \cos x = \frac{{\cos x}}{{\sin x}} = \cot x.\]

See more problems on Page 2.

Page 1 Page 2