Since you've now figured out how to use DSolve[]
, allow me to present another tool you can use.
As you might be aware, the one-dimensional first order ODE
$$y^\prime(t)=a y(t)$$
has a solution that can be expressed as $y(t)=C\exp(a t)$, where $C$ is determined through an appropriate initial condition.
In complete analogy, a first order ODE with matrix coefficient $\mathbf A$:
$$\mathbf y^\prime(t)=\mathbf A\mathbf y(t)$$
can be expressed in terms of the matrix exponential. Mathematica has this built-in as MatrixExp[]
, so that the supposed result of
DSolve[{X'[t] == {{1, 1}, {4, -2}}.X[t], X[0] == {C[1], C[2]}}, X[t], t]
can in fact be immediately written down as
y[t_] = MatrixExp[{{1, 1}, {4, -2}} t, {C[1], C[2]}]
and you can easily check that this satisfies the ODE:
D[%, t] - {{1, 1}, {4, -2}}.% // Simplify
{0, 0}
DSolve
and give it a try, then report back with your code attempts. $\endgroup$