Converting Second Order Linear Equations to First Order Linear Equations $\color{green}{\text{Question}}$:
How can the following $\color{blue}{\text{second-order linear equation}}$ be converted into a $\color{blue}{\text{first-order linear equation}}$?

This is our second-order linear Equation:
  $${y}''-2y'+2y=e^{2t}\sin t$$

$\color{green}{\text{I think}\ldots}$


*

*This equation contains the dependent variable and the independent variables.

*Equation is not complete.

*Equation is not homogeneous.
How can I convert it to a first-order linear equation?
Thank you for any hint. 
 A: Note that if $\alpha$ and $\beta$ are the roots of $x^2+ax+b=0$, we have $a=-(\alpha+\beta)$ and $b=\alpha\beta$.
The equation $y''+ay'+by=f(t)=y''-(\alpha+\beta)y'+\alpha\beta y$.
We now rewrite the left-hand side as $y''-\alpha y'-\beta y' +\alpha\beta y= (y''-\alpha y')-\beta(y' -\alpha y)=f(t)$ and substitute $z=y'-\alpha y$   so that $z'=y''-\alpha y'$ and finally the transformed equation becomes $$z'-\beta z=f(t).$$
Once $z=g(t)$ is known, $y$ is obtained from $y'-\alpha y=g(t)$.
So one second order equation can be solved by solving two first order equations.
A: Look at the underlying homogeneous equation $y'' - 2y' + 2= 0$; it's characteristic polynomial equation is the quadratic $\lambda^2 -2\lambda + 2 = 0$; the discriminant of this quadratic is $(-2)^2 - 4(2) = 4 - 8 = -4 < 0$, so the equation has a pair of complex confugate roots, they are in fact $1 \pm i$.  Thus the (real) dimension of the solution space is $2$, and it can't be reduced.  Therefore, since the equation is intrinsically possessed of two degrees of freedom, typically manifested as $y(0)$ and $y'(0)$, the only way to lower the order is by expressing the original equation as a first order system on the two-dimensional space $\Bbb R^2$.  Thus we set 
$z(t) = y'(t)$,
so that
$z'(t) = 2z(t) - 2y(t) + e^{2t} \sin t$.
In vector-matrix form this may be written as
$\begin{pmatrix} y(t) \\ z(t) \end{pmatrix}' = \begin{bmatrix} 0 & 1 \\ -2 & 2 \end{bmatrix}\begin{pmatrix} y(t) \\ z(t) \end{pmatrix} + \begin{pmatrix} 0 \\ e^{2t} \sin t \end{pmatrix}$.
And voila!  A first order system equivalent in all ways to the original second order ODE!
Hope this helps!  Cheerio!
A: Depending on why you need a first-order differential equation, this might be the answer you're searching for, and it might not. It's what we did in introductory numerical solving of differential equations, and it works if what you want to do is to apply the Euler method or Runge-Kutta, or something of the sort.

Set $z = y'$. Then you have a system of first-order equations
$$\begin{align}
y' &= z\\\\
z' &= 2z+2y + e^{2t}\sin t
\end{align}$$
