Find particular solution of system of linear ODE I would like to solve the ODE system
$$
\begin{pmatrix}x'(t)\\y'(t)\end{pmatrix}=\begin{pmatrix}0 & 12\\3 & 0\end{pmatrix}\begin{pmatrix}x(t)\\y(t)\end{pmatrix}-\begin{pmatrix}36\\9\end{pmatrix}
$$
with initial conditions $x(0)=3$ and $2y(1)-x(1)=7$.

I already determined the fundamental matrix for the homogeneous problem to be
$$
\begin{pmatrix}2e^{6t} & -2e^{-6t}\\e^{6t} & e^{-6t}\end{pmatrix}.
$$
My problem is how to find a particular solution $x_p,y_p$ .
Is it suitable to make the ansatz $x_p(t)=c_1$ and $y_p(t)=c_2$ for constants $c_1,c_2$?
Then I get $x_p=y_p=3$ and the general solution
$$
\begin{align}
x(t)&=2C_1e^{6t}-2C_2e^{-6t}+3,\\
y(t)&=C_1e^{6t}+C_2e^{-6t}+3.
\end{align}
$$
Using the initial value conditions, my solution is
$$
\begin{align}
x(t)&=2e^6\left(e^{6t}-e^{-6t}\right)+3,\\
y(t)&=e^6\left(e^{6t}+e^{-6t}\right)+3.
\end{align}
$$
 A: Here's a straightforward way to solve a system of the form $$\begin{bmatrix}\dot x \\ \dot y\end{bmatrix}=A\begin{bmatrix}x\\y\end{bmatrix}+\mathbf w$$ with boundary conditions where $A$ is a real 2x2 matrix with two distinct real eigenvalues, $\lambda_1 $and $\lambda_2,$ and $\mathbb w$ is a column vector consisting of two real numbers.Let $P$ be an inverible  real 2x2 matrix such that $$P^{-1}AP= \text{diag}(\lambda_1,\lambda_2)$$. Let $$\begin{bmatrix}x\\y\end{bmatrix}=P\begin{bmatrix}u_1\\u_2\end{bmatrix}$$ Then $$\begin{bmatrix}\dot{u_1}\\ \dot{u_2}\end{bmatrix}=\begin{bmatrix}\lambda_1u_1\\ \lambda_2u_2\end{bmatrix}+P^{-1}\mathbf w$$ Write $$P^{-1} \mathbf w=\begin{bmatrix}k_1\\k_2\end{bmatrix}$$ Then the general solution is $$u_1=c_1e^{\lambda_1t}-k_1/\lambda_1,u_2=c_2e^{\lambda_2t}-k_2/\lambda_2$$ Thus $$x=p_{11}(c_1e^{\lambda_1t}-k_1/\lambda_1)+p_{12}(c_2e^{\lambda_2t}-k_2/\lambda_2)$$ $$y=p_{21}(c_1e^{\lambda_1t}-k_1/\lambda_1)+p_{22}(c_2e^{\lambda_2t}-k_2/\lambda_2)$$ By putting $t$ =0 or 1, we can find $x(0),x(1),y(0),y(1).$ Thus the given boundary conditions give us 2 linear equations in $c_1,c_2$. Solve these, and put those values into our expressions for $x$ and $y$.
