TITLE: Isn't my book using logarithm wrongly to differentiate?
QUESTION [5 upvotes]: Problem:
Differentiate with respect to $x$: $\frac{e^{-3x}(3x+5)}{7x-1}$
My book's attempt:
Let,
$$y=\frac{e^{-3x}(3x+5)}{7x-1}$$
$$\ln(y)=\ln(\frac{e^{-3x}(3x+5)}{7x-1})\tag{1}$$
$$\text{rest of the math...}$$
Question:

Isn't taking $\ln()$ unfounded in $(1)$: $\frac{e^{-3x}(3x+5)}{7x-1}$ could a negative number? Don't we have to just use the product and quotient rule to find the derivative here?

REPLY [5 votes]: This is called "logarithmic differentiation". It can be used to make taking derivatives of expressions involving lots of products, quotients, and powers, easier by invoking the properties of the logarithm.
For example, say we want the derivative of
$$y = \frac{(x^2+1)^3\sqrt{x^3+2x}}{e^x(x+1)}.$$
Taking logarithms on both sides, then using the properties of the logarithm to rewrite the side with lots of products/quotients/powers/etc,  and finally differentiating implicitly, we get:
$$\begin{align*}
y &= \frac{(x^2+1)^3\sqrt{x^3+2x}}{e^x(x+1)}\\
\ln|y| &= \ln\left|\frac{(x^2+1)^3\sqrt{x^3+2x}}{e^x(x+1)}\right|\\
\ln|y| &= 3\ln|x^2+1| + \frac{1}{2}\ln|x^3+2x| - \ln|e^x| - \ln|x+1|\\
\frac{d}{dx}\ln|y| &=\frac{d}{dx}\left( 3\ln|x^2+1| + \frac{1}{2}\ln|x^3+2x|-x-\ln|x+1|\right)\\
\frac{y'}{y} &= 3\left(\frac{2x}{x^2+1}\right) + \frac{1}{2}\left(\frac{3x^2+2}{x^3+2x}\right) - 1 - \frac{1}{x+1}\\
y' &= y\left(3\left(\frac{2x}{x^2+1}\right) + \frac{1}
{2}\left(\frac{3x^2+2}{x^3+2x}\right) - 1 - \frac{1}
{x+1}\right)\\
y'&= \left(\frac{(x^2+1)^3\sqrt{x^3+2x}}{e^x(x+1)}\right)\left(3\left(\frac{2x}{x^2+1}\right) + \frac{1}{2}\left(\frac{3x^2+2}{x^3+2x}\right) - 1 - \frac{1}{x+1}\right).
\end{align*}$$
This is usually simpler than the compounded quotient and power rules needed to deal with $y$ directly.