# Methods for solving nonhomogeneous system of ODEs

I have the system $$\mathbf{x}'=\begin{pmatrix}2&1\\1&2\end{pmatrix}\mathbf{x}+\begin{pmatrix}e^t\\t\end{pmatrix}.$$ The eigenvalues of the matrix are 1 and 3 with eigenvectors $$(1,-1)^T$$ and $$(1,1)^T$$ respectively. Thus, we have the fundamental matrix $$\Psi(t)=\begin{pmatrix}e^t & e^{3t}\\-e^t & e^{3t}\end{pmatrix}.$$ From here I used the method of variation of parameters to assume there's a solution $$\mathbf{x}=\Psi(t)\mathbf{u}(t)$$, where $$\mathbf{u}(t)$$ satisfies $$\Psi(t)\mathbf{u}'(t)=\mathbf{g}(t)$$. I solved this matrix equation and multiplied to find $$\mathbf{x}=c_1\begin{pmatrix}1\\-1\end{pmatrix}e^t+c_2\begin{pmatrix}1\\1\end{pmatrix}e^{3t}+\frac{1}{2}\begin{pmatrix}1\\-1\end{pmatrix}te^t-\frac{5}{12}\begin{pmatrix}1\\1\end{pmatrix}e^t-\frac{1}{2}\begin{pmatrix}1\\-1\end{pmatrix}t+\frac{1}{9}\begin{pmatrix}4\\-5\end{pmatrix}.$$ I wanted to do this same problem using the Laplace transform given $$\mathbf{x}(0)=\mathbf{0}$$. When I take the Laplace transform of the system and solve for $$\mathbf{X}(s)$$ I get $$\mathbf{X}(s)= \begin{pmatrix} s-2&-1\\ -1&s-2 \end{pmatrix}^{-1} \begin{pmatrix} (s-1)^{-1}\\ s^{-2}. \end{pmatrix}.$$ Performing this computation and taking the inverse Laplace transform, I get $$\mathbf{x}=\begin{pmatrix} \frac{1}{8}e^t+\frac{1}{8}e^{5t}-\frac{1}{4}e^t+t\\ e^t+\frac{2}{5}t+\frac{1}{2}e^{-t}+\frac{1}{50}e^{5t}-\frac{13}{25}. \end{pmatrix}$$ At this point I realized that there's no way this is the same answer. Does someone see where I'm going wrong or what I misunderstood about one of the methods?

For the first part, I will use this approach. We are given

$$\mathbf{x}'=\begin{pmatrix}2&1\\1&2\end{pmatrix}\mathbf{x}+\begin{pmatrix}e^t\\t\end{pmatrix}$$

The eigenvalues/eigenvectors are

$$\lambda_1 = 1, v_1 = \begin{pmatrix}-1 \\ 1 \end{pmatrix} \\ \lambda_2 = 3, v_2 = \begin{pmatrix}1 \\ 1 \end{pmatrix}$$

The Fundamental matrix is

$$X = \begin{pmatrix}-e^t & e^{3t} \\ e^t & e^{3t} \end{pmatrix}$$

We have $$x_p = X \int X^{-1} g~dt = \begin{pmatrix} \dfrac{e^t t}{2}+\dfrac{t}{3}-\dfrac{e^t}{4}+\dfrac{4}{9} \\ -\dfrac{e^t t}{2}-\dfrac{2 t}{3}-\dfrac{e^t}{4}-\dfrac{5}{9} \\ \end{pmatrix}$$

We can now write the solution as

$$\mathbf{x}(t) = c_1e^{\lambda_1 t} + c_2 e^{\lambda_2 t} + x_p = c_1 e^t\begin{pmatrix}-1 \\ 1 \end{pmatrix} + c_2 e^{3t}\begin{pmatrix}1 \\ 1 \end{pmatrix} + \begin{pmatrix} \dfrac{e^t t}{2}+\dfrac{t}{3}-\dfrac{e^t}{4}+\dfrac{4}{9} \\ -\dfrac{e^t t}{2}-\dfrac{2 t}{3}-\dfrac{e^t}{4}-\dfrac{5}{9} \\ \end{pmatrix}$$

Using the IC, $$\mathbf{x}(0)=\mathbf{0}$$, this reduces to

$$x(t) = \frac{e^t t}{2}+\frac{t}{3}+\frac{11 e^{3 t}}{36}-\frac{3 e^t}{4}+\frac{4}{9}\\ y(t) = \frac{e^t t}{2}-\frac{2 t}{3}+\frac{e^t}{4}+\frac{11 e^{3 t}}{36}-\frac{5}{9}$$

For the Laplace method, we have

$$\mathbf{X}(s)= \begin{pmatrix} s-2&-1\\ -1&s-2 \end{pmatrix}^{-1} \begin{pmatrix} \dfrac{1}{s-1}\\ \dfrac{1}{s^2} \end{pmatrix} = \begin{pmatrix} \dfrac{s-2}{(s-1) \left(s^2-4 s+3\right)}+\dfrac{1}{s^2 \left(s^2-4 s+3\right)} \\ \dfrac{s-2}{s^2 \left(s^2-4 s+3\right)}+\dfrac{1}{(s-1) \left(s^2-4 s+3\right)} \\ \end{pmatrix}$$

The final result from the inverse Laplace Transform is

$$x(t) = \frac{e^t t}{2}+\frac{t}{3}+\frac{11 e^{3 t}}{36}-\frac{3 e^t}{4}+\frac{4}{9}\\ y(t) = \frac{e^t t}{2}-\frac{2 t}{3}+\frac{e^t}{4}+\frac{11 e^{3 t}}{36}-\frac{5}{9}$$

Those two match $$\Large\color{\green}{\checkmark}$$.

• The sign errors happened while I was typing the question, not when I was doing the problem so I've edited them. I will try using the same IC to see if things start to match up though Commented Jun 17, 2021 at 21:25