# Use logarithmic differentiation to find the derivative of the function.

Find $y'$ for $y = x^{2\cos{x}}$

I got $y' = \left(\frac {2\cos{x}}{x} - 2\ln(x)\cos(x)\sin(x)\right)(x^{2\cos{x}})$ is that correct?

-
Your math was pretty ambiguous I must say. Please check whether it is what you meant :) – Johnny Westerling Oct 20 '12 at 21:40
Here are my steps: \begin{align} ln(y) = 2cos(x)ln(x)\\ \frac 1y * y' = (2cos(x) * \frac 1x + ln(x) * (2cos(x) * -sin(x))\\ \frac 1y * y' = \frac {2cox(x)}{x} - 2ln(x)cos(x)sin(x)\\ y' = (\frac {2cos(x)}{x} - 2ln(x)cos(x)sin(x))(x^{2cos(x)})\\ \end{align} – dsta Oct 20 '12 at 21:42
Your second step looks a bit unclear to me... please check the edit in my answer below. – Johnny Westerling Oct 20 '12 at 22:08
+1 for work shown. Though it should probably be in the question next time and not in a comment. – Mike Oct 21 '12 at 6:44

Nope. Your answer is a bit off. Let's do it this way:

$$y=x^{2\cos{x}}=e^{2\cos{x}\ln{x}}$$

hence, by the chain rule we have:

$$y^{\prime}=e^{2\cos{x}\ln{x}}\left(\frac{2\cos{x}}{x}-2\sin{x}\ln{x}\right)$$

and now substituting back $e^{2\cos{x}\ln{x}}=x^{2\cos{x}}$ we finally arrive at:

$$y^{\prime}=x^{2\cos{x}}\left(\frac{2\cos{x}}{x}-2\sin{x}\ln{x}\right)$$

EDIT: If you want to use your method:

$$\ln(y)=2\cos{x}\ln{x}$$

$$\frac{1}{y}\cdot{y^{\prime}}=\left(\frac{2\cos{x}}{x}-2\sin{x}\ln{x}\right)$$

hence:

$$y^{\prime}=y\left(\frac{2\cos{x}}{x}-2\sin{x}\ln{x}\right)$$

Which yields the same answer.

-