Logarithmic Differentiation (Technique)

Using logarithms to simplify difficult differentiation problems

🎯 Logarithmic Differentiation (Advanced Technique)

What is Logarithmic Differentiation?

Logarithmic differentiation is a powerful technique that uses properties of logarithms to make complicated derivatives much easier!

When to Use This Technique

Use logarithmic differentiation when you have:

  1. Products of many functions: (x+1)(x+2)(x+3)(x+1)(x+2)(x+3)
  2. Quotients with complicated parts: x(x+1)3(x2)4\frac{\sqrt{x}(x+1)^3}{(x-2)^4}
  3. Variable in both base and exponent: xxx^x, (x2)sinx(x^2)^{\sin x}, xlnxx^{\ln x}
  4. Messy combinations: Functions that would require Product Rule, Quotient Rule, and Chain Rule all at once

💡 Key Idea: Take ln of both sides, simplify using log properties, then differentiate!


The General Process

Step-by-Step Method

  1. Take ln of both sides: lny=ln[f(x)]\ln y = \ln[f(x)]
  2. Simplify using log properties:
    • ln(ab)=lna+lnb\ln(ab) = \ln a + \ln b
    • ln(ab)=lnalnb\ln\left(\frac{a}{b}\right) = \ln a - \ln b
    • ln(an)=nlna\ln(a^n) = n\ln a
  3. Differentiate implicitly with respect to xx
  4. Solve for dydx\frac{dy}{dx}: Multiply both sides by yy
  5. Substitute back: Replace yy with the original function

Example 1: Variable Base and Exponent

Find dydx\frac{dy}{dx} if y=xxy = x^x

This is impossible with our usual rules! But logarithmic differentiation makes it easy.


Step 1: Take ln of both sides

lny=ln(xx)\ln y = \ln(x^x)


Step 2: Use log property ln(an)=nlna\ln(a^n) = n\ln a

lny=xlnx\ln y = x\ln x


Step 3: Differentiate both sides implicitly

Left side: ddx[lny]=1ydydx\frac{d}{dx}[\ln y] = \frac{1}{y}\frac{dy}{dx}

Right side (Product Rule): ddx[xlnx]=(1)lnx+x1x=lnx+1\frac{d}{dx}[x\ln x] = (1)\ln x + x\cdot\frac{1}{x} = \ln x + 1

So: 1ydydx=lnx+1\frac{1}{y}\frac{dy}{dx} = \ln x + 1


Step 4: Solve for dydx\frac{dy}{dx}

dydx=y(lnx+1)\frac{dy}{dx} = y(\ln x + 1)


Step 5: Substitute y=xxy = x^x

dydx=xx(lnx+1)\frac{dy}{dx} = x^x(\ln x + 1)

Answer: dydx=xx(lnx+1)\frac{dy}{dx} = x^x(\ln x + 1)


Example 2: Complicated Products and Quotients

Find dydx\frac{dy}{dx} if y=x3x+1(2x1)4y = \frac{x^3\sqrt{x+1}}{(2x-1)^4}

Without logarithmic differentiation, this would require Quotient Rule, Product Rule, and Chain Rule!


Step 1: Take ln of both sides

lny=ln[x3x+1(2x1)4]\ln y = \ln\left[\frac{x^3\sqrt{x+1}}{(2x-1)^4}\right]


Step 2: Simplify using log properties

lny=ln(x3)+lnx+1ln[(2x1)4]\ln y = \ln(x^3) + \ln\sqrt{x+1} - \ln[(2x-1)^4]

lny=3lnx+12ln(x+1)4ln(2x1)\ln y = 3\ln x + \frac{1}{2}\ln(x+1) - 4\ln(2x-1)

Now it's just a sum/difference instead of a messy quotient!


Step 3: Differentiate both sides

1ydydx=31x+121x+1422x1\frac{1}{y}\frac{dy}{dx} = 3\cdot\frac{1}{x} + \frac{1}{2}\cdot\frac{1}{x+1} - 4\cdot\frac{2}{2x-1}

1ydydx=3x+12(x+1)82x1\frac{1}{y}\frac{dy}{dx} = \frac{3}{x} + \frac{1}{2(x+1)} - \frac{8}{2x-1}


Step 4: Multiply by yy

