Given, differential equation is dxdy+(x2)y=x
This is a linear differential equation of type dxdy+Py=Q, where P&Q are the functions of x or constants.
Thus, P=\frac{2}{x}&Q=x
The integrating factor I.F.=e∫Pdx
=e∫x2dx=e2lnx
=elnx2=x2.
The solution of the linear differential equation is y×(I.F.)=∫(Q×I.F.)dx+C
So, the solution of the given differential equation is
yx2=∫x⋅x2dx+C
⇒x2y=∫x3dx+C
Using ∫xndx=n+1xn+1, we get
⇒x2y=4x4+C
Since y(1)=1
⇒1⋅1=41+C
⇒C=43
⇒x2y=4x4+43
⇒y=4x2+4x23.