Logarithmic Differentiation and Selecting a Procedure
AP Calculus BC · Unit 3 — Differentiation: Composite, Implicit, and Inverse Functions
When the exponent contains a variable
The power rule needs a constant exponent and the exponential rule needs a constant base, so an expression like $x^{\sin x}$ is served by neither. Take a natural logarithm of both sides first:
$$y=x^{\sin x}\;\Longrightarrow\;\ln y=\sin x\ln x\;\Longrightarrow\;\frac{y'}{y}=\cos x\ln x+\frac{\sin x}{x}\;\Longrightarrow\;y'=x^{\sin x}\left(\cos x\ln x+\frac{\sin x}{x}\right)$$The step $\dfrac{d}{dx}\ln y=\dfrac{y'}{y}$ is implicit differentiation, and the final multiplication by $y$ is what returns the answer to the original variable. Forgetting it leaves only $\dfrac{y'}{y}$, which is not the requested derivative.
The same trick tames heavy products and quotients
Logarithms convert products into sums, quotients into differences and powers into coefficients, so a three-level quotient becomes three independent derivatives added together. This is far safer than nesting the quotient rule around the product rule around the chain rule.
Choosing the procedure
Read the outermost operation first: a sum means differentiate term by term; a product means the product rule; a quotient with a variable exponent means logarithms; a composition means the chain rule.
Worked example: a three-layer quotient, done with logarithms
Let $y=\dfrac{(x+2)^{4}\sqrt{3x-2}}{\left(x^{2}+1\right)^{3}}$ for $x>\dfrac23$. Find $y'(1)$ as an exact fraction.
Solution
Take the logarithm of both sides (valid because $y>0$ on the domain under consideration):
$$\ln y=4\ln(x+2)+\tfrac12\ln(3x-2)-3\ln\left(x^{2}+1\right)$$Differentiate both sides with respect to $x$:
$$\frac{y'}{y}=\frac{4}{x+2}+\frac{3}{2(3x-2)}-\frac{6x}{x^{2}+1}$$At $x=1$:
$$y(1)=\frac{3^{4}\cdot 1}{2^{3}}=\frac{81}{8},\qquad \frac{y'}{y}\bigg|_{x=1}=\frac{4}{3}+\frac{3}{2}-3=\frac{8+9-18}{6}=-\frac{1}{6}$$Multiply back by $y$:
$$y'(1)=\frac{81}{8}\cdot\left(-\frac{1}{6}\right)=-\frac{27}{16}$$Doing it directly requires nesting the quotient rule on the outside, the product rule inside, and then the chain rule on each factor — three layers, and very easy to get a sign wrong.