Logarithmic differentiation finds derivatives by taking ln\ln of both sides first, then differentiating implicitly. It is the standard route for functions with a variable exponent, like xxx^x, and for products or quotients that would be messy to expand term by term.

When to use it

Reach for logarithmic differentiation when at least one of these is true:

  1. The function is a variable power, such as xxx^x or (x2+1)x(x^2+1)^x.
  2. The function is a long product or quotient that repeated product and quotient rules would make tedious.
  3. Taking logs makes the structure easier to read before differentiating.

If you searched for how to differentiate xxx^x, this is the method — the ordinary power rule d(xn)/dx=nxn1d(x^n)/dx = nx^{n-1} does not apply because it assumes a constant exponent. For real-valued calculus the domain matters: the log step needs the expression inside the logarithm to be positive on the interval you are using. Many textbook examples are chosen so this already holds.

The procedure, step by step

  1. Set up the function. Write y=f(x)y = f(x) as the thing to differentiate.
  2. Take the natural log of both sides: lny=ln(f(x))\ln y = \ln(f(x)).
  3. Apply log rules to simplify before differentiating:
    • ln(ab)=lna+lnb\ln(ab) = \ln a + \ln b
    • ln(a/b)=lnalnb\ln(a/b) = \ln a - \ln b
    • ln(ar)=rlna\ln(a^r) = r \ln a
  4. Differentiate both sides. Remember the left side gives yy\frac{y'}{y}, not just yy'.
  5. Solve for yy' by multiplying both sides by yy, then replace yy with the original expression.

The third rule is the key one: it drops an exponent down into a factor, which is usually far easier to differentiate.

Why the method helps

Without logs, xxx^x fits no standard rule, because the power rule needs a constant exponent. After taking logs, the exponent becomes part of the product xlnxx \ln x, and ordinary differentiation rules apply again. That is the whole idea: logarithms reorganize the expression into a form your existing tools can handle.

Full worked example: differentiate y=xxy = x^x

Assume x>0x > 0, since lnx\ln x is only defined for positive xx in real-valued calculus. Start with

y=xxy = x^x

Take the natural log of both sides:

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

Apply the power rule for logs:

lny=xlnx\ln y = x \ln x

Differentiate both sides with respect to xx:

yy=ddx(xlnx)\frac{y'}{y} = \frac{d}{dx}(x \ln x)

The right side needs the product rule:

ddx(xlnx)=lnx+1\frac{d}{dx}(x \ln x) = \ln x + 1

so

yy=lnx+1\frac{y'}{y} = \ln x + 1

Multiply both sides by yy:

y=y(lnx+1)y' = y(\ln x + 1)

Replace yy with the original function:

y=xx(lnx+1)y' = x^x(\ln x + 1)

So for x>0x > 0,

ddx(xx)=xx(lnx+1)\frac{d}{dx}(x^x) = x^x(\ln x + 1)

Where each step traps people, plus a self-check

The setup and log step trap people who skip the domain check — for real-valued work, ln\ln needs a positive input. The differentiation step traps those who forget that ddx(lny)=yy\frac{d}{dx}(\ln y) = \frac{y'}{y}, not yy', and those who mis-differentiate xlnxx \ln x by missing the product rule. The final step traps anyone who stops at yy=lnx+1\frac{y'}{y} = \ln x + 1 and forgets to multiply by yy. And sometimes the trap is using this method at all when a simpler rule would be faster.

For your own pass, try

y=(x2+1)xy = (x^2 + 1)^x

The base x2+1x^2 + 1 stays positive for every real xx, so the log step is valid everywhere. If you can turn lny\ln y into xln(x2+1)x \ln(x^2 + 1) and differentiate that cleanly, the method has clicked. You will keep meeting it whenever expressions mix powers, products, and quotients in ways ordinary rules make messy, and it often tidies a formula before optimization or related-rates work.

Frequently Asked Questions

When is logarithmic differentiation useful?
It is most useful when a function is a product, quotient, or variable power that becomes simpler after taking logarithms, such as $x^x$ or $(x^2+1)^x$.
Do I always take $\ln$ of both sides?
In standard calculus examples, yes. The key advantage is that $\ln$ turns powers into factors and products into sums, but the logarithm step must be valid on the domain you are using.

Need help with a problem?

Upload your question and get a verified, step-by-step solution in seconds.

Open GPAI Solver →