## Differentiation Technique #1: Logarithmic Differentiation

1. We should recall the chain rule applied to $\ln\bigl(f(x)\bigr)$ gives us
(1)$\displaystyle\frac{\mathrm{d}\ln\bigl(f(x)\bigr)}{\mathrm{d}x} = \frac{f'(x)}{f(x)}$
where $f'(x) = \mathrm{d}f/\mathrm{d}x$. So what? Well, if $f(x)$ is some nightmarish function (e.g. $x^{x}$), then we have
(2)$\displaystyle f(x)\frac{\mathrm{d}\ln\bigl(f(x)\bigr)}{\mathrm{d}x} = f'(x)$.
Quite a quick way to compute nightmarish derivatives!

2. Example. What is the derivative of $f(x)=x^{x}$?

Solution: we should note that
(3)$\displaystyle \ln\bigl(f(x)\bigr) = x\ln(x)$.
This has quite an easy derivative:
(4)$\displaystyle\frac{\mathrm{d}\ln\bigl(f(x)\bigr)}{\mathrm{d}x} = \ln(x)+1$
Thus we find
(5)$\displaystyle f'(x)=f(x)\frac{\mathrm{d}\ln\bigl(f(x)\bigr)}{\mathrm{d}x} = x^{x}\bigl(\ln(x)+1\bigr)$.

3. Example. What is the derivative of $g(x) = x^{\exp(x)}$?

Solution: We see
(6)$\displaystyle \ln\bigl(g(x)\bigr) = \exp(x)\ln(x)$.
This has quite an easy derivative:
(7)$\displaystyle\frac{\mathrm{d}\ln\bigl(g(x)\bigr)}{\mathrm{d}x} = \exp(x)\ln(x)+\frac{\exp(x)}{x}$
Thus we find
(8)$\displaystyle g'(x)=g(x)\frac{\mathrm{d}\ln\bigl(g(x)\bigr)}{\mathrm{d}x} = x^{\exp(x)}\left(\exp(x)\ln(x)+\frac{\exp(x)}{x}\right)$.
This concludes our second example.

4. Example. What is the derviative of $h(x) = (3x^{2}+5)^{1/x}$?

Solution: We take its logarithm, which is
(9)$\displaystyle \ln\bigl(h(x)\bigr) = \frac{1}{x}\ln\bigl(3x^{2}+5\bigr)$.
Now we take the derivative of the logarithm:
(10)$\displaystyle\frac{\mathrm{d}\ln\bigl(h(x)\bigr)}{\mathrm{d}x} = \frac{-1}{x^{2}}\ln\bigl(3x^{2}+5\bigr)+\frac{1}{x}\frac{6x}{3x^{2}+5}$.
Then we multiply both sides by $h(x)$ to get the derivative
(11)$\displaystyle h'(x)=h(x)\frac{\mathrm{d}\ln\bigl(h(x)\bigr)}{\mathrm{d}x} = \left(\frac{-1}{x^{2}}\ln\bigl(3x^{2}+5\bigr)+\frac{1}{x}\frac{6x}{3x^{2}+5}\right)(3x^{2}+5)^{1/x}$.

Exercise 1. Differentiate $\displaystyle y = \bigl(\sin(x)\bigr)^{x^3}$.

Exercise 2. Differentiate $\displaystyle y = 7x \bigl(\cos(x)\bigr)^{x/2}$.

Exercise 3. Differentiate $\displaystyle y = \sqrt{x}^{\sqrt{x}} \exp(x^{2})$.

Exercise 4. Differentiate $\displaystyle y = x^{\ln(x)} \bigl(\sec(x)\bigr)^{3x}$.

Exercise 5. Differentiate $\displaystyle y = \displaystyle \frac{\bigl( \ln(x)\bigr)^{x}}{2^{3x+1}}$.

Exercise 6. Differentiate $\displaystyle y = \displaystyle\frac{x^{2x} (x-1)^{3}}{(3+5x)^{4}}$.

Exercise 7. Differentiate the function $\displaystyle f(x) = \displaystyle\frac{x^{5} \exp(x)\cdot (4x+3)}{5^{\ln(x)}(3-x)^{2}}$.

Exercise 8. Differentiate $\displaystyle y = \displaystyle{x^{(x^{(x^4)})}}$.

Acknowledgement: these examples and exercises were borrowed and/or modified from Dr Kouba’s Calculus Page, although my solutions were computed by myself.