Search

Logarithmic differentiation

Use logarithms to turn products into sums and bring changing exponents down where you can differentiate them.

The idea

Products, quotients, and powers can become easier to differentiate after taking a logarithm. This is especially useful when both the base and the exponent depend on the input, as in \(x^x\).

The method combines logarithm laws with implicit differentiation.

Worked examples

Example 1

A changing base and exponent

Let \(y=x^x\) for \(x>0\). The usual power rule assumes a constant exponent, so it does not apply directly. Instead,

\[\ln y=x\ln x.\]

Differentiate the product on the right:

\[\frac{y^{\prime}}y=\ln x+x\frac1x=\ln x+1.\]

Now multiply by \(y=x^x\):

\[y^{\prime}=x^x(\ln x+1).\]

Example 2

A product, a root, and a quotient

For \(x>1\), let

\[y=\frac{x^2\sqrt{x-1}}{(x+2)^3}.\]

All factors are positive on this interval, so

\[\ln y=2\ln x+\frac12\ln(x-1)-3\ln(x+2).\]

Differentiate each term, including its inner derivative:

\[\frac{y^{\prime}}y=\frac2x+\frac1{2(x-1)}-\frac3{x+2}.\]

Thus

\[y^{\prime}=\frac{x^2\sqrt{x-1}}{(x+2)^3}\left(\frac2x+\frac1{2(x-1)}-\frac3{x+2}\right).\]

The factored answer keeps the original function visible and avoids expanding a large numerator.

Example 3

A variable power with an inner function

For \(x>-1\), let \(y=(1+x)^{\sin x}\). The base is positive, so

\[\ln y=\sin(x)\cdot\ln(1+x).\]

Apply the product rule and chain rule:

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

Multiply by the original function:

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

Both changing parts contribute: one term comes from the exponent, and one from the base.

Quiz

Calculus for Engineers and Scientists

Find a post, puzzle, or idea.