Am I solving this ODE correctly? I am trying to solve this differential equation:
$$\dddot X + 2\ddot X + 3\dot X+ X = 0$$
By introducing vaiable $V$ and $a$, I linearized the system as follows:
$$\dot X = V$$
$$\dot V = a$$
$$\dot a = -X -3V - 2a$$
In a matrix form:
$$\frac{d}{dt} \begin{pmatrix} X \\ V \\ a  \end{pmatrix} = \begin{pmatrix}
0 & 1 & 0\\
0 & 0 & 1\\
-1 & -3 & -2
\end{pmatrix}
\begin{pmatrix} X \\ V \\ a  \end{pmatrix}
$$ 
More concisely: $$ \dot y = A y $$
I am assuming that the solution is in the form $y = e^{At} \ y(0)$, and in order to calculate $e^{At}$ I decompose $A$ into $TD\ T^{-1}$ (where $T$ and $D$ are the eigenvectors and eigenvalues diagonal matrices of $A$ respectively).
So, finally the solution is:
$$y = T \ e^{Dt} \ T^{-1} \ y(0) $$
Right now I am not sure if my solution is correct or not, because when I use this code to solve the differential equation and reproduce the initial conditions at $t=0$ , $y(0) = [1, 0 , 0]$ I get a different results.
So, what did I miss?
 A: I checked over your code and found one issue which I believe addresses some of the concern.  Namely, when you are computing the exponential of the eigenvalue matrix, I believe the code is returning a matrix which has non-zero values in the off-diagonal entries which is not correct as far as I know.  I added a line to address this I believe - in the code below, the changes are in between "change starts---" and "change ends---" comments.  I hope this helps.
import numpy as np

A = np.array([
    [ 0,   1,  0 ],
    [ 0,   0,  1 ],
    [-1,  -3, -2 ]
])

def y(A, t):
    # Eignenvectors
    T = np.linalg.eig(A)[1]

    # Eigenvalues diagonal matrix
    D = np.eye(3) * np.linalg.eigvals(A)

    # Initial conditions
    x0 = np.array([1, 0, 0]).reshape(3, 1)

    # X = T * e(Dt) * T^-1 * x0
    solution = np.dot(np.linalg.inv(T), x0)
    Dt = D * t

    # Change starts ---
    diag_exp = np.multiply(np.exp(Dt),np.eye(3))
    solution = np.dot(diag_exp, solution)
    # Change ends ---

    solution = np.dot(T, solution)

    return solution

# This should reproduce the initial conditions but it does not
print(y(A, 0))

