How to solve the differential equation $(1 + t^2) \dot{y} = 2yt + t^2 + t^4$? I have the following differential equation that I try to solve:
\begin{equation}
(1 + t^2) \dot{y} = 2yt + t^2 + t^4
\end{equation}
what I do is to first put all $t$'s on one side:
\begin{equation}
\dot{y} =   \frac{2yt + t^2 + t^4}{1+t^2}
\end{equation}
and then to integrate both sides
\begin{equation}
\int \dot{y} dy = \int \frac{2yt + t^2 + t^4}{1+t^2} dt
\end{equation} 
and well now I am stuck because I don't really know how to evaluate these complex integrals. I think I should use the method by parts but whenever I try I think I am making mistake somewhere and I am not sure if my steps up till now are correct as well. 
 A: Rewrite the equation:
$$y'-\frac{2t}{1+t^2}y = \frac{t^4+t^2}{t^2+1} = t^2.$$
The standard technique for linear, first-order DE's is to multiply by the integrating factor 
$$\mu = \exp\left(\int p(t) \; dt\right)  = \exp\left(\int \frac{-2t}{1+t^2} \; dt\right)$$
$$=\exp(-\ln(t^2+1)) = \frac{1}{t^2+1}.$$
So now the DE is
$$\frac{1}{t^2+1}y' + \frac{-2t}{(1+t^2)^2}y = \frac{t^2}{1+t^2}. $$
The left side is the derivative of $\frac{1}{t^2+1}y$, so you have
$$\frac{y}{t^2+1} = \int \frac{t^2}{t^2+1} \; dt.$$
A: The homogeneous equation is separable,
$$\frac{\dot y}{y}=\frac{2t}{t^2+1}$$ and integrates as
$$\log y=\log(t^2+1)+C$$ or
$$y=C(t^2+1).$$
Now by variation of the constant, after simplification,
$$(t^2+1)^2C'(t)=t^2+t^4$$ then
$$C'(t)=\frac{t^2}{t^2+1}$$ and
$$C(t)=t-\arctan t+D.$$
Finally,
$$y(t)=(t-\arctan t+D)(t^2+1).$$
A: $$(1 + t^2) \dot{y} = 2yt + t^2 + t^4
$$
$$(1 + t^2) y'-2yt= t^2 + t^4
$$
It's of the form $(\frac fg)'=\frac {f'g-fg'}{g^2}$
$$\left(\frac {y}{t^2+1}\right)'= \frac {t^2}{1 + t^2}
$$
Integrate
$$\frac {y}{t^2+1}= t-\arctan (t)+K
$$
$$ {y(t)}= {(t^2+1)}(t-\arctan (t)+K
)$$
A: Just to illustrate the method I proposed.
We first choose a vector space where we can express differentiation and multiplication by polynomials as linear operators. One such space is the space of polynomials. If we vectorize coefficients of polynomials in increasing order the operators differentiation $({\bf D})$ and multiplication by $t$ $({\bf X})$ will be represented by:
$${\bf D}=\left[\begin{array}{cccccc} &1& & & & \\ & &2& & & \\ & & &3& & \\ & & & &4& \\ & & & & &5\\ & & & & & \end{array}\right],{\bf X}=\left[\begin{array}{cccccc} & & & & & \\1& & & & & \\ &1& & & & \\ & &1& & & \\ & & &1& & \\ & & & &1& \end{array}\right]$$
Now we can express our problem as a matrix equation system:
$${\bf Mx=b}$$
where $\bf b$ is vector for function $t^2+t^4$ and 
$${\bf M}=({\bf I}+{\bf X}^2){\bf D}-2{\bf X}$$
Furthermore since this is a linear equation system which is within linear least square problems, we can add a regularization term to test out how our solution performs for different parameter values (the $D$ constant in Yves' solution and $K$ in Isham's).
solving this equation system for a vectorspace up to $x^{15}$ and for constant term $c_0\in [-1,1]$:

