Matrix exponential

Let \(\mathbf{A}(t)\) be an \(m \times m\) matrix whose entries depend on \(t\). Then

\[ \frac{d \mathbf{u}}{d t} = \mathbf{A}(t)\mathbf{u} \]

is a linear system of differential equations. If the matrix \(\mathbf{A}\) is independent of time, it is a linear, constant-coefficient system.

The solution to a linear, constant-coefficient IVP, given also \(\mathbf{u}(0)=\mathbf{u}_0\), is formally

\[ \mathbf{u}(t) = e^{t\mathbf{A}} \mathbf{u}_0, \]

where \(e^{t\mathbf{A}}\) is a matrix exponential, which can be defined using Taylor series or by other means. This result is a seamless generalization of the scalar case, \(m=1\).

A = [ -2 5; -1 0 ]
2×2 Array{Int64,2}:
 -2  5
 -1  0
u0 = [1,0]
t = LinRange(0,6,600)     # times for plotting
u = zeros(length(t),length(u0))
for j=1:length(t)
    ut = exp(t[j]*A)*u0 
    u[j,:] = ut'
end
using Plots
plot(t,u,label=["\$u_1\$" "\$u_2\$"],xlabel="t",ylabel="u(t)")

However, while the matrix exponential is a vital theoretical tool, computing it is too slow to be a practical numerical method.