dydx=y[3x+12(x+1)82x1]\frac{dy}{dx} = y\left[\frac{3}{x} + \frac{1}{2(x+1)} - \frac{8}{2x-1}\right]


Step 5: Substitute original function

dydx=x3x+1(2x1)4[3x+12(x+1)82x1]\frac{dy}{dx} = \frac{x^3\sqrt{x+1}}{(2x-1)^4}\left[\frac{3}{x} + \frac{1}{2(x+1)} - \frac{8}{2x-1}\right]

Answer: dydx=x3x+1(2x1)4[3x+12(x+1)82x1]\displaystyle\frac{dy}{dx} = \frac{x^3\sqrt{x+1}}{(2x-1)^4}\left[\frac{3}{x} + \frac{1}{2(x+1)} - \frac{8}{2x-1}\right]

💡 Note: This is much easier than using Quotient Rule + Product Rule!


Why It Works

Logarithmic differentiation works because:

  1. Log properties turn products into sums and quotients into differences
  2. Sums and differences are much easier to differentiate than products and quotients
  3. The Chain Rule for lny\ln y gives us 1ydydx\frac{1}{y}\frac{dy}{dx}, which we can solve

It's essentially using algebra to simplify before calculus!


Common Patterns

Pattern 1: Variable Exponent Only

y=af(x)y = a^{f(x)} where aa is constant

Example: y=3x2y = 3^{x^2}

lny=ln(3x2)=x2ln3\ln y = \ln(3^{x^2}) = x^2\ln 3

1ydydx=2xln3\frac{1}{y}\frac{dy}{dx} = 2x\ln 3

dydx=2x(ln3)3x2\frac{dy}{dx} = 2x(\ln 3) \cdot 3^{x^2}

Pattern 2: Variable Base Only

y=[g(x)]ny = [g(x)]^n where nn is constant

Example: y=(x2+1)10y = (x^2 + 1)^{10}

This can also be done with Chain Rule, but log differentiation works:

lny=10ln(x2+1)\ln y = 10\ln(x^2 + 1)

1ydydx=102xx2+1\frac{1}{y}\frac{dy}{dx} = 10 \cdot \frac{2x}{x^2+1}

dydx=20xx2+1(x2+1)10=20x(x2+1)9\frac{dy}{dx} = \frac{20x}{x^2+1} \cdot (x^2+1)^{10} = 20x(x^2+1)^9

Pattern 3: Both Variable

y=[g(x)]h(x)y = [g(x)]^{h(x)}

Example: y=(sinx)xy = (\sin x)^x

lny=xln(sinx)\ln y = x\ln(\sin x)

1ydydx=ln(sinx)+xcosxsinx\frac{1}{y}\frac{dy}{dx} = \ln(\sin x) + x\cdot\frac{\cos x}{\sin x}

dydx=(sinx)x[ln(sinx)+xcotx]\frac{dy}{dx} = (\sin x)^x[\ln(\sin x) + x\cot x]


Advantages Over Other Methods

Product Rule vs. Logarithmic Differentiation

Product of 3 functions: (x+1)(x+2)(x+3)(x+1)(x+2)(x+3)

Product Rule (messy!):

  • Takes 3 applications
  • Many terms to combine

Logarithmic Differentiation (clean!): lny=ln(x+1)+ln(x+2)+ln(x+3)\ln y = \ln(x+1) + \ln(x+2) + \ln(x+3) 1ydydx=1x+1+1x+2+1x+3\frac{1}{y}\frac{dy}{dx} = \frac{1}{x+1} + \frac{1}{x+2} + \frac{1}{x+3}

Much simpler! ✓


⚠️ Common Mistakes

Mistake 1: Forgetting to Multiply by y

After differentiating, you have 1ydydx=...\frac{1}{y}\frac{dy}{dx} = ...

Don't forget to multiply both sides by yy!

Mistake 2: Wrong Log Properties

ln(x+y)=lnx+lny\ln(x + y) = \ln x + \ln y (WRONG!) ✅ ln(xy)=lnx+lny\ln(xy) = \ln x + \ln y (multiplication becomes addition)

Mistake 3: Not Substituting Back

After solving for dydx\frac{dy}{dx}, remember to substitute the original expression for yy!

Mistake 4: Domain Issues

lnx\ln x is only defined for x>0x > 0. If needed, use lnx\ln|x| for all x0x \neq 0.


