Let x+y=t⇒1+dxdy=dxdt.
Therefore, the given equation becomes (t−2t−1)(dxdt−1)=t+2t+1 ⇒dxdt−1=(t+2t+1)(t−1t−2) ⇒dxdt=t2+t−2t2−t−2+1 ⇒dxdt=t2+t−22t2−4 ⇒t2−2t2+t−2dt=2dx ⇒(1+t2−2t)dt=2dx
On integrating, we get t+21log∣∣t2−2∣∣=2x+c ⇒(x+y)+21log∣∣(x+y)2−2∣∣=2c...(1)
Given, y=1, when x=1, therefore log2=2c.
Substituting the value of c in (1), we get 2(y−x)+log∣∣(x+y)2−2∣∣=log2 ⇒2(y−x)+log∣∣2(x+y)2−2∣∣=0. ∴k=2