derivative problem. is it same? First derivative of $y=\ln(x)^{\cos x}$ is $-\sin x\ln x+\frac{\cos x}{x}$ or another answer? My friend gets another answer, but it's true? thanks.
 A: Assuming that $\ln (x)^{\cos x}=\ln\left(x^{\cos x}\right)$, we have
$$ \frac{d}{dx}\left[\ln x^{\cos x}\right]=\frac{d}{dx}\left[(\cos x)\ln x\right]=(\cos x)\frac{d}{dx}\left[\ln x\right]+(\ln x)\frac{d}{dx}\left[\cos x\right] $$
$$ =(\cos x)\frac{1}{x}+(\ln x)(-\sin x)=\frac{\cos x}{x}-(\sin x)\ln x $$
If you meant to raise the function $\ln x$ by $\cos x$, then its best to write, $(\ln x)^{\cos x}$ as the parenthesis make it clear.  
A: $$y = e^{\ln (\ln(x))^{\cos x}} = e^{\cos x \ln (\ln(x))}$$
$$y^{'} = e^{\cos x \ln (\ln(x))} \cdot (\cos x \ln (\ln(x)))^{'} = e^{\cos x \ln (\ln(x))}  \cdot \left(-\sin x \ln (\ln(x)) + \cos x \frac{1}{\ln x} \frac{1}{x}\right)$$
$$=  (\ln(x))^{\cos x}\left(-\sin x \ln (\ln(x)) + \cos x \frac{1}{\ln x} \frac{1}{x}\right)$$
A: I will assume you mean $(\ln x)^{\cos x}$ and not $\ln(x^{\cos x})$.  I wish people would be explicit about that point.
If $g(x)$ is constant then $\dfrac d {dx} (f(x))^{g(x)} = g(x)f(x)^{g(x)-1}$.
If $f(x)$ is constant then $\dfrac d {dx} (g(x))^{g(x)} = f(g)^{g(x)} (\ln f(x)) f'(x)$.
If neither is constant then $\dfrac d {dx} (g(x))^{g(x)} = \text{the sum of those two things}$.
That can be proved by logarithmic differentiation.
