#### Please solve RD Sharma class 12 chapter Differential Equations exercise 21.7 question 41 maths textbook solution

Answer: $y=\log \left[\frac{(y+2)^{2} x}{8}\right]$

Hint: Separate the terms of x and y and then integrate them.

Given: $x y \frac{d y}{d x}=y+2, y(2)=0$

Solution:

\begin{aligned} &x y \frac{d y}{d x}=y+2 \\\\ &\Rightarrow \frac{y d y}{y+2}=\frac{d x}{x} \end{aligned}

Integrating both sides

\begin{aligned} &\int \frac{y}{y+2} d y=\int \frac{d x}{x} \\\\\ &\Rightarrow \int \frac{(y+2)-2}{(y+2)} d y=\int \frac{d x}{x} \end{aligned}

\begin{aligned} &\Rightarrow \int\left(1-\frac{2}{y+2}\right) d y=\int \frac{d x}{x} \\\\ &\Rightarrow y-2 \log (y+2)=\log |x|+c \end{aligned}            ....................(1)

$y(2)=0 \text { at } x=2, y=0$

Put in (1)

\begin{aligned} &\Rightarrow 0-2 \log |0+2|=\log |2|+c \\\\ &\Rightarrow-2 \log 2=\log 2+c \\\\ &\Rightarrow c=-3 \log 2 \end{aligned}

Put in (1), we get

\begin{aligned} &y-2 \log (y+2)=\log |x|-3 \log 2 \\\\ &\Rightarrow y=\log |y+2|^{2}+\log |x|-\log 2^{3} \\\\ &\Rightarrow y=\log |y+2|^{2}+\log |x|-\log 8 \\\\ &\Rightarrow y=\log \left[\frac{(y+2)^{2} x}{8}\right] \end{aligned}