Solving easy first-order linear differential question. Question
Solve $y'=2x(1+x^2-y)$.
My attempt
Rearranging gives $y'+2xy=2x(1+x^2)$. Thus, the integrating factor is $e^{\int2x\,dx}=e^{x^2}$ and multiplying the equation throughout by this gives
$e^{x^2}y'+2xe^{x^2}y=2xe^{x^2}(1+x^2)\Rightarrow\dfrac{d}{dx}{e^{x^2}y}=2xe^{x^2}+2x^3e^{x^2}$ which is separable.
Then,
$e^{x^2}y=\int2xe^{x^2}\,dx+2\int x^3e^{x^2}\,dx=e^{x^2}+2\int x^3e^{x^2}\,dx$
Is this correct and is there some easy way of working out $\int x^3e^{x^2}\,dx$? Wolfram has it as $e^{x^2}(x^2-1)$.
Maybe I write $2x^3e^{x^2}$ as $x(2x^2e^{x^2})$?

$$y'+2xy=2x(1+x^2)$$
now we will find the complementary solution as follow
$$y'+2xy=0$$
$$\frac{y'}{y}=-2x$$
$$\log y=-x^2+C_1$$
hence
$$y_c=Ce^{-x^2}$$
to find the paticular solution ,assume $y_p=Ax^3+Bx^2+Cx+D$
then find the $A,B,C,D$
