System of Linear ODEs Solver (Matrix Exponential)

System of Linear ODEs Solver

System of Linear ODEs Solver

Analyze $2 \times 2$ linear systems $\vec{x}’ = A\vec{x}$ using Matrix Exponentials and Phase Plane analysis.

Matrix A

A =

Initial Vector $\vec{x}(0)$

System Analysis

Unstable Saddle
Characteristic Equation
$$ \lambda^2 – 3\lambda – 4 = 0 $$
Eigenvalues
$$ \lambda_1 = 4, \lambda_2 = -1 $$

Phase Portrait

Trajectory Vector Field
x axis (x) vs y axis (y)

Understanding Systems of Linear ODEs

A system of linear first-order differential equations can be written in matrix form as: $$ \vec{x}’ = A\vec{x} $$ where $\vec{x}$ is a vector of functions $\begin{pmatrix} x(t) \\ y(t) \end{pmatrix}$ and $A$ is a constant coefficient matrix.

The Matrix Exponential

Just as the solution to the scalar equation $x’ = ax$ is $x(t) = x(0)e^{at}$, the solution to the system is given by the Matrix Exponential: $$ \vec{x}(t) = e^{At}\vec{x}(0) $$ The behavior of this solution is determined entirely by the eigenvalues ($\lambda$) of the matrix $A$.

Stability Classification

  • Source (Unstable Node): Both eigenvalues are positive real numbers. Trajectories move away from the origin.
  • Sink (Stable Node): Both eigenvalues are negative real numbers. Trajectories move toward the origin.
  • Saddle Point: One positive and one negative eigenvalue. Trajectories approach the origin along one eigenvector and diverge along the other.
  • Spiral/Center: Complex eigenvalues. If the real part is negative, it’s a stable spiral; if positive, an unstable spiral; if zero, a center (closed orbits).

FAQ

How do I find the eigenvalues?
Eigenvalues are found by solving the characteristic equation $\det(A – \lambda I) = 0$. For a $2 \times 2$ matrix, this is $\lambda^2 – \text{tr}(A)\lambda + \det(A) = 0$.
What is a Phase Portrait?
A phase portrait is a geometric representation of the trajectories of a dynamical system in the phase plane. For a 2D system, we plot $y(t)$ versus $x(t)$. The arrows (vector field) show the direction of motion at any point.

UNDERGRADUATE