#### Explain solution RD Sharma class 12 chapter Differentiation exercise 10.5 question 18 sub question (iii) maths

Answer: $x^{x \cos x}\left(\cos x(1+\log x)-x \sin x \log x-\frac{4 x}{\left(x^{2}-1\right)^{2}}\right.$

Hint: $\text { Diff by } x^{\cos x}$

Given: $y=x^{x \cos x}+\frac{x^{2}+1}{x^{2}-1}$

Solution:  $\text { Let } y=x^{x \cos x}+\frac{x^{2}+1}{x^{2}-1}$

\begin{aligned} &\text { Let } u=x^{x \cos x} \text { and } v=\frac{x^{2}+1}{x^{2}-1} \\ &\qquad y=u+v \end{aligned}

Diff by w.r.t.x

\begin{aligned} &\frac{d y}{d x}=\frac{d(u+v)}{d x} \\\\ &\frac{d y}{d x}=\frac{d u}{d x}+\frac{d v}{d x} \end{aligned}\begin{aligned} &\frac{d y}{d x}=\frac{d(u+v)}{d x} \\ &\frac{d y}{d x}=\frac{d u}{d x}+\frac{d v}{d x} \end{aligned}

Calculate $\frac{d u}{d x}$

$u=x^{x \cos x} \quad\left[\because \log \left(a^{b}\right)=b \log a\right]$

Take log on both sides

\begin{aligned} &\log u=\log x^{x \cos x} \\\\ &\log u=x \cos x \log x \end{aligned}

Diff w.r.t x

\begin{aligned} &\frac{d(\log u)}{d x}=\frac{d(x \cos x \log x)}{d x} \\\\ &\frac{1}{u} \frac{d u}{d x}=\frac{d(x \cos x \log x)}{d x} \end{aligned}

Use product rule

$(u v)^{\prime}=u^{\prime} v+v^{\prime} u$

Where $u=x \cos x, v=\log x$

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

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

\begin{aligned} &\frac{1}{u} \frac{d u}{d x}=\cos x \cdot \log x+\cos x-x \sin x \log x \\\\ &\frac{1}{u} \frac{d u}{d x}=\cos x(\log x+1)-x \sin x \log x \end{aligned}

\begin{aligned} &\frac{d u}{d x}=u[\cos x(\log x+1)-x \sin x \log x] \\\\ &\frac{d u}{d x}=x^{x \cos x}(\cos x(\log x+1)-x \sin x \log x) \end{aligned}

Calculate  $\frac{d v}{d x}$                $v=\frac{x^{2}+1}{x^{2}-1}$

Diff w.r.t x

\begin{aligned} &\frac{d v}{d x}=\frac{d\left(\frac{x^{2}+1}{x^{2}-1}\right)}{d x} \\\\ &\frac{d v}{d x} \cdot=\frac{d\left(\frac{x^{2}+1}{x^{2}-1}\right)}{d x} \\\\ &\frac{d v}{d x}=\frac{d\left(\frac{x^{2}+1}{x^{2}-1}\right)}{d x} \end{aligned}

Use quotient rule $\left(\frac{u}{v}\right)^{\prime}=\frac{u^{\prime} v-v^{\prime} u}{v^{2}}$

\begin{aligned} &\frac{d v}{d x}=\frac{\frac{d\left(x^{2}+1\right)}{d x} \cdot\left(x^{2}-1\right)-\frac{d}{d x}\left(x^{2}-1\right)\left(x^{2}+1\right)}{\left(x^{2}-1\right)^{2}} \\\\ &\frac{d v}{d x}=\frac{(2 x+0)\left(x^{2}-1\right)-(2 x-0)\left(x^{2}+1\right)}{\left(x^{2}-1\right)^{2}} \\\\ &\frac{d v}{d x}=\frac{2 x\left(x^{2}-1\right)-2 x\left(x^{2}+1\right)}{\left(x^{2}-1\right)^{2}} \end{aligned}

$\frac{d v}{d x}=\frac{2 x\left(x^{2}-1-x^{2}-1\right)}{\left(x^{2}-1\right)^{2}}$

$\frac{d v}{d x}=\frac{2 x(-2)}{\left(x^{2}-1\right)^{2}}$

$=\frac{-4 x}{\left(x^{2}-1\right)^{2}}$

Now $\frac{d y}{d x}=\frac{d u}{d x}+\frac{d v}{d x}$

Put value

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