Why Use Logarithms for a Factorized Rational Expression?
A rational expression can be easy to describe as a quotient of products but cumbersome to differentiate by repeatedly applying the product rule and quotient rule. Logarithmic differentiation offers a way to organize the calculation: taking a logarithm changes products into sums, quotients into differences, and fixed powers into coefficients.
The method is especially useful when an expression contains several polynomial factors. Instead of expanding those factors, we can differentiate each factor in its original form. This preserves the structure of the expression and makes it easier to see where every term in the derivative comes from.
The method requires care about signs. In this tutorial, we work on an interval where every polynomial factor is positive. That guarantees that the logarithm of each factor is defined and that the expression itself is positive.
The positivity condition lets us take the natural logarithm of both sides. The exponents in this definition are fixed integers; they are not functions of \(x\). The formula below uses \(P_i'(x)\) and \(Q_j'(x)\), the ordinary derivatives of the polynomial factors.
The Logarithmic Derivative Formula
For a positive differentiable function \(y\), the logarithmic derivative is \(y'(x)/y(x)\). It measures the derivative relative to the current value of the function. For a factorized rational expression, this relative derivative is a sum of contributions from numerator factors, minus contributions from denominator factors.
Each numerator factor contributes its exponent times its derivative divided by itself. Each denominator factor contributes the same type of term with a minus sign. The minus sign is essential: the logarithm of a quotient is the logarithm of the numerator minus the logarithm of the denominator.
Why the Formula Works
The derivation follows directly from the logarithm rules and the chain rule. Because all factors are positive, each logarithm below is defined on \(I\). Taking the natural logarithm of the expression gives a sum and difference:
Differentiate both sides with respect to \(x\). The chain rule gives \(\frac{d}{dx}\ln P_i(x)=P_i'(x)/P_i(x)\), and likewise for each denominator factor. On the left, it gives \(y'(x)/y(x)\). Therefore
Since \(y(x)>0\), multiplication by \(y(x)\) is valid and recovers \(y'(x)\). This proves the formula. Notice that the proof does not require expanding the original expression: the factors remain visible throughout.
Confirm that every polynomial factor is positive on the interval where the expression is being differentiated.
Write \(\ln y\) as a sum of logarithms from numerator factors minus a sum from denominator factors.
For a factor \(P(x)^m\), its contribution is \(mP'(x)/P(x)\); denominator contributions carry a minus sign.
Multiply the resulting logarithmic derivative by the original expression \(y\).
Worked Examples
Worked Example: Linear Factors and a Quadratic Denominator
Differentiate \(y=\dfrac{(x+2)^3(2x+1)^2}{(x^2+1)^2}\) on an interval where its factors are positive.
The conditions \(x+2>0\) and \(2x+1>0\) hold together when \(x>-\frac12\). Also \(x^2+1>0\) for every real \(x\), so we work on \(x>-\frac12\). Taking logarithms gives
Differentiate each term. The chain rule gives \(\frac{d}{dx}\ln(2x+1)=2/(2x+1)\) and \(\frac{d}{dx}\ln(x^2+1)=2x/(x^2+1)\). Thus
Multiplying by \(y\) gives the derivative:
To check, evaluate both the expression and its derivative at \(x=0\). The original expression gives \(y(0)=2^3\cdot1^2/1^2=8\), and the bracket gives \(3/2+4-0=11/2\). The formula therefore gives \(y'(0)=8\cdot11/2=44\). Directly, write \(y=ABC\), where \(A=(x+2)^3\), \(B=(2x+1)^2\), and \(C=(x^2+1)^{-2}\). At zero, \(A=8\), \(A'=12\), \(B=1\), \(B'=4\), \(C=1\), and \(C'=0\). The product rule gives \(y'(0)=12\cdot1\cdot1+8\cdot4\cdot1+8\cdot1\cdot0=44\), as required.
Worked Example: Several Polynomial Factors
Differentiate \(y=\dfrac{(3x^2+1)^2(x+3)^3}{(x^2+4)(x+1)^2}\) for \(x>-1\). All four factors are positive there: \(3x^2+1>0\), \(x+3>0\), \(x^2+4>0\), and \(x+1>0\).
Taking the logarithm separates the factors:
Differentiate term by term, including the derivatives of the polynomial inputs:
Thus the derivative is the original expression multiplied by this sum:
Check at \(x=1\). The original function is \(y(1)=4^2\cdot4^3/(5\cdot2^2)=1024/20=256/5\). The bracket is \(12/4+3/4-2/5-2/2=3+3/4-2/5-1=47/20\). Therefore the formula gives \(y'(1)=(256/5)(47/20)=3008/25\).
For an independent check, let \(N=(3x^2+1)^2(x+3)^3\) and \(D=(x^2+4)(x+1)^2\). At \(x=1\), the factors in \(N\) have values \(16\) and \(64\), and derivatives \(48\) and \(48\). Hence \(N=1024\) and \(N'=48\cdot64+16\cdot48=3840\). The factors in \(D\) have values \(5\) and \(4\), and derivatives \(2\) and \(4\). Hence \(D=20\) and \(D'=2\cdot4+5\cdot4=28\). The quotient rule gives
This agrees with the logarithmic differentiation result.
Worked Example: Checking the Sign of Each Contribution
Differentiate \(y=\dfrac{(x^2+2x+2)^2(x^2+1)^3}{(x+4)^2(2x^2+3)}\). The quadratic factors are always positive, and \(x+4>0\) on \(x>-4\). Work on that interval.
Taking logarithms and differentiating gives
Therefore
At \(x=0\), the original function equals \(2^2\cdot1^3/(4^2\cdot3)=1/12\). The bracket equals \(2-1/2=3/2\), so \(y'(0)=1/12\cdot3/2=1/8\).
Check this value with the quotient rule. The numerator factors at zero are \(4\) and \(1\), with derivatives \(8\) and \(0\), so the numerator and its derivative are \(N=4\) and \(N'=8\). The denominator factors are \(16\) and \(3\), with derivatives \(8\) and \(0\), so \(D=48\) and \(D'=24\). Consequently
The independent calculation confirms the result.
A Common Sign and Chain-Rule Pitfall
Two details deserve particular attention: a denominator contributes a minus sign, and differentiating the logarithm of a polynomial factor requires the derivative of that polynomial. For example, consider \(y=(2x+1)^2/(x+3)\) on \(x>-\frac12\). The correct logarithmic derivative is
A mistaken calculation might write \(2/(2x+1)+1/(x+3)\), omitting the inner derivative \(2\) in the numerator term and using the wrong sign for the denominator term. At \(x=0\), that incorrect bracket is \(2+1/3=7/3\), and since \(y(0)=1/3\), it incorrectly predicts \(y'(0)=7/9\). The correct bracket at zero is \(4-1/3=11/3\), giving \(y'(0)=11/9\). Direct differentiation confirms the correction:
Keeping the logarithm written as a sum and difference before differentiating is a reliable way to preserve both the chain-rule factors and the quotient signs.
When This Method Is Useful
Logarithmic differentiation is valuable when a function is already given as a product or quotient of several powers. Its main advantage here is organization: every factor produces one visible term, with its exponent, its derivative, and its position in the quotient accounted for. It also avoids expanding polynomial products, which can create many terms without making the derivative easier to understand.
The method does not remove the need to check the interval. The logarithmic derivation above uses logarithms of the individual factors, so those factors must be positive wherever the argument is applied. Once the derivative has been obtained, it can be left as the original expression multiplied by the logarithmic derivative, or simplified further if a problem calls for a single rational expression.
Check Your Understanding
For each question, keep the factors visible and account for the derivative of every polynomial inside a logarithm.
- For \(y=(x+1)^2(x^2+1)^3/(x+2)\) on \(x>-1\), write \(y'/y\).
- For \(y=(2x^2+3)^2/(x+4)^3\) on \(x>-4\), write the logarithmic derivative and identify its denominator contribution.
- Explain why the condition that each factor be positive allows us to take the logarithm of the factorized expression term by term.
- For \(y=(x+2)^2/(3x+1)\), identify an interval on which both factors are positive, then write \(y'/y\) there.
- In logarithmic differentiation, why must the term from a denominator factor have a minus sign?