When NOT to Use Logarithmic Differentiation

Don't use it for simple functions where standard rules work fine:

  • Simple powers: x5x^5 — just use Power Rule
  • Simple products: xsinxx\sin x — just use Product Rule
  • Exponential base ee: e3xe^{3x} — just use Chain Rule

Use logarithmic differentiation for complicated expressions where it genuinely simplifies your work!


Special Case: Products of Many Terms

For y=f1(x)f2(x)f3(x)fn(x)y = f_1(x) \cdot f_2(x) \cdot f_3(x) \cdots f_n(x):

lny=lnf1+lnf2+lnf3++lnfn\ln y = \ln f_1 + \ln f_2 + \ln f_3 + \cdots + \ln f_n

1ydydx=f1f1+f2f2+f3f3++fnfn\frac{1}{y}\frac{dy}{dx} = \frac{f_1'}{f_1} + \frac{f_2'}{f_2} + \frac{f_3'}{f_3} + \cdots + \frac{f_n'}{f_n}

dydx=y[f1f1+f2f2++fnfn]\frac{dy}{dx} = y\left[\frac{f_1'}{f_1} + \frac{f_2'}{f_2} + \cdots + \frac{f_n'}{f_n}\right]

💡 Formula: Each factor contributes derivative of factorfactor\frac{\text{derivative of factor}}{\text{factor}}


📝 Practice Strategy

  1. Recognize when logarithmic differentiation will help (products, quotients, variable exponents)
  2. Take ln of both sides
  3. Simplify thoroughly using all log properties before differentiating
  4. Differentiate implicitly (left side gives 1ydydx\frac{1}{y}\frac{dy}{dx})
  5. Multiply by yy to isolate dydx\frac{dy}{dx}
  6. Substitute the original expression for yy
  7. Simplify if possible (but complicated answers are okay!)

📚 Practice Problems

1Problem 1hard

Question:

Use logarithmic differentiation to find dydx\frac{dy}{dx} if y=xsinxy = x^{\sin x}.

💡 Show Solution

Step 1: Take ln of both sides

lny=ln(xsinx)\ln y = \ln(x^{\sin x})


Step 2: Use log property ln(an)=nlna\ln(a^n) = n\ln a

lny=sinxlnx\ln y = \sin x \cdot \ln x


Step 3: Differentiate both sides

Left side: ddx[lny]=1ydydx\frac{d}{dx}[\ln y] = \frac{1}{y}\frac{dy}{dx}

Right side (Product Rule): ddx[sinxlnx]=(cosx)(lnx)+(sinx)(1x)\frac{d}{dx}[\sin x \cdot \ln x] = (\cos x)(\ln x) + (\sin x)\left(\frac{1}{x}\right)

=cosxlnx+sinxx= \cos x \ln x + \frac{\sin x}{x}


Step 4: Set them equal

1ydydx=cosxlnx+sinxx\frac{1}{y}\frac{dy}{dx} = \cos x \ln x + \frac{\sin x}{x}


Step 5: Multiply by yy

dydx=y(cosxlnx+sinxx)\frac{dy}{dx} = y\left(\cos x \ln x + \frac{\sin x}{x}\right)


Step 6: Substitute y=xsinxy = x^{\sin x}

dydx=xsinx(cosxlnx+sinxx)\frac{dy}{dx} = x^{\sin x}\left(\cos x \ln x + \frac{\sin x}{x}\right)

Answer: dydx=xsinx(cosxlnx+sinxx)\displaystyle\frac{dy}{dx} = x^{\sin x}\left(\cos x \ln x + \frac{\sin x}{x}\right)

2Problem 2expert

Question:

Find dydx\frac{dy}{dx} if y=(x2+1)3x1(3x+2)5y = \frac{(x^2+1)^3\sqrt{x-1}}{(3x+2)^5}.

💡 Show Solution

Step 1: Take ln of both sides

lny=ln[(x2+1)3x1(3x+2)5]\ln y = \ln\left[\frac{(x^2+1)^3\sqrt{x-1}}{(3x+2)^5}\right]


Step 2: Simplify using log properties

lny=ln[(x2+1)3]+lnx1ln[(3x+2)5]\ln y = \ln[(x^2+1)^3] + \ln\sqrt{x-1} - \ln[(3x+2)^5]

lny=3ln(x2+1)+12ln(x1)5ln(3x+2)\ln y = 3\ln(x^2+1) + \frac{1}{2}\ln(x-1) - 5\ln(3x+2)


Step 3: Differentiate both sides

1ydydx=32xx2+1+121x1533x+2\frac{1}{y}\frac{dy}{dx} = 3\cdot\frac{2x}{x^2+1} + \frac{1}{2}\cdot\frac{1}{x-1} - 5\cdot\frac{3}{3x+2}

1ydydx=6xx2+1+12(x1)153x+2\frac{1}{y}\frac{dy}{dx} = \frac{6x}{x^2+1} + \frac{1}{2(x-1)} - \frac{15}{3x+2}


Step 4: Multiply by yy

dydx=y[6xx2+1+12(x1)153x+2]\frac{dy}{dx} = y\left[\frac{6x}{x^2+1} + \frac{1}{2(x-1)} - \frac{15}{3x+2}\right]


Step 5: Substitute the original function

dydx=(x2+1)3x1(3x+2)5[6xx2+1+12(x1)153x+2]\frac{dy}{dx} = \frac{(x^2+1)^3\sqrt{x-1}}{(3x+2)^5}\left[\frac{6x}{x^2+1} + \frac{1}{2(x-1)} - \frac{15}{3x+2}\right]

Answer: dydx=(x2+1)3x1(3x+2)5[6xx2+1+12(x1)153x+2]\displaystyle\frac{dy}{dx} = \frac{(x^2+1)^3\sqrt{x-1}}{(3x+2)^5}\left[\frac{6x}{x^2+1} + \frac{1}{2(x-1)} - \frac{15}{3x+2}\right]

Note: This would be extremely difficult using Quotient Rule and Product Rule!

3Problem 3hard

Question:

Use logarithmic differentiation to find dydx\frac{dy}{dx} if y=(x+1)(x+2)(x+3)(x+4)y = (x+1)(x+2)(x+3)(x+4).

💡 Show Solution

Step 1: Take ln of both sides

lny=ln[(x+1)(x+2)(x+3)(x+4)]\ln y = \ln[(x+1)(x+2)(x+3)(x+4)]


Step 2: Use log property ln(ab)=lna+lnb\ln(ab) = \ln a + \ln b

lny=ln(x+1)+ln(x+2)+ln(x+3)+ln(x+4)\ln y = \ln(x+1) + \ln(x+2) + \ln(x+3) + \ln(x+4)


Step 3: Differentiate both sides

1ydydx=1x+1+1x+2+1x+3+1x+4\frac{1}{y}\frac{dy}{dx} = \frac{1}{x+1} + \frac{1}{x+2} + \frac{1}{x+3} + \frac{1}{x+4}


Step 4: Multiply by yy

dydx=y[1x+1+1x+2+1x+3+1x+4]\frac{dy}{dx} = y\left[\frac{1}{x+1} + \frac{1}{x+2} + \frac{1}{x+3} + \frac{1}{x+4}\right]


Step 5: Substitute y=(x+1)(x+2)(x+3)(x+4)y = (x+1)(x+2)(x+3)(x+4)

dydx=(x+1)(x+2)(x+3)(x+4)[1x+1+1x+2+1x+3+1x+4]\frac{dy}{dx} = (x+1)(x+2)(x+3)(x+4)\left[\frac{1}{x+1} + \frac{1}{x+2} + \frac{1}{x+3} + \frac{1}{x+4}\right]


Optional: Simplify by distributing

Each term in the bracket cancels one factor:

dydx=(x+2)(x+3)(x+4)+(x+1)(x+3)(x+4)+(x+1)(x+2)(x+4)+(x+1)(x+2)(x+3)\frac{dy}{dx} = (x+2)(x+3)(x+4) + (x+1)(x+3)(x+4) + (x+1)(x+2)(x+4) + (x+1)(x+2)(x+3)

Answer: dydx=(x+1)(x+2)(x+3)(x+4)[1x+1+1x+2+1x+3+1x+4]\displaystyle\frac{dy}{dx} = (x+1)(x+2)(x+3)(x+4)\left[\frac{1}{x+1} + \frac{1}{x+2} + \frac{1}{x+3} + \frac{1}{x+4}\right]

Compare: Using the Product Rule directly would require 3 applications and be much messier!