Solving a simple system of ode Hi guys I was solving this fairly simple system, but for final answer I got something weird and just wanted to check if this was normal.
$$
  A=\begin{pmatrix}
0 & 0\\
1 & t\\
  \end{pmatrix}
$$
and $\overline{x}^T = (x(t), y(t))$ then we want to solve $\dot{\overline{x}}=A\overline{x}$
what I did is treat them as two equations
\begin{align*}
x'=0\\
y'=x+yt
\end{align*}
From the first we got $x=c$ where $c$ is a constant then we can plug that in the second equation
$$y'=c+yt$$
then we can solve this using integration factor $u = e^{-1/2 t^2}$. 
Thus we get 
$$e^{-1/2 t^2}y' -te^{-1/2 t^2}y =c e^{-1/2 t^2}$$
Then we can integrate to obtain $e^{-1/2 t^2}y = \int c e^{-1/2 t^2}$. I think this looks weird because I cannot solve the integral and was hoping someone more experience take a look and tell me if this seems correct. Thank you!
 A: We rearrange our differential equation $y'=c+yt$.
$$\frac{dy}{dt}-ty=c$$
Now it is in the general form of a first order linear non-homogeneous ODE:
$$\frac{dy}{dt}+P(t)y=Q(t)$$
Hence our integrating factor is:
$$\mu(t)=e^{\int P(t)~dt}$$
$$\mu(t)=e^{\int -t~dt}$$
Note that it is not neccessary to consider the constant of integration:
$$\mu(t)=e^{-\frac{t^2}{2}}$$
Hence, your integrating factor was not correct.
We now multiply both sides by our integrating factor $\mu(t)$.
$$e^{-\frac{t^2}{2}} \frac{dy}{dt}-t e^{-\frac{t^2}{2}}y =ce^{-\frac{t^2}{2}} $$
After substituting $-e^{-\frac{t^2}{2}} t=\frac{d}{dt} \left(e^{-\frac{t^2}{2}}\right)$and applying the reverse product rule, we obtain:
$$\int \frac{d}{dt} \left(e^{-\frac{t^2}{2}} y\right)~dt=\int {ce^{-\frac{t^2}{2}}}~dt$$
$$e^{-\frac{t^2}{2}} y=\int {ce^{-\frac{t^2}{2}}}~dt$$
We notice that $\int ce^{-\frac{t^2}{2}}~dt$ is not solvable in terms of elementary functions. We can either evaluate this by using the definition of the error function $\text{erf} (x)$ or by using Wolfram Alpha.
We evaluate this to:
$$\int c e^{-\frac{t^2}{2}}~dt=c \sqrt{\frac{\pi}{2}} \text{erf} \left(\frac{t}{\sqrt{2}}\right)+k$$ 
Where $k$ is the arbitrary constant of integration. Hence,
$$e^{-\frac{t^2}{2}} y=c \sqrt{\frac{\pi}{2}} \text{erf} \left(\frac{t}{\sqrt{2}}\right)+k$$
Therefore, our general solution is:
$$y(t)=e^{\frac{t^2}{2}}\left(c \sqrt{\frac{\pi}{2}} \text{erf} \left(\frac{t}{\sqrt{2}}\right)+k\right)$$
Please do not hesitate to ask if you have any doubts or questions.
A: It was already quite good. I am starting after you multiplied by $u$.
$$\begin{align} e^{-1/2 t^2}y' -te^{-1/2 t^2}y &=c e^{-1/2 t^2} \\
\Longleftrightarrow e^{-t^2/2}y' +(e^{-t^2/2})'y &=c e^{-t^2/2} \\
\Longleftrightarrow (e^{-t^2/2}y)' &=c e^{-t^2/2}  \\
\Longleftrightarrow e^{-t^2/2}y&=\int ce^{-t^2/2}=c\sqrt{\frac{\pi}{2}} \text{erf}\left( \frac{t}{\sqrt{2}} \right)+C \\
\Longleftrightarrow y&=e^{t^2/2} \left( c\sqrt{\frac{\pi}{2}} \text{erf}\left( \frac{t}{\sqrt{2}} \right)+C \right)\end{align}$$


*

*Second line: $-e^{-t^2/2}t=\frac{d}{dt} (-e^{-t^2/2})$ 

*Third line: Product rule

*Fourth line: Integrating both sides

