Short and Sweet Calculus

## 3.10 Logarithmic Differentiation

To differentiate a function $$y=f(x)$$ with respect to $$x$$ and $$f$$ composed of products, quotients, and exponents, it is sometimes easier to:

1. Take the natural logarithm of both sides of $$y=f(x)$$.

2. Expand the right side using the properties of logarithms; specifically $\ln(ab)=\ln a+\ln b,\quad\ln\left(\frac{a}{b}\right)=\ln a-\ln b,\quad\ln(a^{r})=r\ln a,$ provided that the right-hand sides make sense (i.e. the input of each logarithm is positive).

3. Take derivative of both sides.

4. Isolate $$dy/dx$$ and replace $$y$$ with the original function.

Example 3.23. Find $$y’$$ given $y=\frac{x\sin x}{(2-x)\sqrt{1+x^{4}}}.$

Solution

This would be really messy to differentiate $$y$$ directly. Instead we can use logarithmic differentiation.

First we take the natural logarithm of both sides and exapnd the right hand side using the properties of logarithms \begin{aligned} \ln y & =\ln\frac{x\sin x}{(2-x)\sqrt{1+x^{4}}}\\ & =\ln x+\ln\sin x-\ln(2-x)-\frac{1}{2}\ln(1+x^{4}).\end{aligned} Now we can differentiate both sides: $\frac{1}{y}y’=\frac{1}{x}+\frac{1}{\sin x}\left(\frac{d}{dx}\sin x\right)-\frac{1}{2-x}\left(\frac{d}{dx}(2-x)\right)-\frac{1}{2(1+x^{4})}\frac{d}{dx}(1+x^{4})$ or $\frac{y’}{y}=\frac{1}{x}+\frac{\cos x}{\sin x}-\frac{(-1)}{2-x}-\frac{4x^{3}}{2(1+x^{4})}$ Multiplying both sides by $$y$$: \begin{aligned} y’ & =y\left[\frac{1}{x}+\frac{\cos x}{\sin x}+\frac{1}{2-x}-\frac{2x^{3}}{1+x^{4}}\right]\\ & =\frac{x\sin x}{(2-x)\sqrt{1+x^{4}}}\left[\frac{1}{x}+\frac{\cos x}{\sin x}+\frac{1}{2-x}-\frac{2x^{3}}{1+x^{4}}\right].\end{aligned} We have found the solution, but we may want to simplify it further: \begin{aligned} y’ & =\frac{\sin x}{(2-x)\sqrt{1+x^{4}}}+\frac{x\cos x}{(2-x)\sqrt{1+x^{4}}}+\frac{x\sin x}{(2-x)^{2}\sqrt{1+x^{4}}}-\frac{2x^{4}\sin x}{(2-x)\sqrt{(1+x^{4})^{3}}}\\ & =\frac{\sin x+x\cos x}{(2-x)\sqrt{1+x^{4}}}+\frac{x\sin x}{(2-x)^{2}\sqrt{1+x^{4}}}-\frac{2x^{4}\sin x}{(2-x)\sqrt{(1+x^{4})^{3}}}.\end{aligned}