Skip to main content

Section 7.6 Logarithmic Differentiation

Knowing the derivative of the logarithm, the chain rule, and the properties of logarithms, we can use the logarithm to find derivatives of formulas involving otherwise awkward products, quotients, or powers. If \(f(x)\) involves a product, then \(\ln(|f(x)|)\) involves a sum. If \(f(x)\) involves a quotient, then \(\ln(|f(x)|)\) involves a difference. And if \(f(x)\) involves a power, then \(\ln(|f(x)|)\) involves a product. Because the differentiation rules of sums and differences are simpler than for products and quotients, introducing a logarithm on an equation can often simplify the required work.

Subsection 7.6.1 Logarithmic Differentiation

The product rule and quotient rules for derivatives can be considered to be consequences of the logarithm's derivative along with the chain rule. For example, consider a product \(y = f(x) g(x)\text{.}\) If we create an equivalent equation by applying the logarithm of the absolute value to both sides, we obtain a formula that can be expanded using the properties of the logarithm.

\begin{equation*} \ln(|y|) = \ln(|f(x) g(x)|) = \ln(|f(x)|) + \ln(|g(x)|). \end{equation*}

This also used the property of absolute values \(|a \cdot b| = |a| \cdot |b|\text{.}\) Implicit differentiation gives an equation that relates the derivatives:

