27-05 — Systems of ODEs
Phase: Ordinary Differential Equations | Subject: 27-05 Prerequisites: 27-03-second-order-linear-odes-homogeneous.md, 08-08-eigenvalues-and-eigenvectors.md Next subject: 27-06-laplace-transforms.md
Learning Objectives
By the end of this subject, you will be able to:
- Write systems of first-order ODEs in matrix form $\mathbf{x}' = A\mathbf{x}$
- Solve homogeneous linear systems using eigenvalues and eigenvectors
- Handle complex eigenvalues (spirals, centers) and repeated eigenvalues
- Convert higher-order ODEs to first-order systems
- Interpret phase portraits qualitatively
Core Content
Matrix Form
A system of $n$ first-order ODEs:
$$x_1' = a_{11} x_1 + a_{12} x_2 + \cdots + a_{1n} x_n$$ $$\vdots$$ $$x_n' = a_{n1} x_1 + a_{n2} x_2 + \cdots + a_{nn} x_n$$
In matrix form: $\mathbf{x}' = A \mathbf{x}$, where $\mathbf{x} \in \mathbb{R}^n$.
Homogeneous Solution via Eigenvalues
Assume $\mathbf{x} = \mathbf{v} e^{\lambda t}$. Then $\mathbf{x}' = \lambda \mathbf{v} e^{\lambda t} = A\mathbf{v} e^{\lambda t}$, so:
$$A\mathbf{v} = \lambda \mathbf{v}$$
$\lambda$ is an eigenvalue, $\mathbf{v}$ is the corresponding eigenvector.
Case 1: $n$ distinct real eigenvalues $\lambda_1, \ldots, \lambda_n$
$$\mathbf{x}(t) = c_1 \mathbf{v}_1 e^{\lambda_1 t} + c_2 \mathbf{v}_2 e^{\lambda_2 t} + \cdots + c_n \mathbf{v}_n e^{\lambda_n t}$$
Case 2: Complex eigenvalues $\lambda = \alpha \pm i\beta$
$\mathbf{x}(t) = e^{\alpha t}[c_1(\mathbf{a}\cos \beta t - \mathbf{b}\sin \beta t) + c_2(\mathbf{a}\sin \beta t + \mathbf{b}\cos \beta t)]$ where $\mathbf{v} = \mathbf{a} + i\mathbf{b}$.
- $\alpha < 0$: stable spiral (inward)
- $\alpha = 0$: center (closed orbits)
- $\alpha > 0$: unstable spiral (outward)
Case 3: Repeated eigenvalues
If algebraic multiplicity > geometric multiplicity, seek solution with $t e^{\lambda t}$ term.
Converting Higher-Order to First-Order
For $y^{(n)} = f(t, y, y', \ldots, y^{(n-1)})$, set: $x_1 = y, x_2 = y', \ldots, x_n = y^{(n-1)}$. Then $x_1' = x_2, x_2' = x_3, \ldots, x_{n-1}' = x_n, x_n' = f(t, x_1, \ldots, x_n)$.
Example: $y'' + 3y' + 2y = 0$ becomes: $x_1 = y, x_2 = y'$. Then $x_1' = x_2$, $x_2' = -2x_1 - 3x_2$. $\begin{pmatrix} x_1' \ x_2' \end{pmatrix} = \begin{pmatrix} 0 & 1 \ -2 & -3 \end{pmatrix} \begin{pmatrix} x_1 \ x_2 \end{pmatrix}$.
Phase Portraits
Plot trajectories in the phase plane ($x_1, x_2$):
- Real eigenvalues ($\lambda_1, \lambda_2$):
- Both negative → stable node (sink)
- Both positive → unstable node (source)
- Mixed signs → saddle point
- Complex eigenvalues: spirals or centers
Key Terms
- System of ODEs
- Eigenvalue, Eigenvector
- Phase Portrait
- Sink, Source, Saddle
- Spiral, Center
Worked Examples
Example 1: Distinct Real Eigenvalues
Solve $\mathbf{x}' = \begin{pmatrix} 1 & 2 \ 3 & 2 \end{pmatrix} \mathbf{x}$.
Solution: Eigenvalues: $\det(A - \lambda I) = \begin{vmatrix} 1-\lambda & 2 \ 3 & 2-\lambda \end{vmatrix} = (1-\lambda)(2-\lambda) - 6 = \lambda^2 - 3\lambda - 4 = 0$. $\lambda = 4, -1$.
For $\lambda=4$: $(A-4I)\mathbf{v} = \begin{pmatrix} -3 & 2 \ 3 & -2 \end{pmatrix}\mathbf{v} = 0 \Rightarrow \mathbf{v}_1 = \begin{pmatrix} 2 \ 3 \end{pmatrix}$. For $\lambda=-1$: $\mathbf{v}_2 = \begin{pmatrix} 1 \ -1 \end{pmatrix}$.
General: $\mathbf{x}(t) = c_1 \begin{pmatrix} 2 \ 3 \end{pmatrix} e^{4t} + c_2 \begin{pmatrix} 1 \ -1 \end{pmatrix} e^{-t}$.
Click for answer
$\mathbf{x}(t) = c_1 (2, 3)^T e^{4t} + c_2 (1, -1)^T e^{-t}$. Origin is a saddle point.Example 2: Complex Eigenvalues
Solve $\mathbf{x}' = \begin{pmatrix} 0 & 1 \ -1 & 0 \end{pmatrix} \mathbf{x}$.
Solution: Eigenvalues: $\lambda^2 + 1 = 0 \Rightarrow \lambda = \pm i$. Eigenvector for $\lambda = i$: $-v_1 + v_2 = 0$, pick $\mathbf{v} = \begin{pmatrix} 1 \ i \end{pmatrix} = \begin{pmatrix} 1 \ 0 \end{pmatrix} + i\begin{pmatrix} 0 \ 1 \end{pmatrix}$.
General: $\mathbf{x}(t) = c_1 \left[\begin{pmatrix}1\0\end{pmatrix}\cos t - \begin{pmatrix}0\1\end{pmatrix}\sin t\right] + c_2 \left[\begin{pmatrix}1\0\end{pmatrix}\sin t + \begin{pmatrix}0\1\end{pmatrix}\cos t\right]$ $= \begin{pmatrix} c_1\cos t + c_2\sin t \ -c_1\sin t + c_2\cos t \end{pmatrix}$.
Click for answer
$\mathbf{x}(t) = \begin{pmatrix} c_1\cos t + c_2\sin t \\ -c_1\sin t + c_2\cos t \end{pmatrix}$. Pure imaginary eigenvalues → center (closed orbits).Example 3: Predator-Prey (Lotka-Volterra)
$\frac{dx}{dt} = x - xy$, $\frac{dy}{dt} = -y + xy$. Find equilibrium points.
Solution: Set $x'=0$: $x(1-y) = 0 \Rightarrow x=0$ or $y=1$. Set $y'=0$: $y(x-1) = 0 \Rightarrow y=0$ or $x=1$. Equilibria: $(0,0)$, $(1,1)$.
$(0,0)$: saddle (extinction). $(1,1)$: center (stable oscillations).
Click for answer
Equilibria at $(0,0)$ (saddle) and $(1,1)$ (center). This is a nonlinear system — linearization around $(1,1)$ gives pure imaginary eigenvalues.Quiz
Q1: What does the concept of System of ODEs primarily refer to in this subject?
A) A historical anecdote about System of ODEs B) A computational error related to System of ODEs C) The definition and application of System of ODEs D) A visual representation of System of ODEs
Correct: C)
- If you chose A: This is incorrect. System of ODEs is defined as: the definition and application of system of odes. The other options describe different aspects that are not the primary focus.
- If you chose B: This is incorrect. System of ODEs is defined as: the definition and application of system of odes. The other options describe different aspects that are not the primary focus.
- If you chose C: System of ODEs is defined as: the definition and application of system of odes. The other options describe different aspects that are not the primary focus. Correct!
- If you chose D: This is incorrect. System of ODEs is defined as: the definition and application of system of odes. The other options describe different aspects that are not the primary focus.
Q2: Which of the following is the key formula discussed in this subject?
A) An unrelated formula from a different topic B) The inverse operation of the formula in question C) \mathbf{x}' = A\mathbf{x} D) A simplified version of \mathbf{x}' = A\mathbf{x}...
Correct: C)
- If you chose A: This is incorrect. The formula \mathbf{x}' = A\mathbf{x} is central to this subject. The other options are either simplified versions or unrelated.
- If you chose B: This is incorrect. The formula \mathbf{x}' = A\mathbf{x} is central to this subject. The other options are either simplified versions or unrelated.
- If you chose C: The formula \mathbf{x}' = A\mathbf{x} is central to this subject. The other options are either simplified versions or unrelated. Correct!
- If you chose D: This is incorrect. The formula \mathbf{x}' = A\mathbf{x} is central to this subject. The other options are either simplified versions or unrelated.
Q3: What is the primary purpose of Phase Portrait?
A) It is used to phase portrait in mathematical analysis B) It replaces all other methods in this domain C) It is primarily a historical notation system D) It is used only in advanced research contexts
Correct: A)
- If you chose A: Phase Portrait serves the purpose described in the correct answer. The other options misrepresent its role. Correct!
- If you chose B: This is incorrect. Phase Portrait serves the purpose described in the correct answer. The other options misrepresent its role.
- If you chose C: This is incorrect. Phase Portrait serves the purpose described in the correct answer. The other options misrepresent its role.
- If you chose D: This is incorrect. Phase Portrait serves the purpose described in the correct answer. The other options misrepresent its role.
Q4: Which statement about Matrix Form is TRUE?
A) Matrix Form is a fundamental concept covered in this subject B) Matrix Form is mentioned only as a historical footnote C) Matrix Form is an advanced topic beyond this subject's scope D) Matrix Form is not related to this subject
Correct: A)
- If you chose A: Matrix Form is a fundamental concept covered in this subject. This subject covers Matrix Form as part of its core content. Correct!
- If you chose B: This is incorrect. Matrix Form is a fundamental concept covered in this subject. This subject covers Matrix Form as part of its core content.
- If you chose C: This is incorrect. Matrix Form is a fundamental concept covered in this subject. This subject covers Matrix Form as part of its core content.
- If you chose D: This is incorrect. Matrix Form is a fundamental concept covered in this subject. This subject covers Matrix Form as part of its core content.
Q5: Based on the worked examples in this subject, what is the correct result?
A) A different result from a common mistake B) An unrelated numerical value C) Complex Eigenvalues D) The inverse of the correct answer
Correct: C)
- If you chose A: This is incorrect. The worked examples show that the result is Complex Eigenvalues. The other options represent common errors.
- If you chose B: This is incorrect. The worked examples show that the result is Complex Eigenvalues. The other options represent common errors.
- If you chose C: The worked examples show that the result is Complex Eigenvalues. The other options represent common errors. Correct!
- If you chose D: This is incorrect. The worked examples show that the result is Complex Eigenvalues. The other options represent common errors.
Q6: How are Matrix Form and Homogeneous Solution Via Eigenvalues related?
A) Matrix Form is the inverse of Homogeneous Solution Via Eigenvalues B) Matrix Form and Homogeneous Solution Via Eigenvalues are closely related concepts C) Matrix Form and Homogeneous Solution Via Eigenvalues are completely unrelated topics D) Matrix Form is a special case of Homogeneous Solution Via Eigenvalues
Correct: B)
- If you chose A: This is incorrect. Both Matrix Form and Homogeneous Solution Via Eigenvalues are covered in this subject as interconnected topics.
- If you chose B: Both Matrix Form and Homogeneous Solution Via Eigenvalues are covered in this subject as interconnected topics. Correct!
- If you chose C: This is incorrect. Both Matrix Form and Homogeneous Solution Via Eigenvalues are covered in this subject as interconnected topics.
- If you chose D: This is incorrect. Both Matrix Form and Homogeneous Solution Via Eigenvalues are covered in this subject as interconnected topics.
Q7: What is a common pitfall when working with Converting Higher-Order To First-Order?
A) Converting Higher-Order To First-Order has no common misconceptions B) A common mistake is confusing Converting Higher-Order To First-Order with a similar concept C) The main error with Converting Higher-Order To First-Order is using it when it is not needed D) Converting Higher-Order To First-Order is always computed the same way in all contexts
Correct: B)
- If you chose A: This is incorrect. Students often confuse Converting Higher-Order To First-Order with similar-sounding or related concepts. Pay attention to the precise definitions.
- If you chose B: Students often confuse Converting Higher-Order To First-Order with similar-sounding or related concepts. Pay attention to the precise definitions. Correct!
- If you chose C: This is incorrect. Students often confuse Converting Higher-Order To First-Order with similar-sounding or related concepts. Pay attention to the precise definitions.
- If you chose D: This is incorrect. Students often confuse Converting Higher-Order To First-Order with similar-sounding or related concepts. Pay attention to the precise definitions.
Q8: When should you apply Phase Portraits?
A) Use Phase Portraits only in pure mathematics contexts B) Apply Phase Portraits to solve problems in this subject's domain C) Avoid Phase Portraits unless explicitly instructed D) Phase Portraits is not practically useful
Correct: B)
- If you chose A: This is incorrect. Phase Portraits is a practical tool used throughout this subject to solve relevant problems.
- If you chose B: Phase Portraits is a practical tool used throughout this subject to solve relevant problems. Correct!
- If you chose C: This is incorrect. Phase Portraits is a practical tool used throughout this subject to solve relevant problems.
- If you chose D: This is incorrect. Phase Portraits is a practical tool used throughout this subject to solve relevant problems.
Practice Problems
-
Solve $\mathbf{x}' = \begin{pmatrix} 3 & 0 \ 0 & -2 \end{pmatrix} \mathbf{x}$.
Click for answer
Eigenvalues $3, -2$. $\mathbf{x} = c_1\begin{pmatrix}1\\0\end{pmatrix}e^{3t} + c_2\begin{pmatrix}0\\1\end{pmatrix}e^{-2t}$. Saddle. -
Convert $y''' - 2y'' + y' - y = 0$ to a first-order system.
Click for answer
Let $x_1=y, x_2=y', x_3=y''$. Then $x_1'=x_2, x_2'=x_3, x_3'=y+2y''-y'=x_1+2x_3-x_2$. Matrix form: $\mathbf{x}' = \begin{pmatrix}0&1&0\\0&0&1\\1&-1&2\end{pmatrix}\mathbf{x}$. -
Find eigenvalues and classify the equilibrium of $\mathbf{x}' = \begin{pmatrix} -2 & 1 \ -1 & -2 \end{pmatrix} \mathbf{x}$.
Click for answer
Char: $(\lambda+2)^2 + 1 = 0 \Rightarrow \lambda = -2 \pm i$. Real part negative → stable spiral sink. -
Solve $\mathbf{x}' = \begin{pmatrix} 1 & 1 \ 4 & 1 \end{pmatrix} \mathbf{x}$.
Click for answer
$\det = \lambda^2 - 2\lambda - 3 = 0$, $\lambda = 3, -1$. $\mathbf{v}_1 = (1,2)^T$, $\mathbf{v}_2 = (1,-2)^T$. $\mathbf{x} = c_1(1,2)^T e^{3t} + c_2(1,-2)^T e^{-t}$. -
For a 2×2 system with eigenvalues $-1 \pm 2i$, the phase portrait shows:
Click for answer
Stable spiral — trajectories spiral into the origin because the real part is negative.
Summary
Key takeaways:
- $\mathbf{x}' = A\mathbf{x}$ → assume $\mathbf{x} = \mathbf{v}e^{\lambda t}$ → eigenvalue problem
- Real eigenvalues: nodes (sinks/sources) or saddles
- Complex eigenvalues: spirals (stable/unstable) or centers
- Phase portraits reveal global qualitative behavior
- Higher-order ODEs convert to first-order systems
Pitfalls
- Writing eigenvectors for complex eigenvalues with incorrect real/imaginary splitting: When $\lambda = \alpha + i\beta$ with eigenvector $\mathbf{v} = \mathbf{a} + i\mathbf{b}$, the general solution is $e^{\alpha t}[c_1(\mathbf{a}\cos\beta t - \mathbf{b}\sin\beta t) + c_2(\mathbf{a}\sin\beta t + \mathbf{b}\cos\beta t)]$. A common mistake is to split the imaginary part incorrectly, e.g., writing $\mathbf{a}\cos\beta t + \mathbf{b}\sin\beta t$ for both terms, or forgetting the alternating sign pattern. Derive this by writing $e^{(\alpha + i\beta)t}(\mathbf{a} + i\mathbf{b})$ and taking real and imaginary parts carefully.
- Confusing algebraic and geometric multiplicity for repeated eigenvalues: If an eigenvalue $\lambda$ has algebraic multiplicity 2 but geometric multiplicity 1 (only one independent eigenvector), the general solution needs a $te^{\lambda t}$ term: $\mathbf{x}(t) = c_1\mathbf{v}e^{\lambda t} + c_2(\mathbf{v}te^{\lambda t} + \mathbf{w}e^{\lambda t})$ where $(A - \lambda I)\mathbf{w} = \mathbf{v}$. Assuming two independent eigenvectors when they don't exist produces an incomplete solution.
- Misreading phase portraits: A "stable node" has both eigenvalues real and negative — trajectories go straight to the origin. A "stable spiral" has complex eigenvalues with negative real part — trajectories spiral in. A "center" has purely imaginary eigenvalues — closed orbits. Students often misclassify a spiral as a node (or vice versa) by looking only at whether trajectories approach the origin, ignoring whether they rotate.
- Converting a higher-order ODE to a system with misaligned state variables: For $y''' - 2y'' + y' - y = 0$, the state vector is $(x_1, x_2, x_3) = (y, y', y'')$. This gives $x_1' = x_2$, $x_2' = x_3$, and $x_3' = y - y' + 2y'' = x_1 - x_2 + 2x_3$. A sign error in the last equation (e.g., $x_3' = x_1 + x_2 - 2x_3$) propagates through the entire solution. Always verify by computing a few terms manually.
- Treating nonlinear systems with eigenvalue analysis at a non-equilibrium point: Linearization via eigenvalues describes behavior near an equilibrium. Computing eigenvalues of the Jacobian at a point that is not an equilibrium gives meaningless results. For Lotka-Volterra, the Jacobian at $(1,1)$ gives pure imaginary eigenvalues (center), but this only describes local behavior near that equilibrium — global behavior may differ significantly.
Next Steps
Next up: 27-06-laplace-transforms.md — an algebraic approach to solving ODEs with discontinuous forcing.