Find the derivative of $f(x) = \frac{e^{x^{2}} (\arcsin{x})^{2}x\sqrt{\cos{x}}}{(\ln{x})^{6} \sin^{2}x}$ Question:
Find the derivative of:
$$f(x) = \frac{e^{x^{2}} (\arcsin{x})^{2}x\sqrt{\cos{x}}}{(\ln{x})^{6} \sin^{2}x}$$
Attempted Solution
The most productive approach seems to be logarithmic differentiation:
$$\ln |f(x)| = \ln \left|\frac{e^{x^{2}} (\arcsin{x})^{2}x\sqrt{\cos{x}}}{(\ln{x})^{6} \sin^{2}x}\right|$$
Distributing the natural logarithm function gives addition instead of multiplication and subtraction instead of division:
$$\ln \left|\frac{e^{x^{2}} (\arcsin{x})^{2}x\sqrt{\cos{x}}}{(\ln{x})^{6} \sin^{2}x}\right| = \ln |e^{x^2}| + \ln |(\arcsin x)^2| + \ln |x|$$
$$+ \ln |\sqrt{\cos x}| - \ln |(\ln x)^6| - \ln |\sin^2 x|$$
Taking the derivative of both sides gives us:
$$f'(x) = f(x) \left( \frac{2 e^{x^2}}{e^{x^2}} + \frac{2 \arcsin x}{(\arcsin x)^2} \frac{1}{\sqrt{1-x^2}} + \frac{1}{x} + \frac{-\sin x}{2 \cos x} + \frac{6 (\ln x)^5}{(\ln x)^6} \frac{1}{x} - \frac{2 \sin x \cos x}{\sin x}\right) $$
Simplifying gives:
$$f'(x) = f(x) \left( 2 + \frac{2}{\arcsin x \sqrt{1-x^2}} + \frac{1}{x} -\frac{1}{2} \tan x + \frac{6}{x \ln x} + 2\cos x \right)$$
However, this is not the correct answer. In particular, the first and last terms are wrong. Where and how did it go wrong?

Take the natural log to get $$\ln f = \ln e^{x^2} + 2\ln \arcsin x  + \ln x + \frac{1}{2} \ln \cos x - 6\ln \ln x - 2\ln \sin x$$
And then simplifying that a bit, i.e: $\ln e^{x^2} = x^2$ and differentiating gives $$f' = f\left(2x + \cdots  - 2 \frac{\cos x}{\sin x}\right)$$
So that gives you the correct first and last terms. Remember that logs do more than just convert multiplication to addition, they turn powers to coefficients, making differentiation a lot easier. 
