# Differentiate $$( x \cos \: x )^x + ( x\sin\: x )^{\Large\frac{1}{x}}$$ w.r.t. $$x$$.

Toolbox:
• $\large\frac{dy}{dx}=\frac{du}{dx}+\frac{dv}{dx}$
Step 1:
Let $y= (x \cos x )^{\large x} + (x\sin x)^{\Large\frac{1}{x}}$
Its of the form $u+v$
$\large\frac{dy}{dx}=\frac{du}{dx}+\frac{dv}{dx}$
Now $u=(x\cos x)^{\large x}$
Taking $\log$ on both sides
$\log u=\log (x\cos x)^{\large x}$
We know that $\log m^{\large n}=n\log m$
$\log u=x\log(x\cos x)$
$\qquad\;=x(\log x+\log\cos x)$
Step 2:
Differentiating on both sides
$\large\frac{1}{u}\frac{du}{dx}=$$1.[\log x+\log\cos x]+x[\large\frac{1}{x}-\large\frac{\sin x}{\cos x}] \qquad\;=\log x(\cos x)+x\begin{bmatrix}\large\frac{\cos x-x\sin x}{x\cos x}\end{bmatrix} \qquad\;=\log x(\cos x)+\begin{bmatrix}\large\frac{\cos x-x\sin x}{\cos x}\end{bmatrix} \large\frac{du}{dx}$$=u\begin{bmatrix}\log x(\cos x)+\large\frac{\cos x-x\sin x}{\cos x}\end{bmatrix}$
$\large\frac{du}{dx}$$=(x\cos x)^{\large x}\begin{bmatrix}\log (x\cos x)+\large\frac{\cos x-x\sin x}{\cos x}\end{bmatrix} Step 3: v=(x\sin x)^{\Large\frac{1}{x}} Taking \log on both sides \log v=\log(x\sin x)^{\Large\frac{1}{x}} We know that \log m^{\large n}=n\log m \log v=\large\frac{1}{x}$$\log(x\sin x)$
$\qquad\;=\large\frac{1}{x}$$(\log x+\log\sin x) Differentiating both sides \large\frac{1}{v}\frac{dv}{dx}=\big(\large\frac{-1}{x^2}\big)$$\log (x\sin x)+\large\frac{\sin x+x\cos x}{x^2\sin x}$
$\large\frac{dv}{dx}=\big(\large\frac{v}{x^2}\big)$$[\large\frac{\sin x+x\cos x}{\sin x}$$-\log(x\sin x)]$
$\large\frac{dv}{dx}=\big(\large\frac{(x\sin x)^{\Large\frac{1}{x}}}{x^2}\big)$$[\large\frac{\sin x+x\cos x}{\sin x}$$-\log(x\sin x)]$
Step 4:
$\large\frac{dy}{dx}=\frac{du}{dx}+\frac{dv}{dx}$
$\large\frac{dy}{dx}$$=(x\cos x)^{\large x}\begin{bmatrix}\log (x\cos x)+\large\frac{\cos x-x\sin x}{\cos x}\end{bmatrix}+\large\frac{(x\sin x)^{\Large\frac{1}{x}}}{x^2}$$[\large\frac{\sin x+x\cos x}{\sin x}$$-\log(x\sin x)]$