# differentiate with respect to x(cos x)^x + (sin x)^1/x

$\\ \\ \frac{d}{dx}\left(\cos ^x\left(x\right)+\sin ^{\frac{1}{x}}\left(x\right)\right) \\ \frac{d}{dx}\left(\cos ^x\left(x\right)\right) \\ =\frac{d}{du}\left(e^u\right)\frac{d}{dx}\left(x\ln \left(\cos \left(x\right)\right)\right) \\ \frac{d}{dx}\left(x\ln \left(\cos \left(x\right)\right)\right) \\ =\frac{d}{dx}\left(x\right)\ln \left(\cos \left(x\right)\right)+\frac{d}{dx}\left(\ln \left(\cos \left(x\right)\right)\right)x \\ =1\ln \left(\cos \left(x\right)\right)+\left(-\frac{\sin \left(x\right)}{\cos \left(x\right)}\right)x \\ =e^u\left(\ln \left(\cos \left(x\right)\right)-\frac{x\sin \left(x\right)}{\cos \left(x\right)}\right)$
$\\ =e^{x\ln \left(\cos \left(x\right)\right)}\left(\ln \left(\cos \left(x\right)\right)-\frac{x\sin \left(x\right)}{\cos \left(x\right)}\right) \\ =\cos ^x\left(x\right)\left(\ln \left(\cos \left(x\right)\right)-\frac{x\sin \left(x\right)}{\cos \left(x\right)}\right) \\ =\cos ^x\left(x\right)\left(\ln \left(\cos \left(x\right)\right)-\frac{x\sin \left(x\right)}{\cos \left(x\right)}\right)+\frac{\sin ^{\frac{1}{x}-1}\left(x\right)\left(x\cos \left(x\right)-\sin \left(x\right)\ln \left(\sin \left(x\right)\right)\right)}{x^2} \\$