Solving Three Systems of Differential Equations- Methods
What Are Systems of Differential Equations?
A system of differential equations is just multiple differential equations linked together. You're solving for two or more functions at the same time, where each equation involves derivatives of those functions.
When you have three such equations, things get messier. The good news? The same principles that work for two equations scale up. The bad news? The algebra gets brutal fast.
These systems show up everywhere in engineering, physics, economics—anywhere you're modeling interconnected changing quantities. Predator-prey populations, electrical circuits with multiple loops, mechanical systems with coupled masses.
Why Three Equations Changes the Game
With one equation, you isolate and integrate. With two, you can eliminate one variable and reduce to a single higher-order equation. With three, elimination still works, but you're juggling three variables and the algebra becomes a headache.
Matrix methods become essential at this scale. They're not just elegant—they're the only practical way to handle real-world systems without losing your mind.
The Three Main Methods
Here's how you actually solve these things:
| Method | Best For | Difficulty | When to Use |
|---|---|---|---|
| Elimination/Substitution | Small systems, exact solutions | Medium | When equations are simple enough to manipulate |
| Matrix/Eigenvalue Method | Linear systems, homogeneous cases | Medium-High | When you have linear equations with constant coefficients |
| Numerical Methods | Nonlinear systems, real-world data | Low | When analytical solutions don't exist or aren't worth the effort |
Method 1: Elimination and Substitution
This is the brute force approach. You eliminate variables until you get a single equation in one unknown, solve that, then back-substitute.
How It Works
Take your three equations. Differentiate one or more to get derivatives in terms you can substitute. Use algebraic elimination—add, subtract, multiply equations to cancel variables.
The goal: reduce the system to a single nth-order equation you know how to solve.
Example
Say you have:
dx/dt = 2x + y
dy/dt = x + 2y + z
dz/dt = 3z
From the third equation, z = C₁e3t. That's one solved.
Now you have two equations in x and y. Eliminate—differentiate dx/dt, substitute from dy/dt, whatever gets you to one variable. Solve for x, then back-substitute for y.
This works. It's just tedious when systems get bigger.
Method 2: Matrix and Eigenvalue Approach
This is the method textbooks love because it's systematic and reveals the structure of solutions.
The Setup
Write your system as:
du/dt = Au
Where u is a vector of your three functions and A is a 3×3 matrix of coefficients.
For homogeneous linear systems, the solution is:
u(t) = c₁v₁eλ₁t + c₂v₂eλ₂t + c₃v₃eλ₃t
Where λ₁, λ₂, λ₃ are eigenvalues and v₁, v₂, v₃ are corresponding eigenvectors.
The Process
Step 1: Find eigenvalues by solving det(A - λI) = 0. This gives you a cubic equation—hope you remember how to factor or use synthetic division.
Step 2: For each eigenvalue λ, solve (A - λI)v = 0 to find eigenvectors.
Step 3: Write the general solution as a linear combination of the eigenvector solutions.
Step 4: Apply initial conditions to find constants.
What When Eigenvalues Are Repeated?
Then you need generalized eigenvectors. The solution form gets messier:
For eigenvalue λ with multiplicity m, you get terms like veλt and (v₁ + tv₂)eλt
Find these by solving (A - λI)kv = 0 for k = 1, 2, 3...
Method 3: Numerical Methods
Let's be real—most interesting systems don't have neat analytical solutions. You need numerical approximation.
Euler's Method
The simplest approach. Start at your initial condition, step forward using:
uₙ₊₁ = uₙ + f(uₙ, tₙ)Δt
It's crude. The error accumulates fast. Only use it for intuition or extremely small problems.
Runge-Kutta (RK4)
This is what you actually use. Fourth-order Runge-Kutta approximates the solution by sampling slopes at four points within each step.
Accuracy is O(Δt⁴) per step. You can use much larger step sizes than Euler and still get better results.
Implementation Tips
- Choose your step size by experimenting—too large and your solution blows up or oscillates wildly, too small and computation takes forever
- Watch for stiffness: if your solution oscillates with decreasing amplitude, you might have a stiff system requiring implicit methods
- Use built-in solvers (MATLAB's ode45, Python's scipy.integrate.solve_ivp) unless you're learning or have a specific reason to code from scratch
Getting Started: A Practical Workflow
Here's how to actually approach a three-equation system:
Step 1: Classify Your System
Is it linear or nonlinear? Homogeneous or inhomogeneous? Are coefficients constant or variable?
Linear with constant coefficients? Matrix method is your best bet for an exact solution.
Nonlinear? Skip to numerical methods. Analytical solutions either don't exist or require techniques beyond what most engineers need.
Step 2: Check for Simplifications
Can you decouple the system? Sometimes you can find linear combinations that separate into independent equations. This happens when the coefficient matrix has a nice form—diagonal or triangular.
If A is triangular, solve bottom-up: the third equation gives z, plug into second to get y, plug both into first for x.
Step 3: Choose Your Method
For homework problems with simple coefficients: elimination or matrix method.
For anything practical or complicated: numerical solver.
For exams: matrix method shows you understand the theory. Elimination shows you can do the algebra.
Step 4: Apply Initial Conditions
Solve for your arbitrary constants using whatever initial conditions you have. You need three constants for a third-order system, so three conditions—typically values of x, y, z at t = 0.
Common Mistakes to Avoid
Forgetting the constant of integration. Each integration adds a constant. With three equations and multiple integrations, those constants accumulate. Keep track from the start.
Messy matrix arithmetic. One arithmetic error in eigenvalue calculation and everything downstream is wrong. Double-check your determinant calculations.
Assuming real eigenvalues. Systems with real coefficients can have complex eigenvalues. When they appear as conjugate pairs, the exponential times sine/cosine terms come out. That's correct—don't assume you made a mistake.
Ignoring the homogeneous solution. For inhomogeneous systems, the general solution is homogeneous plus particular. Forgetting the homogeneous part is a guaranteed wrong answer.
When to Stop Looking for Exact Solutions
Not every system has a closed-form answer. That's not a failure—it's math being honest with you.
If your coefficient matrix doesn't factor nicely, if your system is nonlinear, if you're modeling real data with noise: use numerical methods. Engineers do this every day. Nobody solves a realistic three-body problem by hand.
The goal is understanding the behavior of your system, not proving you can do algebra for hours.