We start with the given differential equation
dxdy=(x−y)2.
Because the right-hand side contains the combination x−y, it is natural to introduce the substitution
v=x−y.
From this we have y=x−v, and on differentiating both sides with respect to x we obtain
dxdy=1−dxdv.
Now we substitute y=x−v and dxdy=1−dxdv into the original equation. We get
1−dxdv=v2.
Rearranging, we obtain
dxdv=1−v2.
Next, we separate the variables. Writing all terms involving v on the left and all terms involving x on the right, we get
1−v2dv=dx.
To integrate we recall the standard integral formula
∫1−v2dv=21ln1−v1+v+C,
where C is the constant of integration. Using this result, integrating both sides gives
21ln1−v1+v=x+C1.
Multiplying by 2 we have
ln1−v1+v=2x+C2,
where C2=2C1 is another constant of integration.
At this stage we impose the initial condition. The problem states that y(1)=1, and since v=x−y, at x=1 we have
v(1)=1−1=0.
Substituting x=1 and v=0 in the integrated equation gives
ln1−01+0=2(1)+C2.
The logarithm on the left simplifies to ln1=0, so
0=2+C2⟹C2=−2.
Replacing C2 by −2 in our integrated equation we get
ln1−v1+v=2x−2=2(x−1).
Finally we return to the original variables by recalling that v=x−y. Substituting gives
ln1−x+y1+x−y=2(x−1).
Using the logarithmic identity lnba=−lnab, we can equivalently write the result as
−ln1+x−y1−x+y=2(x−1).
This matches exactly with Option B.
Hence, the correct answer is Option B.