I'm trying to find the solution to a linear 2D ODE with a time-dependent right-hand side, but I'm getting stuck with apparently finding the wrong solution without knowing why.
Consider $\vec{X}(t) = (X_1(t), X_2(t))$ which satisfies
$\frac{d\vec{X}(t)}{dt} = K(t) \vec{X}(t)$ with $K(t) = \begin{pmatrix} 0 & k_1(t) \\ k_2(t) & 0 \end{pmatrix}$.
Now the general solution should be
$\vec{X}(t) = \exp{\left( \int_{0}^{t} K(t') dt' \right)}\vec{X}(0) $,
where the matrix integral gives a matrix of which the components are the integrated components of the original matrix.
Assume that the integrals$ \int_{0}^{t} dt' k_i(t) \equiv \tilde{k}_{i}(t)$ are well-defined functions on $[0, \infty]$. The form of $K(t)$ implies that $K(t)^2 = k_1(t) k_2(t) I \equiv \kappa(t)^2 I$. The same applies to the integrated matrix $\tilde{K}(t) = \int_{0}^{t} dt' K(t)$ with all $\tilde{k}_i$'s and $\tilde{\kappa}$. The exponential becomes
$\exp{\left( \int_{0}^{t} K(t') dt' \right)} = \cosh(\tilde{\kappa}(t)) I + \frac{1}{\tilde{\kappa}(t)} \sinh(\tilde{\kappa}(t)) K$.
Finally, the solutions are
$X_1(t) = \cosh(\tilde{\kappa}(t)) X_1(0) + \sqrt{\frac{\tilde{k}_1(t) }{\tilde{k}_2(t) }} \sinh(\tilde{\kappa}(t)) X_2(0) \\ X_2(t) = \cosh(\tilde{\kappa}(t)) X_2(0) + \sqrt{\frac{\tilde{k}_2(t) }{\tilde{k}_1(t) }} \sinh(\tilde{\kappa}(t)) X_1(0) $.
However, when I check this solution, clearly the original differential equation is not satisfied in general.
What is wrong with my argument?