Solving : $ \left(1+x^{2}\right) \frac{d y}{d x}+2 x y=4 x^{2} $ Solve the following ODE : $$
\left(1+x^{2}\right) \frac{d y}{d x}+2 x y=4 x^{2}
$$
After rearrangement I get : $$\frac{dy}{dx}=\frac{4x^{2}-2xy}{1+x^{2}}$$ please help me after this step.

This is a linear DE. Rearranging this we have that
\begin{align*}
&\frac{dy}{dx} + \frac{2x}{1 + x^2}\cdot y = \frac{4x^2}{1 + x^2}\\
\implies&\frac{dy}{dx} + P(x)\cdot y = Q(x)
\end{align*}
Now the integrating factor is $$ I =  e^{\int{{2x}/{1 + x^2}}dx} =  e^{{{\ln(1 + x^2)}}} = 1 + x^2$$
On multiplication by the integrating factor and on integrating we obtain this
$$y \cdot I = \int Q(x) \cdot I dx + C  $$
And on substitution of $I$, we have that
\begin{align*}
&~y (1 + x^2) = \int 4x^2 + C\\
\implies &~ y \cdot (1 + x^2) = \frac{4}{3} \cdot x^3 + C
\end{align*}
