Need solution for RD Sharma maths class 12 chapter Differentiation exercise 10.5 question 18 sub question (ii)

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

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

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

Solution:

$y=u+v$

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

$u=x^{\sin x-\cos x}$

Take log

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

\begin{aligned} &\frac{d u}{d x}=\left[\frac{\sin x-\cos x}{x}+\log x(\sin x+\cos x) x^{\sin x-\cos x}\right. \\\\ &v=\frac{x^{2}-1}{x^{2}+1} \end{aligned}

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

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

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

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

Using (1) we get

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