Solution to a given matrix initial value problem 
Consider the IVP : $y''(x)+A \cdot y(x)=0,$ where $A$ is an $n \times n$ positive definite matrix. Also $y(0)=c_0$ and $y'(0)=c_1,$ where $c_0 , c_1 \in \mathbb{R}^n$ are constant vectors.

Since $A$ is positive definite, it possesses a square toot. The solution is given by 
$$y(x)=C \cos \sqrt{A}x+ D  \sin \sqrt{A}x.$$
Also, 
$$y'(x)=-C \sqrt{A} \sin \sqrt{A}x+ D \sqrt{A}  \cos \sqrt{A}x.$$
Using $y(0)=c_0$ and $y'(0)=c_1,$ I got $C=c_0$ and $D \sqrt{A}=c_1.$
Is my approach correct ? Can I just write $D=c_1 \cdot  (\sqrt{A})^{-1}$ ? 
Any help is much appreiciated.
 A: Since $A$ is symmetric positive definite it has an orthogonal decomposition $A = Q^TDQ$ where $Q$ is orthogonal and $D$ is diagonal with positive diagonal entries $\lambda_1, \ldots, \lambda_n$.  Then we can write the equation
$$
y''(x) + Q^TDQ y(x) \;\; = \;\; 0 
$$
which multiplying on the left by $Q$ and substituting $z = Qy(x)$ we have
$$
z''(x) + Dz(x) \;\; =\;\; 0.
$$
Hence this problem reduces to a decoupled system of differential equations of the form $z_i''(x) + \lambda_i z_i(x) = 0$, each of which has solution $z_i(x) = a_i \cos (\sqrt{\lambda_i}x) + b_i \sin (\sqrt{\lambda_i}x)$.  We now need to solve this in terms of $y(x) = Q^T z(x)$.  We therefore obtain
$$
y(x) \;\; =\;\; Q^T \left [ \begin{array}{ccc}
\cos (\sqrt{\lambda_i}x) & & \\
& \ddots & \\
& & \cos (\sqrt{\lambda_n} x) \\
\end{array} \right ] \left [ \begin{array}{c}
a_1 \\
\vdots \\
a_n \\
\end{array} \right ] + Q^T \left [ \begin{array}{ccc}
\sin (\sqrt{\lambda_i}x) & & \\
& \ddots & \\
& & \sin (\sqrt{\lambda_n} x) \\
\end{array} \right ] \left [ \begin{array}{c}
b_1 \\
\vdots \\
b_n \\
\end{array} \right ].
$$
Notice that we can write the middle terms as $\cos (\sqrt{D} x)$ and $\sin(\sqrt{D}x)$ respectively.  Notice that by the initial conditions we have 
\begin{eqnarray*}
y(0) & = & Q^T \cos(\sqrt{D} 0) a + Q^T \sin(\sqrt{D}0) b \;\; =\;\; Q^Ta \;\; =\;\; c_0 \\
y'(0) & = & -Q^T \sqrt{D} \sin (\sqrt{D}0) a + Q^T \sqrt{D} \cos(\sqrt{D} 0) b \;\; =\;\; Q^T\sqrt{D} b \;\; =\;\; c_1.
\end{eqnarray*}
We therefore find that $a = Qc_0$ and $b = (\sqrt{D})^{-1} Qc_1$ and therefore
$$
y(x) \;\; =\;\; Q^T \cos \left (\sqrt{D}x \right )Q c_0 + Q^T \sin \left (\sqrt{D}x \right ) \left ( \sqrt{D} \right )^{-1} Q c_1.
$$
Unfortunately from what I can see, there isn't a way to reduce the clutter in this equation to get something in terms of $A$.  The problem here is that the independent variable is mixed in with the series expression involving $D$, and can't be extracted that easily.  It looks like you had the right idea with your approach, but in general we want to see if we can solve the equation directly using some algebraic properties.  In this case $A$ was positive-definite which is fortunate, but in general we're only guaranteed a Jordan canonical form, which doesn't lend itself to such nice solutions.  
Improvements
While in general we need to look for nice algebraic properties to solve for matrix-valued differential equations, I was actually wrong about not being able to reduce the clutter in the equation above.  Observe that since $Q^T\left (\sqrt{D}x\right)^nQ =\left (Q^T\sqrt{D}Qx\right)^n$, we have
$$
Q^T\cos\left(\sqrt{D}x\right)Q \;\;=\;\;  Q^T \left ( \sum_{n=0}^\infty \frac{(-1)^n}{(2n)!} \left(\sqrt{D}x\right)^n \right )Q \;\;=\;\;  \sum_{n=0}^\infty \frac{(-1)^n}{(2n)!} \left (Q^T \sqrt{D}Qx\right)^n \;\;=\;\;  \cos \left (\sqrt{A}x\right).
$$
By a similar argument we can also rewrite
$$
Q^T \sin\left (\sqrt{D}x\right) \left ( \sqrt{D}\right)^{-1}Q \;\;=\;\; Q^T \sin\left (\sqrt{D}x\right)QQ^T \left ( \sqrt{D}\right)^{-1}Q \;\;=\;\; \sin\left (\sqrt{A}x\right) \left (\sqrt{A}\right)^{-1}.
$$
Therefore the final solution to the ODE is given by
$$
y(x) \;\;=\;\; \cos \left (\sqrt{A}x\right)c_0 + \sin\left (\sqrt{A}x\right) \left (\sqrt{A}\right)^{-1}c_1.
$$
