Systems of First-Order Differential Equations
Problem
Solve dx/dt = x + y, dy/dt = -x + y. Find the eigenvalues of the system matrix, recognise a spiral, and show the outward-spiraling solution in the phase plane.
Explanation
Why systems?
Many real-world models are coupled: predator–prey, chemical reactions, electrical circuits with multiple loops, mechanical systems with several degrees of freedom. These are naturally systems of first-order ODEs:
For linear constant-coefficient systems, this simplifies to with a constant matrix , and we get to bring the full machinery of linear algebra (eigenvalues, eigenvectors, matrix exponentials) to bear.
Any higher-order linear ODE can also be converted into a first-order system — that's what numerical solvers like Runge-Kutta assume as input — so mastering systems pays twice.
The given system
In matrix form:
Step-by-step solution
Step 1 — Eigenvalues of .
Set to zero:
Complex conjugate eigenvalues with .
Step 2 — Eigenvector for .
Solve :
Top row: . Take .
Step 3 — Complex exponential solution and its real form.
The complex solution is
Expand:
Real and imaginary parts are each a real solution. The general real solution is any linear combination:
Phase-plane interpretation
Eigenvalues with , :
- → spiral (rotational component).
- → spiral outward (unstable spiral).
Every non-trivial solution is a spiral emerging from the origin with angular speed (one rotation per time) and exponential growth rate (amplitude doubles roughly every time units).
Classification chart for 2D linear systems
By the eigenvalues of :
- Real, same sign: node. Stable if both negative, unstable if both positive.
- Real, opposite signs: saddle. Unstable; one stable manifold + one unstable manifold.
- Repeated real root: degenerate or star node, depending on whether has a full basis of eigenvectors.
- Complex conjugate, : unstable spiral. (This problem.)
- Complex conjugate, : stable spiral.
- Complex conjugate, : center — pure rotation, neither stable nor unstable.
The eigenvalues' positions in the complex plane (the root locus) tell you the whole story of the phase portrait. See #197 for pictures.
Initial value problem
:
Check:
- At : . ✓
- . Directly: , at : . ✓
As , amplitude grows like and the vector rotates clockwise (because the angular phase in the -component is clockwise). Classic outward spiral.
Matrix exponential viewpoint
The general solution can be written as where is the matrix exponential:
For our matrix , the clean formula is (a scaled rotation). Applied to , it gives the solution with initial value .
This form is the generalisation of the scalar formula from . Very compact and conceptually clean.
Decoupling via eigenvectors
If has a basis of eigenvectors with eigenvalues , the system decomposes into uncoupled scalar ODEs via the transformation where :
Each satisfies , trivially solved.
From higher-order ODE to system
Any -th order ODE becomes a first-order system by setting :
This is what numerical ODE solvers always expect.
Common mistakes
- Forgetting to take real and imaginary parts. Complex eigenvalues give complex solutions; the physically relevant real solutions are the real and imaginary parts of the complex exponential.
- Wrong orientation of the spiral. The sign convention depends on which axis you plot; always verify with a specific time check.
- Mis-reading eigenvalue stability. Stability of is determined by real parts of eigenvalues of , not the eigenvalues themselves. means stable (real part ) even though is large.
- Confusing "system" with "ODE." A system is a vector-valued ODE. Some textbooks and online resources mix the terms.
Try it in the visualization
Plot the trajectory in the phase plane as a spiral curve, with an overlay of the eigenvalue pair in the complex plane. Drag the initial condition — watch the same spiral shape, just starting from a different place (all trajectories are scalings / rotations of each other). Slide the coefficients of to move the eigenvalues across the imaginary axis and see the spiral flip between outward, circular (centre), and inward.
Interactive Visualization
Parameters
Got your own math or physics problem?
Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.