Differentiate the functions with respect to $x$ in exercise $x^{\sin x}+(\sin x)^{\cos x}$
Differentiate the functions with respect to $x$ in exercise $x^{\sin x}+(\sin x)^{\cos x}$

Solution:

Let’s take $y=x^{\sin x}+(\sin x)^{\cos x}$

Putting the value of $u=x^{\sin x} \text { and } v=(\sin x)^{\cos x}$, We obtain $y=u+\nu$

$\frac{d y}{d x}=\frac{d u}{d x}+\frac{d v}{d x} \dots \dots \dots$(1)

So now $u=x^{\sin x}$

$\log u=\log x^{\sin x}=\sin x \log x$

$\frac{d}{d x} \log u=\frac{d}{d x}(\sin x \log x)$

$\frac{1}{u} \frac{d u}{d x}=\sin x \frac{d}{d x} \log x+\log x \frac{d}{d x} \sin x$

$\frac{1}{u} \frac{d u}{d x}=\sin x \frac{1}{x}+\log x(\cos x)$

$\frac{d u}{d x}=u\left(\frac{\sin x}{x}+\cos x \log x\right)$

$\frac{d u}{d x}=x^{\sin x}\left(\frac{\sin x}{x}+\cos x \log x\right) \dots \dots \dots$(2)

Now again $v=(\sin x)^{\cos x}$

$\log v=\log (\sin x)^{\cos x}=\cos x \log \sin x$

$\frac{d}{d x} \log v=\frac{d}{d x}[\cos x \log (\sin x)]$

$\frac{1}{v} \frac{d v}{d x}=\cos x \frac{d}{d x} \log \sin x+\log \sin x \frac{d}{d x} \cos x$

$\frac{1}{v} \frac{d v}{d x}=\cos x \frac{1}{\sin x} \frac{d}{d x} \sin x+\log \sin x(-\sin x)$

$\frac{1}{v} \frac{d v}{d x}=\cot x \cdot \cos x-\sin x \log \sin x$

$\frac{d v}{d x}=v(\cot x \cdot \cos x-\sin x \log \sin x)$

$\frac{d v}{d x}=(\sin x)^{\cos x}(\cot x \cdot \cos x-\sin x \log \sin x) \text { (using value of v) ……..(3) }$

Putting the values from equations $(2)$ and $(3)$ in equation $(1)$,

$\frac{d y}{d x}=x^{\sin x}\left(\frac{\sin x}{x}+\cos x \log x\right)+(\sin x)^{\cos x}(\cot x \cdot \cos x-\sin x \log \sin x)$