The solution of the differential equation,
Question:

The solution of the differential equation, $\frac{\mathrm{d} y}{\mathrm{~d} x}=(x-y)^{2}$, when $y(1)=1$, is :

1. (1) $\log _{\mathrm{e}}\left|\frac{2-x}{2-y}\right|=x-y$

2. (2) $-\log _{\mathrm{e}}\left|\frac{1-x+y}{1+x-y}\right|=2(x-1)$

3. (3) $-\log _{\mathrm{e}}\left|\frac{1+x-y}{1-x+y}\right|=x+y-2$

4. (4) $\log _{\mathrm{e}}\left|\frac{2-y}{2-x}\right|=2(y-1)$

Correct Option: , 2

Solution:

The given differential equation

$\frac{d y}{d x}=(x-y)^{2}$ …….(1)

Let $x-y=t \Rightarrow 1-\frac{d y}{d x}=\frac{d t}{d x}$

$\Rightarrow \quad \frac{d y}{d x}=1-\frac{d t}{d x}$

Now, from equation (1)

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

$\Rightarrow \quad 1-t^{2}=\frac{d t}{d x} \Rightarrow \int d x=\int \frac{d t}{1-t^{2}}$

$\Rightarrow \quad-x=\frac{1}{2 \times 1} \ln \left|\frac{t-1}{t+1}\right|+c$

$\Rightarrow \quad-x=\frac{1}{2} \ln \left|\frac{x-y-1}{x-y+1}\right|+c$

$\because$ The given condition $y(1)=1$

$-1=\frac{1}{2} \ln \left|\frac{1-1-1}{1-1+1}\right|+c \Rightarrow c=-1$

Hence, $2(x-1)=-\ln \left|\frac{1-x+y}{1-y+x}\right|$