Math Lab
Home/Class XII/Ch 5/Logarithmic differentiation

Logarithmic differentiation

When a function is a product of many factors, or has the form uvu^v where both uu and vv depend on xx, taking the natural logarithm before differentiating simplifies the calculation dramatically. The trick: log⁡(uv)=log⁡u+log⁡v\log(uv) = \log u + \log v converts multiplication into addition, and log⁡(uv)=vlog⁡u\log(u^v) = v \log u separates the exponent from the base.

The procedure

To differentiate y=f(x)y = f(x) logarithmically:

  1. Take log⁡\log of both sides: log⁡y=log⁡f(x)\log y = \log f(x).
  2. Differentiate using implicit differentiation: 1ydydx=ddx[log⁡f(x)]\dfrac{1}{y}\dfrac{dy}{dx} = \dfrac{d}{dx}[\log f(x)].
  3. Solve: dydx=y⋅ddx[log⁡f(x)]=f(x)⋅ddx[log⁡f(x)]\dfrac{dy}{dx} = y \cdot \dfrac{d}{dx}[\log f(x)] = f(x) \cdot \dfrac{d}{dx}[\log f(x)].

When to use it

The technique is essential when:

  • The function is f(x)g(x)f(x)^{g(x)} , neither pure power rule nor pure exponential applies.
  • The function is a long product/quotient: log⁡\log turns the product into a sum.

Worked example: xxx^x

Let y=xxy = x^x. Take log⁡\log: log⁡y=xlog⁡x\log y = x \log x. Differentiate: 1ydydx=log⁡x+1\dfrac{1}{y} \dfrac{dy}{dx} = \log x + 1. So dydx=xx(log⁡x+1)\dfrac{dy}{dx} = x^x (\log x + 1).

(sin⁡x)cos⁡x(\sin x)^{\cos x}

log⁡y=cos⁡x⋅log⁡(sin⁡x)\log y = \cos x \cdot \log(\sin x). Differentiate: 1ydydx=−sin⁡x⋅log⁡(sin⁡x)+cos⁡x⋅cos⁡xsin⁡x=−sin⁡xlog⁡(sin⁡x)+cot⁡xcos⁡x\dfrac{1}{y}\dfrac{dy}{dx} = -\sin x \cdot \log(\sin x) + \cos x \cdot \dfrac{\cos x}{\sin x} = -\sin x \log(\sin x) + \cot x \cos x.

So dydx=(sin⁡x)cos⁡x[−sin⁡xlog⁡(sin⁡x)+cot⁡xcos⁡x]\dfrac{dy}{dx} = (\sin x)^{\cos x}\big[-\sin x \log(\sin x) + \cot x \cos x\big].

A product example

Differentiate y=(x+1)2(2x−1)3(x2+1)4y = \dfrac{(x + 1)^2 (2x - 1)^3}{(x^2 + 1)^4}.

log⁡y=2log⁡(x+1)+3log⁡(2x−1)−4log⁡(x2+1)\log y = 2 \log(x + 1) + 3 \log(2x - 1) - 4 \log(x^2 + 1).

Differentiate: 1ydydx=2x+1+62x−1−8xx2+1\dfrac{1}{y}\dfrac{dy}{dx} = \dfrac{2}{x + 1} + \dfrac{6}{2x - 1} - \dfrac{8x}{x^2 + 1}.

So dydx=y[2x+1+62x−1−8xx2+1]\dfrac{dy}{dx} = y\left[\dfrac{2}{x + 1} + \dfrac{6}{2x - 1} - \dfrac{8x}{x^2 + 1}\right], with yy as given.

Worked examples

Example 1. Differentiate y=xsin⁡xy = x^{\sin x}.

log⁡y=sin⁡xlog⁡x\log y = \sin x \log x. 1ydydx=cos⁡xlog⁡x+sin⁡xx\dfrac{1}{y}\dfrac{dy}{dx} = \cos x \log x + \dfrac{\sin x}{x}. So dydx=xsin⁡x(cos⁡xlog⁡x+sin⁡xx)\dfrac{dy}{dx} = x^{\sin x}\left(\cos x \log x + \dfrac{\sin x}{x}\right).

Example 2. Differentiate y=(log⁡x)xy = (\log x)^x.

log⁡y=xlog⁡(log⁡x)\log y = x \log(\log x). 1ydydx=log⁡(log⁡x)+x⋅1/xlog⁡x=log⁡(log⁡x)+1log⁡x\dfrac{1}{y}\dfrac{dy}{dx} = \log(\log x) + x \cdot \dfrac{1/x}{\log x} = \log(\log x) + \dfrac{1}{\log x}. So dydx=(log⁡x)x[log⁡(log⁡x)+1log⁡x]\dfrac{dy}{dx} = (\log x)^x\left[\log(\log x) + \dfrac{1}{\log x}\right].

Example 3. If yx=xyy^x = x^y, find dydx\dfrac{dy}{dx}.

Take log⁡\log: xlog⁡y=ylog⁡xx \log y = y \log x. Differentiate: log⁡y+xydydx=dydxlog⁡x+yx\log y + \dfrac{x}{y}\dfrac{dy}{dx} = \dfrac{dy}{dx}\log x + \dfrac{y}{x}. Solve: dydx(xy−log⁡x)=yx−log⁡y\dfrac{dy}{dx}\left(\dfrac{x}{y} - \log x\right) = \dfrac{y}{x} - \log y. So dydx=y(y−xlog⁡y)x(x−ylog⁡x)\dfrac{dy}{dx} = \dfrac{y(y - x \log y)}{x(x - y \log x)} after multiplying through.

