Tutorials › Calculus I › Common Errors in Logarithmic Differentiation

Exponential and Logarithmic Derivatives · Tutorial 558 of 1495

Common Errors in Logarithmic Differentiation

Learn to check the conditions and every factor in logarithmic differentiation so your derivative is both valid and complete.

Intermediate 10 min read

What You'll Learn

  • State when logarithmic differentiation of a variable power is valid over the real numbers.
  • Differentiate both the exponent and the base contributions in a variable power.
  • Restore the original function after differentiating its logarithm.
  • Recognize why a nonpositive base cannot be logged in real-valued logarithmic differentiation.
  • Check a derivative by differentiating an equivalent exponential expression.

Why Small Errors Change the Derivative

Logarithmic differentiation can turn a complicated product, quotient, or variable power into a manageable sum. Its steps are compact, however, and that makes it easy to drop a term or factor. A correct calculation must account for both the changing base and the changing exponent, and it must return from the logarithm to the original function.

There is also a domain condition: the real natural logarithm is defined only for positive inputs. Taking a logarithm of a base that is zero or negative is not a valid real-valued step, even when the original expression happens to be defined.

Core check: Before using logarithmic differentiation, verify that the quantity being logged is positive on the interval in question. After differentiating the logarithm, multiply by the original function to obtain its derivative.

The Basic Identity and Its Conditions

If \(y=f(x)\) is differentiable and \(f(x)\ne 0\), the chain rule applied to \(\ln|f(x)|\) gives

