Answer
\[{y^,} = 2x\cos x - {x^2}\sin x\]
Work Step by Step
\[\begin{gathered}
f\,\left( x \right) = {x^2}\cos x \hfill \\
\hfill \\
f\,\left( x \right) = y\,\,\,then\,\,y = {x^2}\cos x \hfill \\
\hfill \\
Take\,\,\ln \,\,to\,\,each\,\,side \hfill \\
\hfill \\
\ln y = \ln \,\left( {{x^2}\cos x} \right) \hfill \\
\hfill \\
use\,\,\log \,\,properties \hfill \\
\hfill \\
\ln y = \ln {x^2} + \ln \cos x \hfill \\
\hfill \\
Differentiate \hfill \\
\hfill \\
\frac{{{y^,}}}{y} = \frac{{2x}}{{{x^2}}} + \frac{{ - \sin x}}{{\cos x}} \hfill \\
\hfill \\
Simplify \hfill \\
\hfill \\
\frac{{{y^,}}}{y} = \frac{2}{x} - \tan x \hfill \\
\hfill \\
multiply\,\,both\,\,\,sides\,\,by\,\,y \hfill \\
\hfill \\
{y^,} = \frac{{2y}}{x} - y\tan x \hfill \\
\hfill \\
Where\,\,\,y = {x^2}\cos x,\,\,then \hfill \\
\hfill \\
{y^,} = 2x\cos x - {x^2}\sin x \hfill \\
\end{gathered} \]