Can logarithmic differentiation give the wrong answer when applied to functions that evaluate to negative numbers?

Solution 1:

If I understand the question correctly, the procedure under discussion is finding $f'(x)$ by calculating $f(x)\cdot \frac d{dx}(\log |f(x)|)$, and the question is whether the absolute value signs could ever cause this procedure to produce the wrong formula for $f'(x)$.

The answer is no, and the reason is that the derivative of the function $\log|u|$ is $\frac1u$ for all $u\ne0$ (check this). We think of $\log u$ as "the" function that has derivative $\frac1u$, but $\log|u|$ is a perfectly good function defined on the entire domain of $\frac1u$ whose derivative is in fact $\frac1u$. This, by the way, is the reason that the indefinite integral $\int \frac1u\,du$ evaluates to $\log|u|+C$ rather than $\log u+C$: the former answer accounts for the entire domain of $\frac1u$ while the latter doesn't.