Rearranging the given equation into standard linear form:
dxdy−xy=ex2/2
This is a first-order linear differential equation of the form dxdy+P(x)y=Q(x), where P(x)=−x and Q(x)=ex2/2.
Finding the Integrating Factor:
I.F.=e∫P(x)dx=e∫−xdx=e−x2/2
Using the solution formula y×I.F.=∫Q(x)×I.F.dx+C, we get:
y⋅e−x2/2=∫ex2/2⋅e−x2/2dx+C
Since ex2/2⋅e−x2/2=e0=1, this simplifies to:
y⋅e−x2/2=∫1dx+C
y⋅e−x2/2=x+C
Multiplying both sides by ex2/2:
y=(x+C)ex2/2
This is the general solution.
Applying the initial condition y(0)=1:
1=(0+C)e0
C=1
The particular solution is:
y=(x+1)ex2/2