#### Provide solution for RD Sharma maths Class 12 Chapter 21 Differential Equation Exercise 21.10 Question 31 textbook solution.

Answer : $\frac{y(x-1)^{3}}{x+1}\left(x^{2}-6 x+8 \log |x+1|\right)+C$

Hint : To solve this equation we use $\frac{dy}{dx}+Py=Q$ where P,Q are constnats.

Give : $\left(x^{2}-1\right) \frac{d y}{d x}+2(x+2) y=2(x+1)$

Solution :

\begin{aligned} &\frac{d y}{d x}+\frac{2(x+2)}{x^{2}-1} y=\frac{2}{x-1} \\ &=\frac{d y}{d x}+P y=Q \\ &P=\frac{2(x+2)}{x^{2}-1}, Q=\frac{2}{x-1} \end{aligned}

$I\, f$ of differential equation is

\begin{aligned} &I f=e^{\int \frac{2(x+2)}{x^{2}-1} d x} \\ &=e^{\int\left(\frac{2 x}{x^{2}-1}+\frac{4}{x^{2}-1}\right) d x} \\ &=e^{\int \ln \left|x^{2}-1\right|+4 \times \frac{1}{2} \ln \left|\frac{x-1}{x+1}\right|} \\ &=e^{\int \ln \left|x^{2}-1\right|+2 \ln \left|\frac{x-1}{x+1}\right|} \end{aligned}

\begin{aligned} &=e^{\int \ln \left|x^{2}-1\right|+\ln \left|\frac{(x-1)^{2}}{(x+1)^{2}}\right|} \\ &=e^{\ln \left(x^{2}-1\right) \frac{(x-1)^{2}}{(x+1)^{2}}} \\ &=e^{\ln (x+1)(x-1) \frac{(x-1)^{2}}{(x+1)^{2}}} \\ &=e^{\ln (x-1) \frac{(x-1)^{2}}{(x+1)}} \end{aligned}

\begin{aligned} &=e^{\ln \frac{(x-1)^{3}}{(x+1)}} \\ &=\frac{(x-1)^{3}}{x+1} \\ &y I f=\int \text { QIf } d x+C \end{aligned}

\begin{aligned} &=y \frac{(x-1)^{3}}{x+1}=\int\left(\frac{2}{x-1}\right) \frac{(x-1)^{3}}{x+1} d x+C \\ &=2 \int \frac{(x-1)^{3}}{x+1} d x+C \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \quad[x+1=t, d x=d t] \\ &=2 \int \frac{\left(t^{2}+4-4 t\right)}{t} d t \\ &=2\left[\frac{t^{2}}{2}\right]+8 \log |t|-8 t+C \end{aligned}

\begin{aligned} &=t^{2}+8 \log |t|-8 t+C \\ &=(x+1)^{2}+8 \log |x+1|-8(x+1)+C \\ &=x^{2}+2 x+1+8 \log |x+1|-8 x-8+C \\ &=y \frac{(x-1)^{3}}{(x+1)}\left(x^{2}-6 x+8 \log |x+1|\right)+C \end{aligned}