Derivatives: rules and functions

Logarithmic differentiation

In logarithmic differentiation you take the natural logarithm of both sides, differentiate, and use (log⁡y)′=y′y(\log y)'=\frac{y'}{y} to find y′y'.

(log⁡y)′=y′y(\log y)'=\frac{y'}{y}

In y=xxy=x^x (x>0)(x>0), xx appears in both the base and the exponent, so neither the formula for (xn)′(x^n)' nor the one for (ax)′(a^x)' applies directly. Take the logarithm of both sides instead (log⁡e\log_e in the examples is the natural logarithm log⁡\log).

log⁡y=xlog⁡x → y′y=log⁡x+1 → y′=xx(log⁡x+1)\begin{gathered} \log y=x\log x\ \to\ \frac{y'}{y} \\[4pt] =\log x+1\ \to\ y' \\[4pt] =x^x(\log x+1) \end{gathered}

By the chain rule, the left side log⁡y\log y differentiates to y′y\frac{y'}{y}. Finally, multiply both sides by yy and substitute the original expression for yy.

Examples

  1. 01What is y'?y′y=log⁡ex+1\displaystyle \frac{y'}{y} = \log_e x + 1AnswerHide
    Answery(log⁡ex+1)\displaystyle y(\log_e x + 1)

    Steps

    1. Just multiply both sides by yy
    2. That yy is the original function; at the end you write it back, as in y=xxy=x^{x}
  2. 02Which one has xx in both the base and the exponent, so the formulas cannot be applied directly?\displaystyle Ay=ex\displaystyle y=e^{x}By=2x\displaystyle y=2^{x}Cy=x2\displaystyle y=x^{2}Dy=xx\displaystyle y=x^{x}AnswerHide
    Answery=xx\displaystyle y=x^{x}

    Steps

    1. Only y=xxy=x^{x}: with xx as both base and exponent, neither the power rule (xnx^{n}) nor the exponential rule (axa^{x}) fits
    2. exe^{x} and 2x2^{x} have constant bases, so the exponential rule handles them; x2x^{2} has a constant exponent, so the power rule does
  3. 03For a function y=f(x) that takes positive values, we took the logarithm of both sides and differentiated. What is □?(log⁡ey)′=□\displaystyle (\log_e y)' = \squareAnswerHide
    Answery′y\displaystyle \frac{y'}{y}

    Steps

    1. log⁡ey\log_e y is a composition through yy: the outer log⁡\log differentiates to 1y\frac{1}{y} and the inner yy to y′y'
    2. Multiplying gives y′y\frac{y'}{y}; the y′y' appears because yy depends on xx
  4. 04What is the derivative of the right-hand side?log⁡ey=xlog⁡ex\displaystyle \log_e y = x\log_e xAnswerHide
    Answerlog⁡ex+1\displaystyle \log_e x + 1

    Steps

    1. Product rule: xx differentiates to 1 and log⁡ex\log_e x to 1x\frac{1}{x}
    2. 1⋅log⁡ex+x⋅1x\displaystyle 1 \cdot \log_e x + x \cdot \frac{1}{x}=log⁡ex+1\displaystyle = \log_e x + 1
    3. In the second term the xx cancels to 1; that is where the +1+1 comes from
  5. 05Taking the logarithm of both sides, what is log⁡ey\log_e y?y=x3x\displaystyle y=x^{3x}AnswerHide
    Answer3xlog⁡ex\displaystyle 3x\log_e x

    Steps

    1. An exponent comes down in front of the log⁡\log: log⁡ex3x=3xlog⁡ex\log_e x^{3x} = 3x\log_e x
    2. It does not become a sum: x3xx^{3x} is 3x3x copies of xx multiplied, so its log⁡\log is 3x3x times as big
  6. 06Taking the logarithm of both sides, what is log⁡ey\log_e y?y=xx\displaystyle y=x^{x}AnswerHide
    Answerxlog⁡ex\displaystyle x\log_e x

    Steps

    1. An exponent comes down in front of the log⁡\log: log⁡exx=xlog⁡ex\log_e x^{x} = x\log_e x
    2. It does not become a sum: xxx^{x} is xx copies of xx multiplied, so its log⁡\log is xx times as big

FAQ

Q1What should I watch for when taking logarithms?AnswerHide
A
The argument must be positive. y=xxy=x^x is considered for x>0x>0, so y>0y>0 and you can take log⁡y\log y directly. For a function that can take negative values, take log⁡∣y∣\log|y|.
Q2Can I stop at y′y=log⁡x+1\frac{y'}{y}=\log x+1?AnswerHide
A
Not yet. Multiply both sides by yy to get y′=y(log⁡x+1)y'=y(\log x+1), then substitute y=xxy=x^x to finish with y′=xx(log⁡x+1)y'=x^x(\log x+1).

Published 2026-10-14 · Updated 2026-10-14