Differentiate the functions with respect to $x$ in exercise $x^{x}-2^{\sin x}$
Differentiate the functions with respect to $x$ in exercise $x^{x}-2^{\sin x}$

Solution:

Let’s take $y=x^{x}-2^{\sin x}$

Put $u=x^{x} \text { and } v=2^{\text {sinx }}$

$y=u-v$

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

Now, $u=x^{2}$

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

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

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

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

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

$\frac{d u}{d x}={x^{x}(1+\log x)} \ldots \ldots \ldots$.(2)

Now again, $v=2^{2 \operatorname{sinx}}$

$\frac{d v}{d x}=\frac{d}{d x} 2^{\sin x}$

$\frac{d v}{d x}=2^{\sin x} \log 2 \frac{d}{d x} \sin x\left[\because \frac{d}{d x} a^{f(x)}=a^{f(x)} \log a \frac{d}{d x} f(x)]\right.$

$\frac{d v}{d x}=2^{\sin x}(\log 2) \cdot \cos x=\cos x \cdot 2^{\sin x} \log 2$……………..(3)

Now putting the values from eq.(2) and eq.(3) in eq.(1),

$\frac{d y}{d x}=x^{x}(1+\log x)-\cos x \cdot 2^{\sin x} \log 2$