Why Take the Logarithm of a Product?
Products can become awkward to differentiate when several factors are raised to powers. Logarithms offer a way to reorganize the expression: the logarithm of a product is a sum, and sums are often easier to differentiate term by term.
The method is called logarithmic differentiation. For this tutorial, the factors are positive and the exponents are constants. The positivity condition is essential: the natural logarithm \(\ln z\) is defined for real \(z>0\), so every factor to which we apply a logarithm must be positive on the interval under consideration.
The Formula for a Product of Three Powers
Let \(u\), \(v\), and \(w\) be differentiable functions on an interval \(I\), and suppose each is positive throughout \(I\). Let \(a\), \(b\), and \(c\) be real constants. Define
Because the bases are positive, these real powers are defined and \(y>0\) on \(I\). The natural logarithm of \(y\) can therefore be taken. Using the logarithm rules for products and constant powers gives
The derivative of \(\ln q(x)\) is \(q'(x)/q(x)\) when \(q(x)>0\). Applying this rule and the chain rule to both sides produces the logarithmic derivative formula below.
Multiplying by \(y\) gives the derivative itself:
Each term in parentheses is the contribution from one factor. The exponent is a constant multiplier, and the derivative of that factor’s base is divided by the base itself. The original product remains as a factor in the formula for \(y'\).
Why the Formula Works
The derivation rests on a precise chain of equalities. Since \(y>0\), \(\ln y\) exists. The logarithm changes multiplication into addition; differentiation then changes \(\ln y\) into \(y'/y\). Multiplying by \(y\) restores the derivative.
Write \(y=u^a v^b w^c\), with all three bases positive on the interval.
Use \(\ln y=a\ln u+b\ln v+c\ln w\).
The chain rule gives \(y'/y=a\,u'/u+b\,v'/v+c\,w'/w\).
Multiply both sides by \(y=u^a v^b w^c\).
The same reasoning applies to any fixed finite number of positive factors. The three-factor form makes the contributions visible without changing the method.
Worked Example: Two Polynomial Factors
Worked Example: Two Polynomial Factors
Differentiate \(y=(x+1)^2(x+3)^3\) on the interval where both bases are positive.
The conditions \(x+1>0\) and \(x+3>0\) require \(x>-1\). Thus logarithmic differentiation applies on \((-1,\infty)\). Take the natural logarithm:
Differentiate both sides:
Multiply by \(y=(x+1)^2(x+3)^3\), then simplify:
To check, differentiate the original product directly:
Both calculations agree. As a numerical check at \(x=0\), the formula gives \(y'(0)=(1)(9)(9)=81\). The logarithmic derivative gives \(y(0)(2+1)=27\cdot3=81\) as well.
Worked Example: A Negative Constant Exponent
Worked Example: A Negative Constant Exponent
Differentiate \(y=(x^2+4)^{3/2}(2x+1)^{-2}\) where the bases are positive.
The base \(x^2+4\) is positive for every real \(x\), while \(2x+1>0\) precisely when \(x>-\tfrac12\). We apply the method on \((-\tfrac12,\infty)\). Taking logarithms gives
Differentiate, using the chain rule for each logarithm:
Now multiply by the original \(y\):
Check by differentiating the two factors directly. The first factor has derivative \(3x(x^2+4)^{1/2}\), and the second has derivative \(-4(2x+1)^{-3}\). Therefore
which matches the logarithmic result. At \(x=0\), \(y(0)=4^{3/2}=8\), and the logarithmic derivative is \(0-4=-4\). Hence \(y'(0)=-32\). Direct differentiation also gives \(0-4(4^{3/2})=-32\).
Worked Example: Three Factors and a Restricted Interval
Worked Example: Three Factors and a Restricted Interval
Differentiate
The first base is positive for all real \(x\). The second is positive when \(x>-2\), and the third is positive when \(x<3\). Thus all three are positive on \((-2,3)\), and we use logarithmic differentiation on that interval:
Differentiate term by term. In the last term, the derivative of \(3-x\) is \(-1\):
Multiplying by the original product gives
Check at \(x=0\). The function value is \(1^2\cdot 2^3\cdot\sqrt{3}=8\sqrt{3}\). The logarithmic derivative there is
So the formula gives \(y'(0)=8\sqrt{3}\cdot\frac43=\frac{32\sqrt{3}}{3}\). Differentiate the original product directly at zero to verify:
The direct derivative and logarithmic derivative agree at the check point.
A Common Mistake: Forgetting the Original Product
Differentiating \(\ln y\) gives \(y'/y\), not \(y'\). Omitting the factor \(y\) is a common error. For example, in the first worked example, a mistaken calculation might end at
At \(x=0\), this incorrect expression gives \(2+1=3\). But the original function has \(y(0)=27\), and its logarithmic derivative at zero is \(3\). Therefore \(y'(0)=27\cdot3=81\), not \(3\). The correction is to multiply the logarithmic derivative by the original function:
When the Method Applies
Before taking logarithms, check the bases on the interval where you want to differentiate. They must all be positive there. If a base is zero or negative at a point, the logarithm of that base is not defined as a real number at that point, so this logarithmic calculation cannot be used there.
This condition concerns the method; a product might still be defined at points outside the interval where logarithmic differentiation applies. For example, a factor raised to an integer power can sometimes be real when its base is negative. That does not make the logarithm of the negative base available. State the interval for the logarithmic calculation, and do not extend its conclusion beyond the domain where its steps are valid.
Within a valid interval, the method is useful because it organizes the derivative into a sum of manageable contributions. It can also make signs easier to track: a negative constant exponent contributes a negative multiple of the base’s logarithmic derivative, as in the second example.
Check Your Understanding
For each question, identify the domain conditions before carrying out the differentiation.
- For \(y=(x+4)^2(x+1)^{1/2}\), on what interval are both bases positive, and what is \(y'/y\) there?
- For \(y=(x^2+9)^3(5-x)^{-1}\), on what interval can logarithmic differentiation be applied?
- Explain why differentiating \(\ln y\) gives \(y'/y\), rather than \(y'\).
- Differentiate \(y=(x^2+1)(x+2)^2\) on the interval where both bases are positive, and check your result at \(x=0\).
- In the three-factor example, why is the contribution from \((3-x)^{1/2}\) negative?