Example 4. Differentiate y=xx+x1/xy = x^x + x^{1/x}.

Each term needs logarithmic differentiation.

u=xxu = x^x: dudx=xx(log⁡x+1)\dfrac{du}{dx} = x^x(\log x + 1).

v=x1/xv = x^{1/x}: log⁡v=log⁡xx\log v = \dfrac{\log x}{x}. 1vdvdx=1−log⁡xx2\dfrac{1}{v}\dfrac{dv}{dx} = \dfrac{1 - \log x}{x^2}. So dvdx=x1/x⋅1−log⁡xx2\dfrac{dv}{dx} = x^{1/x} \cdot \dfrac{1 - \log x}{x^2}.

dydx=xx(log⁡x+1)+x1/x⋅1−log⁡xx2\dfrac{dy}{dx} = x^x(\log x + 1) + x^{1/x} \cdot \dfrac{1 - \log x}{x^2}.

Example 5. Differentiate y=(x−1)(x−2)(x−3)(x−4)y = \sqrt{\dfrac{(x - 1)(x - 2)}{(x - 3)(x - 4)}}.

log⁡y=12[log⁡(x−1)+log⁡(x−2)−log⁡(x−3)−log⁡(x−4)]\log y = \tfrac{1}{2}[\log(x - 1) + \log(x - 2) - \log(x - 3) - \log(x - 4)].

1ydydx=12[1x−1+1x−2−1x−3−1x−4]\dfrac{1}{y}\dfrac{dy}{dx} = \tfrac{1}{2}\left[\dfrac{1}{x - 1} + \dfrac{1}{x - 2} - \dfrac{1}{x - 3} - \dfrac{1}{x - 4}\right].

So dydx=y2[1x−1+1x−2−1x−3−1x−4]\dfrac{dy}{dx} = \dfrac{y}{2}\left[\dfrac{1}{x - 1} + \dfrac{1}{x - 2} - \dfrac{1}{x - 3} - \dfrac{1}{x - 4}\right].

Example 6. Differentiate y=xxxy = x^{x^x}.

y=xuy = x^{u} where u=xxu = x^x. log⁡y=ulog⁡x=xxlog⁡x\log y = u \log x = x^x \log x.

1ydydx=ddx(xxlog⁡x)=(xx(log⁡x+1))log⁡x+xx⋅1x=xx[(log⁡x)2+log⁡x+1/x]\dfrac{1}{y}\dfrac{dy}{dx} = \dfrac{d}{dx}(x^x \log x) = (x^x(\log x + 1)) \log x + x^x \cdot \dfrac{1}{x} = x^x[(\log x)^2 + \log x + 1/x].

So dydx=xxx⋅xx[(log⁡x)2+log⁡x+1x]\dfrac{dy}{dx} = x^{x^x} \cdot x^x \left[(\log x)^2 + \log x + \dfrac{1}{x}\right].

Try it yourself

  1. Differentiate y=xxy = x^x.
  2. Differentiate y=(x2+1)xy = (x^2 + 1)^x.
  3. Differentiate y=xsin⁡xy = x^{\sin x}.
  4. Differentiate y=(2x+1)3(3x−1)2(x+2)y = \dfrac{(2x + 1)^3}{(3x - 1)^2 (x + 2)} using log differentiation.
  5. If y=(1+x)(1+x2)(1+x4)y = (1 + x)(1 + x^2)(1 + x^4), differentiate using logs.
  6. Differentiate y=xxxy = \sqrt{x \sqrt{x \sqrt{x}}}.
  7. Differentiate y=xxxy = x^{x^x}.
  8. Differentiate y=(sin⁡x)xy = (\sin x)^x.
  9. Differentiate y=(sin⁡x)sin⁡xy = (\sin x)^{\sin x}.
  10. Differentiate y=xlog⁡xy = x^{\log x}.
  11. Differentiate y=(log⁡x)sin⁡xy = (\log x)^{\sin x}.
  12. If xy⋅yx=(x+y)x+yx^y \cdot y^x = (x + y)^{x + y}, set up the log derivative (do not solve).
  13. Differentiate y=(1+tan⁡x)xy = (1 + \tan x)^x.
  14. Differentiate y=e2x(x−1)2xx+1y = \dfrac{e^{2x}(x - 1)^2}{x \sqrt{x + 1}} using logs.

Pitfalls / Tricks

  • log⁡\log of a product becomes a sum , that is the whole point of log differentiation.
  • Always restate the original yy when writing the final dy/dxdy/dx.
  • For functions like xxx^x where both base and exponent depend on xx, neither plain power rule nor plain exponential rule works. Log first.
  • For products of more than three factors, log differentiation saves enormous time.
  • Watch for domain issues: log⁡f(x)\log f(x) requires f(x)>0f(x) > 0.

Next, parametric and higher-order derivatives.

Test Your Knowledge

Quick MCQ check on this chapter

Start Quiz →

AI Summary

Summarize this page in your favorite LLM