We have the differential equation y2dx+(x−y1)dy=0.
First we isolate dx on one side. Dividing every term by dy, we get
y2dydx+x−y1=0.
Transposing the last two terms to the right gives
y2dydx=−x+y1.
Now we divide both sides by y2 so that the coefficient of dydx becomes 1:
dydx=−y2x+y31.
We can rewrite this as a linear differential equation in the standard form dydx+P(y)x=Q(y) by bringing the term with x to the left:
dydx+y2x=y31.
Here P(y)=y21 and Q(y)=y31.
The integrating factor (I.F.) for such an equation is obtained from the formula I.F.=e∫P(y)dy.
We compute the integral of P(y):
∫y21dy=∫y−2dy=−y−1.
Thus
I.F.=e−y−1=e−1/y.
Multiplying the entire differential equation by this integrating factor produces
e−1/ydydx+e−1/yy2x=e−1/yy31.
Because dyd(e−1/y)=e−1/y⋅y21, the left-hand side is precisely the derivative of the product xe−1/y with respect to y. Hence we can write
dyd(xe−1/y)=e−1/yy31.
Integrating both sides with respect to y gives
∫dyd(xe−1/y)dy=∫e−1/yy31dy.
The integral on the left is straightforward:
xe−1/y=∫y−3e−1/ydy+C,
where C is the constant of integration. To evaluate the right-hand integral we set a substitution.
Let t=−y1, so that dt=y21dy and hence y−2dy=dt. We rewrite the integrand y−3e−1/ydy as y−1(y−2dy)et=−y1etdt=−tetdt.
Therefore
∫y−3e−1/ydy=∫(−tet)dt=−∫tetdt.
Using the integration by parts formula ∫tetdt=tet−et, we obtain
−∫tetdt=−(tet−et)=−tet+et.
Substituting back t=−y1 gives
−tet+et=(y1+1)e−1/y.
Placing this result in the earlier equation yields
xe−1/y=(1+y1)e−1/y+C.
Since the factor e−1/y is common, we divide through by it to make x explicit:
x=1+y1+Ce1/y.
We now apply the initial condition. When x=1 we are told y=1, so
1=1+11+Ce1/1⟹1=1+1+Ce,
which simplifies to
Ce=−1⟹C=−e1.
Substituting this value of C back into the general solution gives
x=1+y1−e1e1/y=1+y1−ey1−1.
The problem asks for the value of x when y=2. Substituting y=2 (so y1=21) we have
x=1+21−e21−1=1+21−e−1/2.
Since e−1/2=e1, the expression becomes
x=23−e1.
Hence, the correct answer is Option A.