Reference: Solving General High-Order, Linear Ordinary Differential Equations (ODEs) - YouTube
A Vandermonde matrix is a structured matrix whose columns (or rows) are successive powers of a set of distinct numbers. It is the natural coefficient matrix for polynomial interpolation: solving a linear system with a Vandermonde matrix recovers the coefficients of a polynomial that passes through prescribed data points.
General expression of higher order linear ODE:
a n x ( n ) + a n − 1 x ( n − 1 ) + ⋯ + a 2 x ¨ + a 1 x ˙ + a 0 x = 0 a_n x^{(n)} + a_{n-1} x^{(n-1)} + \dots + a_2 \ddot{x} + a_1 \dot{x} + a_0 x = 0 a n x ( n ) + a n − 1 x ( n − 1 ) + ⋯ + a 2 x ¨ + a 1 x ˙ + a 0 x = 0
For x = e λ t x = e^{\lambda t} x = e λ t , λ \lambda λ has n n n possible solutions:
x ( t ) = c 1 e λ 1 t + c 2 e λ 2 t + ⋯ + c n − 1 e λ n − 1 t + c n e λ n t x ˙ ( t ) = λ 1 c 1 e λ 1 t + λ 2 c 2 e λ 2 t + ⋯ + λ n c n e λ n t x ( n ) ( t ) = λ 1 n c 1 e λ 1 t + λ 2 n c 2 e λ 2 t + ⋯ + λ n n c n e λ n t \begin{aligned}
x(t) &= c_1 e^{\lambda_1 t} + c_2 e^{\lambda_2 t} + \dots + c_{n-1} e^{\lambda_{n-1} t} + c_n e^{\lambda_n t} \\
\dot{x}(t) &= \lambda_1 c_1 e^{\lambda_1 t} + \lambda_2 c_2 e^{\lambda_2 t} + \dots + \lambda_n c_n e^{\lambda_n t} \\
x^{(n)}(t) &= \lambda_1^n c_1 e^{\lambda_1 t} + \lambda_2^n c_2 e^{\lambda_2 t} + \dots + \lambda_n^n c_n e^{\lambda_n t}
\end{aligned} x ( t ) x ˙ ( t ) x ( n ) ( t ) = c 1 e λ 1 t + c 2 e λ 2 t + ⋯ + c n − 1 e λ n − 1 t + c n e λ n t = λ 1 c 1 e λ 1 t + λ 2 c 2 e λ 2 t + ⋯ + λ n c n e λ n t = λ 1 n c 1 e λ 1 t + λ 2 n c 2 e λ 2 t + ⋯ + λ n n c n e λ n t
For initial condition: at t = 0 t = 0 t = 0 .
x ( 0 ) = c 1 + c 2 + ⋯ + c n x ˙ ( 0 ) = λ 1 c 1 + λ 2 c 2 + ⋯ + λ n c n x ( n ) ( 0 ) = λ 1 n c 1 + λ 2 n c 2 + ⋯ + λ n n c n x ( n − 1 ) ( 0 ) = λ 1 n − 1 c 1 + λ 2 n − 1 c 2 + ⋯ + λ n n − 1 c n \begin{aligned}
x(0) &= c_1 + c_2 + \dots + c_n \\
\dot{x}(0) &= \lambda_1 c_1 + \lambda_2 c_2 + \dots + \lambda_n c_n \\
x^{(n)}(0) &= \lambda_1^n c_1 + \lambda_2^n c_2 + \dots + \lambda_n^n c_n \\
x^{(n-1)}(0) &= \lambda_1^{n-1} c_1 + \lambda_2^{n-1} c_2 + \dots + \lambda_n^{n-1} c_n
\end{aligned} x ( 0 ) x ˙ ( 0 ) x ( n ) ( 0 ) x ( n − 1 ) ( 0 ) = c 1 + c 2 + ⋯ + c n = λ 1 c 1 + λ 2 c 2 + ⋯ + λ n c n = λ 1 n c 1 + λ 2 n c 2 + ⋯ + λ n n c n = λ 1 n − 1 c 1 + λ 2 n − 1 c 2 + ⋯ + λ n n − 1 c n
n n n equations in total.
Transform into a matrix expression.
[ x ( 0 ) x ˙ ( 0 ) ⋮ x ( n − 1 ) ( 0 ) ] = [ 1 1 … 1 λ 1 λ 2 … λ n ⋮ ⋮ ⋱ ⋮ λ 1 n − 1 λ 2 n − 1 … λ n n − 1 ] [ c 1 c 2 ⋮ c n ] \begin{bmatrix}
x(0) \\
\dot{x}(0) \\
\vdots \\
x^{(n-1)}(0)
\end{bmatrix}
=
\begin{bmatrix}
1 & 1 & \dots & 1 \\
\lambda_1 & \lambda_2 & \dots & \lambda_n \\
\vdots & \vdots & \ddots & \vdots \\
\lambda_1^{n-1} & \lambda_2^{n-1} & \dots & \lambda_n^{n-1}
\end{bmatrix}
\begin{bmatrix}
c_1 \\
c_2 \\
\vdots \\
c_n
\end{bmatrix} x ( 0 ) x ˙ ( 0 ) ⋮ x ( n − 1 ) ( 0 ) = 1 λ 1 ⋮ λ 1 n − 1 1 λ 2 ⋮ λ 2 n − 1 … … ⋱ … 1 λ n ⋮ λ n n − 1 c 1 c 2 ⋮ c n
⟹ D = M c c = M − 1 D \begin{aligned}
\implies D &= Mc \\
c &= M^{-1}D
\end{aligned} ⟹ D c = M c = M − 1 D
M M M is a n × n n \times n n × n matrix, it’s produced from the ODE solutions.
D D D is the data of initial condition.
c c c is the target prefix matrix.
Final Result: c = M − 1 D c = M^{-1}D c = M − 1 D