Why Take Logarithms of a Quotient?
A quotient can combine two sources of complexity: the numerator and denominator may each have a base that varies with \(x\), and an exponent that varies with \(x\). Differentiating each variable power separately and then using the quotient rule is possible, but it can produce long expressions.
Taking the natural logarithm turns a quotient into a difference. Each variable power then becomes a product of its exponent and the logarithm of its base. This makes the contributions from the numerator and denominator easier to organize—and makes the minus sign from the denominator explicit.
The Formula and Its Conditions
Suppose \(u\), \(v\), \(a\), and \(b\) are differentiable functions on an open interval, with \(u(x)>0\) and \(a(x)>0\) throughout that interval. Define
The positive-base conditions ensure that the real-valued powers and their logarithms are defined. Since both powers are positive, the denominator is nonzero and \(y(x)>0\). We can therefore take its natural logarithm.
The first two terms come from the numerator; the last two come from the denominator. In particular, the minus sign applies to both terms obtained by differentiating the denominator's logarithm.
Why the Rule Works
The derivation uses the logarithm laws and the chain and product rules. For a positive function \(y\), the chain rule gives \(\frac{d}{dx}\ln y=y'/y\). Applying logarithms to the quotient gives:
Differentiate each product. For example, the product rule gives \((v\ln u)'=v'\ln u+v(\ln u)'\), and the chain rule gives \((\ln u)'=u'/u\), since \(u>0\). Applying the same rules to \(b\ln a\) yields
Because \(y>0\), multiplying both sides by \(y\) is valid and gives the stated derivative rule. This argument also explains why the quotient structure appears as a difference: it comes directly from \(\ln(N/D)=\ln N-\ln D\).
A Reliable Calculation Process
Identify an interval where the bases are positive and the quotient is defined.
Write \(\ln y\) as the logarithm of the numerator minus the logarithm of the denominator.
For a power \(u^v\), differentiate \(v\ln u\) using the product rule and \((\ln u)'=u'/u\).
Subtract the entire derivative of the denominator's logarithm.
Multiply the resulting expression for \(y'/y\) by the original quotient \(y\).
Worked Examples
Worked Example: A Variable Power in Both Parts
Differentiate \(y=\frac{x^x}{(x+1)^{2x}}\) for \(x>0\), and find \(y'(1)\).
Both bases are positive when \(x>0\), so we may take logarithms:
Differentiate the first term by the product rule: \((x\ln x)'=\ln x+x(1/x)=\ln x+1\). For the second term, first differentiate \(x\ln(x+1)\): its derivative is \(\ln(x+1)+x/(x+1)\). Thus
At \(x=1\), the original quotient is \(y(1)=1/4\). The bracket is \(0+1-2\ln 2-1=-2\ln 2\). Therefore
To check the value using the quotient rule structure, let \(N=x^x\) and \(D=(x+1)^{2x}\). At \(x=1\), \(N=1\), \(N'=1\), \(D=4\), and \(D'/D=2\ln 2+1\), so \(D'=4(2\ln 2+1)\). Hence
which agrees with the logarithmic calculation.
Worked Example: Different Bases in the Numerator and Denominator
Differentiate \(y=\frac{(x+2)^{x^2}}{(2x+1)^x}\) near \(x=1\), and evaluate \(y'(1)\). Both bases are positive near \(1\).
Taking logarithms gives
For the first product, the derivative is \(2x\ln(x+2)+x^2/(x+2)\). For the second product, it is \(\ln(2x+1)+2x/(2x+1)\), because the derivative of \(\ln(2x+1)\) is \(2/(2x+1)\). Therefore
At \(x=1\), the numerator and denominator of \(y\) are both \(3\), so \(y(1)=1\). The logarithmic derivative there is \(2\ln 3+1/3-\ln 3-2/3=\ln 3-1/3\). Thus
For a quotient-rule check, write \(N=(x+2)^{x^2}\) and \(D=(2x+1)^x\). At \(1\), \(N=D=3\), \(N'/N=2\ln 3+1/3\), and \(D'/D=\ln 3+2/3\). Hence \(N'=6\ln 3+1\), \(D'=3\ln 3+2\), and
as required.
Worked Example: A Reciprocal Variable Exponent
Differentiate \(y=\frac{(x+1)^{\sqrt{x}}}{(x+2)^{1/x}}\) for \(x>0\), and calculate \(y'(1)\).
On \(x>0\), both bases are positive. Taking logarithms produces a minus sign before the entire denominator term:
The derivative of the first product is \(\frac{\ln(x+1)}{2\sqrt{x}}+\frac{\sqrt{x}}{x+1}\). For the second product, the product rule gives \(-\frac{\ln(x+2)}{x^2}+\frac{1}{x(x+2)}\). Since this whole product is subtracted in \(\ln y\), its contribution to \(y'/y\) has the opposite signs. Therefore
At \(x=1\), \(y(1)=2/3\). The bracket evaluates to \(\frac12\ln 2+\frac12+\ln 3-\frac13=\frac12\ln 2+\ln 3+\frac16\). It follows that
For a check, the numerator \(N\) has \(N(1)=2\) and \(N'(1)=2(\frac12\ln 2+\frac12)=\ln 2+1\). The denominator \(D\) has \(D(1)=3\) and \(D'(1)=3(\frac13-\ln 3)=1-3\ln 3\). The quotient rule gives
matching the result above.
A Common Sign Error
Consider \(y=\frac{x^x}{(x+1)^x}\), for \(x>0\). Its logarithm is \(\ln y=x\ln x-x\ln(x+1)\). A common mistake is to differentiate the denominator term but fail to apply the minus sign to all of its derivative:
The product \(x\ln(x+1)\) differentiates to \(\ln(x+1)+x/(x+1)\). Since the whole product is subtracted, both terms must be subtracted:
At \(x=1\), the incorrect expression gives \(3/2-\ln 2\), whereas the correct logarithmic derivative is \(1/2-\ln 2\). Since \(y(1)=1/2\), the correct derivative is \(y'(1)=\frac12(1/2-\ln 2)\). The denominator's logarithmic derivative is subtracted as a complete quantity, not term by term with changing signs.
What to Keep in Mind
The method is most useful when the numerator or denominator contains a variable power whose base and exponent both depend on \(x\). The central bookkeeping step is to write \(\ln y\) as a difference before differentiating. Then each power contributes two terms: one from differentiating its exponent and one from differentiating its base.
Always verify the domain before taking logarithms. In the rule above, the bases must be positive on the interval under consideration, and the functions must be differentiable there. Once those conditions hold, the quotient is positive, so the relation \(y'/y=(\ln y)'\) is valid. Keeping the quotient as a difference of logarithms also helps prevent the most common error: losing the negative sign on part of the denominator's derivative.
Check Your Understanding
Try each question by writing the logarithm of the quotient before differentiating.
- For \(y=\frac{(x+1)^x}{(x+2)^{2x}}\), write \(\ln y\) and find \(y'/y\) for \(x>0\).
- In the general formula, which two terms come from differentiating the denominator's logarithm, and what sign do they have in \(y'/y\)?
- Differentiate \(y=\frac{x^{2x}}{(x+1)^3}\) on \(x>0\) using logarithms.
- Why must the bases be positive when applying this real-valued logarithmic method?
- For \(y=\frac{(x+2)^{\sqrt{x}}}{(x+3)^x}\), write the expression for \(y'/y\) without expanding \(y'\).