\begin{equation*} \frac{y'}{y} = \frac{f'(x)}{f(x)} + \frac{g'(x)}{g(x)}. \end{equation*}

Multiplying through by \(y=f(x) g(x)\text{,}\) we obtain the product rule

\begin{equation*} y' = f'(x) g(x) + f(x) g'(x). \end{equation*}

A similar argument can be used to derive the quotient rule.

The argument from the previous paragraph is typical of the process we call logarithmic differentiation.

  1. Introduce a dependent variable such as \(y\) equal to the expression to differentiate.
  2. Apply the logarithm of the absolute value to both sides of that equation.
  3. Use the properties of logarithms and absolute values to expand the formula until there are no more logarithms of products, quotients, or powers.
  4. Use implicit differentiation and the general derivative of the logarithm to solve for \(y'\text{.}\)

When an expression has more than two factors or complicated powers, using logarithmic differentiation can often simplify the work of finding the derivative.

Example 7.6.1

Use logarithmic differentiation to compute

\begin{equation*} \frac{d}{dx}[ x^3 e^{3x} (2x+1)^5 ]. \end{equation*}
Solution

Start by creating an equation involving a dependent variable.

\begin{equation*} y = x^3 e^{3x} (2x+1)^5 \end{equation*}

Apply the logarithm of the absolute value to both sides:

\begin{equation*} \ln(|y|) = \ln(|x^3 e^{3x} (2x+1)^5|). \end{equation*}

Use the properties of logarithms to expand the right side:

\begin{equation*} \ln(|y|) = 3\ln(|x|) + \ln(|e^{3x}|) + 5 \ln(|2x+1|). \end{equation*}

Now use implicit differentiation and simplify:

\begin{gather*} \frac{y'}{y} = 3 \cdot \frac{1}{x} + \frac{3e^{3x}}{e^{3x}} + 5 \cdot \frac{2}{2x+1}\\ \frac{y'}{y} = \frac{3}{x} + 3 + \frac{10}{2x+1}\\ y' = y \cdot \Big(\frac{3}{x} + 3 + \frac{10}{2x+1}\Big) \end{gather*}

We finish by substituting the original expression for \(y\text{:}\)

\begin{equation*} y' = x^3 e^{3x} (2x+1)^5 \cdot \Big(\frac{3}{x} + 3 + \frac{10}{2x+1}\Big). \end{equation*}

Subsection 7.6.2 Proving the Power Rule

Logarithmic differentiation allows us to differentiate additional functions for which other rules may not apply. We start by proving the power rule for arbitrary powers. Using the known differentiation rules and the definition of the derivative, we were only able to prove the power rule in the case of integer powers and the special case of rational powers that were multiples of \(\frac{1}{2}\text{.}\) Logarithmic differentiation gives us a tool that will prove it generally.

Start with the equation \(y = x^p\text{.}\) Create an equivalent equation by taking the logarithm of the absolute value of both sides,

\begin{equation*} \ln(|y|) = \ln(|x^p|) = \ln(|x|^p). \end{equation*}

Using the properties of logarithms, this can be rewritten

\begin{equation*} \ln(|y|) = p \ln(|x|). \end{equation*}

We now use implicit differentiation and differentiate both sides of the equation:

\begin{gather*} \frac{d}{dx}[\ln(|y|)] = \frac{d}{dx}[ p \ln(|x|)]\\ \frac{1}{y} \cdot \frac{dy}{dx} = p \cdot \frac{1}{x}. \end{gather*}

Solving for the derivative, we have

\begin{equation*} \frac{dy}{dx} = p \cdot \frac{y}{x}. \end{equation*}

Substituting the original equation \(y=x^p\text{,}\) we obtain the power rule

\begin{equation*} \frac{dy}{dx} = p x^{p-1}. \end{equation*}

We can also use logarithmic differentiation to find derivatives of functions represented by powers that are neither power functions nor exponential functions. Recall that a power function must have a constant exponent and an exponential function must have a constant base. If the base and exponent both involve variables, then we are dealing with a function for which we have no differentiation rule.

Example 7.6.3

Find \(\frac{d}{dx}[x^x]\text{.}\)

Solution

The function \(y=x^x\) is not an exponential or a power function. Using logarithmic differentiation, we first rewrite the equation

\begin{equation*} \ln(|y|) = \ln(|x^x|) = \ln(|x|^x) = x \ln(|x|). \end{equation*}

The new expression involves only operations for which we have valid differentiation rules:

\begin{align*} \frac{y'}{y} &= \frac{d}{dx}[x \ln(|x|)] \\ &= 1 \cdot \ln(|x|) + x \cdot \frac{1}{x} \\ &= \ln(|x|) + 1. \end{align*}

Multiply by \(y\) and rewrite the formula gives

\begin{equation*} y' = y \cdot (\ln(|x|) + 1) = x^x(\ln(|x|) + 1). \end{equation*}

The original function \(y=x^x\) is not continuous for \(x \lt 0\text{.}\) This is because a power of a negative number is only defined at special rational powers. For example, \((-\frac{1}{2})^{-1/2}\) is not a real number but \((-2)^{-2}\) is. The function \(x^x\) is undefined almost everywhere for \(x \lt 0\) and therefore \(y'\) does not exist for \(x \lt 0\text{.}\) Consequently, the absolute value is not actually necessary if we state

\begin{equation*} \frac{d}{dx}[x^x] = x^x (\ln(x) + 1), \quad x \gt 0. \end{equation*}

Subsection 7.6.3 Summary

  • To differentiate an expression \(f(x)\) using logarithmic differentiation:

    1. Create an equation \(y = f(x)\text{.}\)
    2. Apply the logarithm of the absolute value to both sides of that equation, \(\ln(|y|) = \ln(|f(x)|)\text{.}\)
    3. Use the properties of logarithms and absolute values to expand the formula \(\ln(|f(x)|)\text{.}\)
    4. Use implicit differentiation and solve for \(y'\text{.}\)
  • Logarithmic differentiation is useful when working with a product or quotient for which the direct rules will be cumbersome, as well as for any power.

Subsection 7.6.4 Exercises

Use logarithmic differentiation to compute the derivatives.

1

\(\displaystyle \frac{d}{dx}\Big[ 4(x+1)^3(2x-1)^4(x^2+3)^5 \Big]\)

2

\(\displaystyle \frac{d}{dx}\Big[ \frac{2\sqrt{x} (x-1)^3}{(x^3+3x)^5} \Big]\)

3

\(\displaystyle \frac{d}{dx}\Big[ (x^2+1)^{x} \Big]\)

4

\(\displaystyle \frac{d}{dx}\Big[ (2x+1)^{\ln(x)} \Big]\)

5

\(\displaystyle \frac{d}{dx}\Big[ x^{(e^x))} \Big]\)

General consequences of logarithmic differentiation.

6

Use logarithmic differentiation to prove the quotient rule.

7

Use logarithmic differentiation to establish a product rule for three factors. That is, find \(\frac{d}{dx}[f(x) g(x) h(x)]\text{.}\)