#### Need solution for RD Sharma maths class 12 chapter Differential Equations exercise 21.7 question 45 sub question (vii)

Answer: $x+2+\log \left|\frac{(x y+2 x)^{2}}{9}\right|$

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

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

Solution:

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

Integrating both sides

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

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

Given that $y(1)=-1$ i.e. $y=-1$ when $x=1$

\begin{aligned} &\therefore-1=1+2 \log |(1)(1+2)|+c \\\\ &\Rightarrow 2 \log 3+c=2 \Rightarrow c=2-2 \log 3=2-\log 3^{2} \\\\ &\Rightarrow c=2-\log 9 \end{aligned}

Put in (1)

\begin{aligned} &y=x+2 \log |(x)(y+2)|+2-\log 9 \\\\ &{\left[\begin{array}{l} \therefore \log m+\log n=\log m n \\\\ \log m-\log n=\log \frac{m}{n} \end{array}\right]} \\\\ &\Rightarrow y=x+2+\log \left|\frac{(x y+2 x)^{2}}{9}\right| \end{aligned}