Why a Long Product Can Be Easier to Differentiate as a Sum
A product with many factors can make the product rule cumbersome: differentiating directly creates one term for each factor, with all the other factors repeated. The logarithmic derivative offers a compact alternative. It turns the product into a sum before differentiation, so each factor contributes one simple term.
The result is useful in two directions. If a function is given as a product, the sum gives a manageable expression for its derivative. If the function and its logarithmic derivative are known, multiplying them reconstructs the ordinary derivative.
Definition and Conditions
Let \(y\) be a differentiable function that is nonzero at a point. Its logarithmic derivative at that point is \(y'/y\). The quotient is defined only where \(y\ne 0\). For a product, it is enough to work on an interval where every factor is differentiable and nonzero.
Here \(n\) is a positive integer, and the sum has one term for each factor. The requirement that the factors be nonzero matters: dividing by a zero factor is not defined. If a factor can vanish, the formula can still be used on intervals that exclude its zeros, but not at those zeros through this division.
There is no requirement that the product be positive. A product can be negative while every factor remains nonzero. To justify the formula in that case, use the natural logarithm of the absolute value rather than the logarithm of the product itself.
Why the Sum Formula Works
On an interval where each \(u_i\) is nonzero, the product \(y\) is nonzero as well. The logarithmic identity for a nonzero differentiable function gives \(\frac{d}{dx}\ln|y|=y'/y\). Also, the absolute value of a finite product is the product of the absolute values, so the logarithm of its absolute value is a sum.
Since all factors are nonzero, each logarithm below is defined: $$ \ln|y| = \ln\left|\prod_{i=1}^{n}u_i\right| = \sum_{i=1}^{n}\ln|u_i|. $$
The chain rule gives \(\frac{d}{dx}\ln|u_i|=u_i'/u_i\) for each nonzero factor. Therefore, $$ \frac{y'}{y} = \sum_{i=1}^{n}\frac{u_i'}{u_i}. $$
Multiplying both sides by the nonzero value \(y\) gives $$ y'=y\sum_{i=1}^{n}\frac{u_i'}{u_i}. $$
This is a complete derivation of the product formula. It is also consistent with the product rule: expanding the last expression gives one term for each factor, with that factor differentiated and all the others unchanged. The logarithmic approach records those terms compactly rather than writing them out immediately.
Worked Examples
Worked Example: A Product of Four Polynomial Factors
Differentiate \(y=(x+1)(x^2+1)(2x-1)(x^2+4)\), and find \(y'(1)\).
Each factor is differentiable. At \(x=1\), the factors have values \(2,2,1,5\), so none is zero. In fact, none of these factors vanishes on a sufficiently small interval around \(1\), which is all that is needed to use the formula there.
Write the factors as \(u_1=x+1\), \(u_2=x^2+1\), \(u_3=2x-1\), and \(u_4=x^2+4\). Their derivatives are \(1,2x,2,2x\). Thus, wherever the factors are nonzero,
Reconstruct the derivative by multiplying this sum by the original product:
At \(x=1\), the logarithmic derivative is
The product value is \(y(1)=2\cdot2\cdot1\cdot5=20\). Therefore, \(y'(1)=20\cdot\frac{39}{10}=78\).
Check: Applying the product rule at \(x=1\), the four terms are \(1\cdot2\cdot1\cdot5=10\), \(2\cdot2\cdot1\cdot5=20\), \(2\cdot2\cdot2\cdot5=40\), and \(2\cdot2\cdot1\cdot2=8\). Their sum is \(10+20+40+8=78\), confirming the result.
Worked Example: Reconstructing a Derivative from Its Logarithmic Derivative
Let \(y=(x+2)(x^2+1)e^{3x}\). Find \(y'(0)\) by first calculating \(y'/y\), then reconstructing \(y'\).
The factors are nonzero near \(x=0\): their values there are \(2\), \(1\), and \(1\). Their logarithmic-derivative contributions are \(1/(x+2)\), \(2x/(x^2+1)\), and \(3\), respectively. The last contribution follows because \(\frac{d}{dx}e^{3x}=3e^{3x}\), so its derivative divided by itself is \(3\).
At \(x=0\), this gives
Also, \(y(0)=(0+2)(0^2+1)e^0=2\cdot1\cdot1=2\). Hence \(y'(0)=2\cdot\frac72=7\).
Check: Directly applying the product rule at \(0\) gives \(1\cdot1\cdot1+2\cdot0\cdot1+2\cdot1\cdot3=1+0+6=7\). The reconstructed derivative agrees.
Worked Example: Using Absolute Values When the Product Is Negative
Let \(y=(x-3)(x^2+1)(x^2+4)(x+1)\), and find \(y'(2)\) using the logarithmic derivative.
At \(x=2\), the factor values are \(-1,5,8,3\). Each factor is nonzero near \(2\), but the product is negative there. We therefore differentiate \(\ln|y|\), not \(\ln y\). The factor formula still applies because the derivative of \(\ln|u|\) is \(u'/u\) whenever \(u\ne0\).
At \(x=2\),
The product value is \(y(2)=(-1)(5)(8)(3)=-120\). Therefore, \(y'(2)=(-120)\cdot\frac{19}{30}=-76\).
Check: The product-rule terms at \(2\) are \(5\cdot8\cdot3=120\), \(4\cdot(-1)\cdot8\cdot3=-96\), \(4\cdot(-1)\cdot5\cdot3=-60\), and \(1\cdot(-1)\cdot5\cdot8=-40\). Their sum is \(120-96-60-40=-76\), as required.
A Common Mistake: Forgetting to Multiply Back
The sum \(\sum u_i'/u_i\) is \(y'/y\), not \(y'\). To recover the ordinary derivative, the sum must be multiplied by the original product. For example, if \(y=(x+1)(x^2+1)\), then
A wrong calculation would label this sum itself as the derivative. At \(x=1\), that would give \(1/2+2/2=3/2\). But \(y(1)=2\cdot2=4\), so the actual derivative is
Checking directly, the product rule gives \(1\cdot2+2\cdot2=2+4=6\). The correction is simple but essential: first find the logarithmic derivative, then multiply by \(y\).
When This Method Is Useful
The logarithmic derivative is particularly effective when a product has several factors and differentiating each term directly would be lengthy. It lets you organize the calculation factor by factor, while the final reconstruction preserves the original product. It can also make evaluation at a particular input efficient: evaluate the product and the sum separately, then multiply.
Before applying the formula, check that the factors are differentiable and nonzero at the input or throughout the interval being considered. If the product is negative, use \(\ln|y|\) in the justification. Keep the distinction clear between \(y'/y\), the logarithmic derivative, and \(y'\), the derivative you are asked to find.
Check Your Understanding
For each question, keep track of the conditions on the factors as well as the calculation.
- If \(y=u_1u_2u_3\) and all three factors are differentiable and nonzero, write \(y'/y\) as a sum.
- For \(y=(x+1)(x^2+4)\), find \(y'/y\) and state where the formula is defined.
- Why is \(\ln|y|\) appropriate when a product is negative?
- If \(y(2)=-6\) and \(y'(2)/y(2)=5\), what is \(y'(2)\)?
- Explain why the sum of factor derivatives divided by their factors is not, by itself, the ordinary derivative of the product.