$$ \frac{d}{dx}\ln|f(x)|=\frac{f'(x)}{f(x)}. $$

When \(f(x)>0\), this can be written as \(\frac{d}{dx}\ln f(x)=f'(x)/f(x)\). The absolute-value version is useful for a nonzero function that may be negative, but it does not make the logarithm of a negative number valid: \(\ln|f(x)|\) logs the positive quantity \(|f(x)|\).

For a variable power \(y=u(x)^{v(x)}\), the usual real-valued logarithmic method requires \(u(x)>0\) on an open interval and differentiable functions \(u\) and \(v\) there. Then \(y>0\), so we may take its logarithm:

$$ \ln y=v(x)\ln u(x). $$

Differentiating both sides and then solving for \(y'\) gives the formula below. Its two terms come from differentiating the exponent and the base, respectively.

Variable-power formula: If \(u(x)>0\) and \(u,v\) are differentiable, then $$ \frac{d}{dx}\bigl(u(x)^{v(x)}\bigr) = u(x)^{v(x)} \left(v'(x)\ln u(x)+v(x)\frac{u'(x)}{u(x)}\right). $$

This is a formula for the derivative of the original power, not just the derivative of its logarithm. The factor \(u(x)^{v(x)}\) is essential.

Why the Variable-Power Formula Works

Here is the full derivation, including the step that is often missed. Because the base is positive, the power can be expressed using the exponential and natural logarithm:

$$ y=u(x)^{v(x)} =\exp\bigl(v(x)\ln u(x)\bigr). $$

Taking the natural logarithm of \(y\) is valid because \(y>0\). By the product rule and chain rule,

$$ \ln y=v(x)\ln u(x), \qquad \frac{y'}{y} =v'(x)\ln u(x)+v(x)\frac{u'(x)}{u(x)}. $$

Multiplying the second equation by \(y\) yields \(y'=y\left(v'\ln u+v\,u'/u\right)\). Substituting \(y=u^v\) proves the stated formula. Thus the derivative has two contributions inside the parentheses, and the original power multiplies their sum.

Worked Example: Keeping the Exponent-Derivative Term

Worked Example: Keeping the Exponent-Derivative Term

Differentiate \(y=x^{2x}\) for \(x>0\), and evaluate the derivative at \(x=2\).

The base is positive on the stated domain. Set \(u(x)=x\) and \(v(x)=2x\), so \(u'(x)=1\) and \(v'(x)=2\). The variable-power formula gives

$$ y'=x^{2x}\left(2\ln x+2x\frac{1}{x}\right) =x^{2x}(2\ln x+2). $$

At \(x=2\), the original function is \(2^{4}=16\), while the quantity in parentheses is \(2\ln 2+2\). Therefore

$$ y'(2)=16(2\ln 2+2)=32(\ln 2+1). $$

Check by writing \(y=\exp(2x\ln x)\). Differentiating this expression gives \(y'=\exp(2x\ln x)(2\ln x+2)\), which is the same result because \(\exp(2x\ln x)=x^{2x}\) for \(x>0\).

Common wrong calculation: Omitting the term involving \(\ln x\), as if the exponent were constant, leaves only the base contribution: $$ y'_{\text{wrong}}=x^{2x}\left(2x\frac1x\right)=2x^{2x}. $$ At \(x=2\), this gives \(32\), not \(32(\ln 2+1)\). The missing term is \(2x^{2x}\ln x\), which comes from differentiating the exponent \(2x\).

Worked Example: Multiplying Back by the Original Function

Worked Example: Multiplying Back by the Original Function

Differentiate \(y=(x+1)^x\) for \(x>-1\), and find \(y'(1)\).

Since \(x+1>0\) on this interval, take logarithms:

$$ \ln y=x\ln(x+1). $$

Differentiate the right side using the product rule:

$$ \frac{y'}{y} =\ln(x+1)+x\frac{1}{x+1}. $$

This equation gives \(y'/y\), not \(y'\). Multiply by \(y=(x+1)^x\):

$$ y'=(x+1)^x\left(\ln(x+1)+\frac{x}{x+1}\right). $$

At \(x=1\), \(y=2^1=2\), and the expression in parentheses is \(\ln 2+\frac12\). Thus

$$ y'(1)=2\left(\ln 2+\frac12\right)=2\ln 2+1. $$

To check, write \(y=\exp\bigl(x\ln(x+1)\bigr)\). Differentiating gives \(y'=\exp\bigl(x\ln(x+1)\bigr)\left(\ln(x+1)+x/(x+1)\right)\). At \(x=1\), this is \(2(\ln 2+1/2)=2\ln2+1\), as above.

Common wrong calculation: Reporting \(y'/y=\ln(x+1)+x/(x+1)\) as the derivative omits the factor \(y\). At \(x=1\), that incorrect answer is \(\ln 2+1/2\), whereas the derivative is \(2\ln 2+1\).

Worked Example: Do Not Log a Nonpositive Base

Worked Example: Do Not Log a Nonpositive Base

Differentiate \(y=(-x)^2\) for \(x>0\). This example is deliberately simple: the original expression is defined even though its displayed base is negative.

The real logarithm of the base \(-x\) is not defined for \(x>0\), so the equation \(\ln y=2\ln(-x)\) is not a valid real equation. Differentiate the original expression using the chain rule instead:

$$ y'=2(-x)(-1)=2x. $$

Check by simplifying first: \((-x)^2=x^2\), and differentiating \(x^2\) also gives \(2x\). For \(x>0\), one may alternatively take the logarithm of the whole positive function: \(y=x^2>0\), so \(\ln y=2\ln x\). Differentiating gives \(y'/y=2/x\), hence \(y'=x^2(2/x)=2x\).

Common wrong calculation: Writing \(\ln((-x)^2)=2\ln(-x)\) applies the logarithm-of-a-power rule to a negative base. The left side is defined, since \((-x)^2>0\), but the right side is not defined as a real expression. The valid logarithmic route logs the positive whole function, or one can differentiate directly.

What to Check Before Accepting a Result

These errors are avoidable if the calculation is checked in a fixed order. For a variable power, make sure each of the following is settled before simplifying:

1
Check the domain.
For the real logarithmic method applied to \(u(x)^{v(x)}\), verify \(u(x)>0\) on the interval being considered.
2
Differentiate both factors in the logarithmic equation.
From \(\ln y=v\ln u\), the product rule produces \(v'\ln u+v\,u'/u\). Neither contribution can be discarded unless it is actually zero.
3
Restore the original function.
The equation after differentiating is \(y'/y=\cdots\). Multiply both sides by \(y=u^v\) to obtain \(y'\).
4
Check the result independently.
Where practical, rewrite the power as \(\exp(v\ln u)\) and differentiate with the chain and product rules. The result should agree.

These checks also distinguish an invalid method from an incomplete calculation. A negative base can define a power when the exponent is a fixed integer, but that does not authorize taking the logarithm of the base. In such a case, use a direct differentiation rule or an equivalent expression whose logarithm is defined. Likewise, if the whole function reaches zero, \(\ln y\) cannot be used at that point; logarithmic differentiation may still work on an interval where \(y>0\), but its conclusion must not be extended through a point where its conditions fail without a separate argument.

Why These Corrections Matter

The logarithmic derivative \(y'/y\) describes a derivative divided by the original function. It is an intermediate quantity, not generally the derivative itself. Missing the original function changes the scale of the answer. Dropping one of the terms in the logarithmic derivative changes how the result responds to variation in either the base or the exponent. Using a logarithm outside its domain makes the reasoning invalid even if later algebra appears plausible.

For any proposed logarithmic differentiation, ask three precise questions: Was every logarithm taken of a positive quantity? Did the product rule differentiate both factors? Was the equation for \(y'/y\) converted back into an equation for \(y'\)? Answering all three correctly catches the most common errors before they spread through a longer calculation.

Check Your Understanding

For each question, identify the condition or step that determines whether the calculation is valid.

  1. For \(y=x^{3x}\) on \(x>0\), write both terms in the logarithmic derivative \(y'/y\). Which term would be lost by treating the exponent as constant?
  2. If logarithmic differentiation gives \(y'/y=5/x\), what additional factor is required to state \(y'\)?
  3. For \(y=(-x)^4\) with \(x>0\), is \(\ln(-x)\) defined as a real number? Give a valid way to differentiate \(y\).
  4. Why must the base \(u(x)\) be positive when deriving the real-valued formula for \(u(x)^{v(x)}\) by taking \(\ln u(x)\)?
  5. Describe one independent check for a derivative obtained by logarithmic differentiation.

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon