# Non-homogeneous second order ODE with constant coefficients

Take a non-homogeneous second order ode with constant coefficients $$y''(t)+py'(t)+qy(t)=f(t),$$ the solutions of this equation have the following form $$t\mapsto y_{\text{part}}(t)+A y_1(t)+By_2(t),$$ where $y_{\text{part}}$ is a particular solution of this non-homogeneous second order ode and $y_1$ and $y_2$ are independent solutions of the associated homogeneous second order ode. The question is: how to determine $y_{\text{part}}$?

The first option is the variation of parameters: one can choose to find $y_{\text{part}}$ with the following form $t\mapsto A(t) y_1(t)+B(t)y_2(t),$ where $A$ and $B$ satisfy the following equation $$A'(t) y_1(t)+B'(t)y_2(t)=0, \tag{1}$$ and $$A'(t) y_1'(t)+B'(t)y_2'(t)=f(t). \tag{2}$$ If one knows explicitly $y_1$ and $y_2$, one could find $A$ and $B$ by integration.

The second option is to put this second order ode in the framework of first order ode. One can set $$Y(t)=\begin{pmatrix} y(t) \\ y'(t) \end{pmatrix},$$ then $Y$ satisfies the following first order ode: $$Y'(t) = \begin{pmatrix} 0 & 1 \\ q & p \end{pmatrix} Y(t) + \begin{pmatrix} 0 \\ -f(t) \end{pmatrix}.$$ Then the general solution of this ode can be written as $$Y(t) = \exp\left( \begin{pmatrix} 0 & 1 \\ q & p \end{pmatrix} t\right) Y_0 + \int_0^t \exp\left( \begin{pmatrix} 0 & 1 \\ -q & -p \end{pmatrix} (t-s)\right) \begin{pmatrix} 0 \\ -f(s) \end{pmatrix}\text{d}s$$

My question is: how are these two options related? In particular, can we explain where does the hypothesis $(1)$ come from with the second option?

• Have you ever seen the method of variation of parameters for ode of order $\ge 3$? – user37238 Jan 18 '17 at 8:52