Solution:
Key idea: A first-order linear equation can be written as dxdy+Py=Q, where P and Q are functions of x only. Its integrating factor is IF=e∫Pdx. Multiplying the equation by the IF turns the left side into dxd(y⋅IF), so the solution is y⋅IF=∫Q⋅IFdx+c, where c is the arbitrary constant.
Step 1 — Write the equation in standard form.
We divide x3dy+(xy−1)dx=0 by x3dx (with x>0, since the data are at positive x) and rearrange.
dxdy+x21y=x31
Step 2 — Find the integrating factor.
Here P=x21, whose integral is −x1.
IF=e−1/x
Step 3 — Set up the integral.
We multiply Q by the IF.
ye−1/x=∫x3e−1/xdx
We put t=−x1, so that dt=x2dx.
Also x1 is −t, so x3dx becomes −tdt.
ye−1/x=∫−tetdt
Step 4 — Integrate.
Integration by parts gives ∫tetdt=(t−1)et, so the integral is (1−t)et.
ye−1/x=(1+x1)e−1/x+c
Dividing by e−1/x gives the general solution.
y=1+x1+ce1/x
Step 5 — Find c from the given value.
At x=21 we have x1 equal to 2, and y is 3−e.
3−e=1+2+ce2
ce2=−e
c=−e1
So the particular solution is:
y=1+x1−ex1−1
Step 6 — Find y at x=1.
We put x=1; the exponent x1−1 becomes 0.
y=1+1−e0
y=1
Therefore, the general solution is y=1+x1+ce1/x, and for the given condition y is 1 when x is 1.