Skip to content
Related Articles

Related Articles

Improve Article

Logarithmic Differentiation

  • Last Updated : 13 Jan, 2021

The method of finding the derivative of a function by first taking the logarithm and then differentiating is called logarithmic differentiation. This method is specially used when the function is of type y = f(x)g(x). In this type of problem where y is a composite function, we first need to take a logarithm, making the function log (y) = g(x) log (f(x)). This creates a situation where the differentiation of exponent function was quite difficult but after taking log on both sides of the equation, we can easily differentiate it using logarithm properties and chain rule. This method is also known as Composite exponential function differentiation. This approach allows us to calculate the derivative of complex exponential functions in an efficient manner. 

Logarithmic Differentiation Formula

Giveny = f(x)g(x)

Taking log on both sides:

log(y) = log(f(x)g(x))

Using log properties:

log(y) = g(x)⋅ log(f(x))

Differentiating both sides:

\frac{d}{d x} \log (y)=\frac{d}{d x}(g(x) \cdot \log (f(x)))

Using uv rule:

\frac{d}{d x} \log (y)=g(x) \cdot \frac{d}{d x} \log (f(x))+\log (f(x)) \cdot \frac{d}{d x} g(x)

Using Chain rule:

\frac{1}{y} \frac{d y}{d x}=g(x) \cdot \frac{1}{f(x)} \cdot f'(x)+\log (f(x)) \cdot g'(x) \\ \frac{d y}{d x}=y ({g(x) \cdot \frac{1}{f(x)} \cdot f'(x)+\log (f(x)) \cdot g'(x))}

The only constraint for using logarithmic differentiation rules is that f(x) and u(x) must be positive as logarithmic functions are only defined for positive values.

Steps to Solve Logarithmic Differentiation Problems

These are the steps given here to solve find the differentiation of logarithmic functions:

  1. Taking log on both sides.
  2. Use log property to remove exponent.
  3. Now differentiate the equation.
  4. Simplify the obtained equation.
  5. Substitute back the value of y.

Sometimes it may get a bit messy but keep your calm and just differentiate. Following are some examples of Logarithmic Differentiation.

Example 1: Find the derivative of xx?


Let y = xx

Step 1: Taking log on both sides

log(y) = log(xx)

Step 2: Use log property to remove exponent

log(y) = x ⋅ log(x)

Step 3: Now differentiate the equation

\frac{d}{d x} \log (y)=\frac{d}{d x}(x \cdot \log (x)) \\ \frac{d}{d x} \log (y)=x \cdot \frac{d}{d x} \log (x)+\log (x) \cdot \frac{d x}{d x} \\ \frac{1}{y} \frac{d y}{d x}=x \cdot \frac{1}{x}+\log (x)

Step 4: Simplify the obtained equation

\frac{d y}{d x}=y(1+\log (x))

Step 5: Substitute back the value of y

\frac{d y}{d x}=x^{x}(1+\log (x))

Example 2: Find the derivative of x^{\left(x^{x}\right)} ?


       y = x^{\left(x^{x}\right)}

Taking log on both sides,

      log(y) = log(x^{\left(x^{x}\right)})

      log(y) = xx⋅ log(x)         {log(ab) = b⋅ log(a)}

Differentiating both sides,

\frac{d}{d x} \log (y)=\frac{d}{d x}\left(x^{x} \cdot \log (x)\right) \\ \qquad \frac{d}{d x} \log (y)=x^{x} \cdot \frac{d}{d x} \log (x)+\log (x) \cdot \frac{d}{d x} x^{x}\qquad  \quad\left\{f^{\prime}(u . v)=u . f^{\prime}(v)+v \cdot f^{\prime}(u)\right\} \\ \qquad \qquad \frac{1}{y} \frac{d y}{d x}=x^{x} \cdot \frac{1}{x}+\log (x) \frac{d}{d x} x^{x} \qquad \qquad \qquad \quad \quad\left\{f^{\prime}(\log x)=\frac{1}{x}\right\} \\ \qquad \qquad \frac{1}{y} \frac{d y}{d x}=x^{x-1}+\log (x) \frac{d}{d x} x^{x}

Since now we know the derivative of xx, We will substitute here directly.

\qquad \qquad \frac{1}{y} \frac{d y}{d x}=x^{x-1}+\log x \cdot x^{x}(1+\log x) \\ \qquad \qquad \frac{d y}{d x}=y\left(x^{x-1}+\log x \cdot x^{x}(1+\log x)\right) \\ \qquad \qquad \frac{d y}{d x}=x^{\left(x^{x}\right)}\left(x^{x-1}+\log x \cdot x^{x}(1+\log x)\right)

Example 3: Find the derivative of y = (log x)x?


        y = (logx)x

Taking log on both sides,

       log(y) = log((logx)x)

       log(y) = x ⋅ log(logx)     {log(ab) = b⋅ log(a)}

Differentiating both sides,

\frac{d}{d x} \log (y)=\frac{d}{d x}(x \cdot \log (\log x)) \\ \qquad \frac{d}{d x} \log (\mathrm{y})=x \cdot \frac{d}{d x} \log (\log x)+\log (\log x) \cdot \frac{d x}{d x} \\ \qquad \qquad \frac{1}{y} \frac{d y}{d x}=x \cdot \frac{1}{\log x} \cdot \frac{1}{x}+\log (\log x) \\ \\ \qquad \qquad \frac{1}{y} \frac{d y}{d x}=\frac{1}{\log x}+\log (\log x) \qquad \{ Using Chain Rule \} \\ \qquad \ \ \qquad \frac{d y}{d x}=y \cdot\left(\frac{1}{\log x}+\log (\log x)\right) \\ \qquad \ \ \qquad \frac{d y}{d x}=(\log x)^{x} \cdot\left(\frac{1}{\log x}+\log (\log x)\right)

Example 4:  Find the derivative of y = x√x?


        y = x√x

Taking log on both sides,

        log(y) = log(x√x​​)

        log(y) = √x​⋅ log(x)       {log(ab) = b⋅ log(a)}

Differentiating both sides,

\frac{d}{d x} \log (y)=\frac{d}{d x}(\sqrt{x} \cdot \log (x)) \\ \qquad \frac{d}{d x} \log (\mathrm{y})=\sqrt{x} \cdot \frac{d}{d x} \log (\mathrm{x})+\log (x) \cdot \frac{d \sqrt{x}}{d x} \\ \\ \qquad \qquad \frac{1}{y} \frac{d y}{d x}=\sqrt{x} \cdot \frac{1}{x}+\log (x) \cdot \frac{1}{2 \sqrt{x}} \\ \\ \qquad \qquad \frac{1}{y} \frac{d y}{d x}=\frac{1}{\sqrt{x}}+\log (x) \cdot \frac{1}{2 \sqrt{x}} \\ \ \ \qquad \qquad \frac{d y}{d x}=y \cdot\left(\frac{1}{\sqrt{x}}+\log (\mathrm{x}) \cdot \frac{1}{2 \sqrt{x}}\right) \\ \ \ \qquad \qquad \frac{d y}{d x}=\mathrm{x}^{\sqrt{x}} \cdot\left(\frac{1}{\sqrt{x}}+\log (\mathrm{x}) \cdot \frac{1}{2 \sqrt{x}}\right)

Attention reader! Don’t stop learning now. Join the First-Step-to-DSA Course for Class 9 to 12 students , specifically designed to introduce data structures and algorithms to the class 9 to 12 students

My Personal Notes arrow_drop_up
Recommended Articles
Page :