A standard first-order linear ODE:
>dxdy+P(x)y=Q(x).>
Use an integrating factor
>I(x)=exp(∫P(x)dx).>
Then multiply both sides by I(x):
>I(x)dxdy+I(x)P(x)y>=>(I(x)y)′>=>I(x)Q(x).>
Integrate and solve for y:
>I(x)y>=>∫I(x)Q(x)dx,>>y>=>e−∫P(x)dx>[>∫>e∫P(x)dxQ(x)dx>+C>].>
Bernoulli equation:
dxdy+P(x)y=Q(x)yn
can be turned into a linear ODE by the transformation u=y1−n, etc.
Question: Solve
dxdy+xy=x21,y(1)=1,x>0.