# Thread: [SOLVED] derivative help

1. ## [SOLVED] derivative help

y=x^(cosx)

i thought the derivative was....

y'=ln(x)(x^cosx)(-sinx)

where did i go wrong?

thanks

2. $\displaystyle y=x^{\cos x}$
taking ln both side
$\displaystyle ln y= \cos x \ ln x$

$\displaystyle \frac{d(ln y)}{dx}= \frac{d(\cos x\ ln x)}{dx}$

$\displaystyle \frac{1}{y} \frac{dy}{dx}= \frac{1}{x} \cos x -ln x\ \sin x$
$\displaystyle \frac{dy}{dx}= y\left ( \frac{1}{x} \cos x - ln x \ \sin x \right )$
$\displaystyle \frac{dy}{dx}= x^{\cos x}\left ( \frac{1}{x} \cos x - ln x\ \sin x \right)$

3. never mind i got it. i was doing it way wrong lol.

4. Originally Posted by mybrohshi5
y=x^(cosx)

i thought the derivative was....

y'=ln(x)(x^cosx)(-sinx)

where did i go wrong?

thanks
$\displaystyle y=x^{cos(x)}$

Take the ln of both sides.

$\displaystyle ln(y)=cos(x)ln(x)$

Use implicit differentiation:
$\displaystyle \frac{1}{y}\frac{dy}{dx}=-sin(x)ln(x)+cos(x)\frac{1}{x}$

$\displaystyle \frac{dy}{dx}=-ysin(x)ln(x)+cos(x)\frac{1}{x}$

$\displaystyle =-x^{cos(x)}sin(x)ln(x)+x^{cos(x)}cos(x)\frac{1}{x}$

5. Originally Posted by ramiee2010
$\displaystyle y=x^{\cos x}$
taking ln both side
$\displaystyle ln y= \cos x ln x$

$\displaystyle \frac{d(ln y)}{dx}= \frac{d(\cos x ln x)}{dx}$

$\displaystyle \frac{1}{y} \frac{dy}{dx}= \frac{1}{x} \cos x -ln x \sin x$
$\displaystyle \frac{dy}{dx}= y\left ( \frac{1}{x} \cos x - ln x \sin x \right )$
$\displaystyle \frac{dy}{dx}= x^{\cos x}\left ( \frac{1}{x} \cos x - ln x \sin x \right)$
thats what i finally just did. i totally forgot about taking the natural log of both sides and differentiating haha. thanks for you help