Chapter 37 Exercises — The Matrix Exponential, Systems of ODEs, and Stability

Work these with pencil first, then check the computational ones against numpy/scipy. Tiers: ⭐ conceptual · ⭐⭐ hand computation · ⭐⭐⭐ proof (math track) or coding (CS track) · ⭐⭐⭐⭐ application/synthesis. A 🧮 marks problems that want scipy.linalg.expm or scipy.integrate.solve_ivp; a ✍️ marks problems that want a written proof.


⭐ Tier 1 — Conceptual

1. State the power-series definition of the matrix exponential $e^{A}$, and explain in one sentence why it always converges for any square matrix $A$ (no conditions).

2. What is $e^{A\cdot 0}$ for any square matrix $A$? Why does this have to be true for $e^{At}$ to solve an initial-value problem?

3. The solution of $\mathbf{x}'=A\mathbf{x}$ is $\mathbf{x}(t)=e^{At}\mathbf{x}(0)$. Name the scalar equation and scalar solution this generalizes, and identify which part of the matrix formula plays the role of $e^{at}$.

4. Fill in the stability dictionary for $\mathbf{x}'=A\mathbf{x}$: the origin is asymptotically stable when all eigenvalues have _; unstable when some eigenvalue has _; and trajectories oscillate when eigenvalues are ____.

5. For a $2\times2$ system, match each eigenvalue situation to the phase-portrait type (node / saddle / spiral / center): (a) real, both negative; (b) real, opposite signs; (c) complex with negative real part; (d) purely imaginary.

6. True or false, with a one-line reason: "If an eigenvalue is $\lambda = -2 + 5i$, then because $|\lambda| = \sqrt{29} > 1$ the system grows."

7. Why does a defective matrix produce a term of the form $t\,e^{\lambda t}$ in the solution, when a diagonalizable matrix produces only $e^{\lambda t}$? Answer geometrically (what is "missing").

8. Explain why $e^{At}$ is always invertible, and give its inverse. (Hint: $e^{At}e^{-At}=?$)


⭐⭐ Tier 2 — Hand computation

9. Compute $e^{At}$ for the diagonal matrix $A = \begin{bmatrix} 1 & 0 \\ 0 & -2 \end{bmatrix}$. Then evaluate it at $t=1$ (leave answers as $e^{1}, e^{-2}$ and as decimals). 🧮 Check: the diagonal should be $(2.718282,\,0.135335)$.

10. For the nilpotent matrix $N = \begin{bmatrix} 0 & 2 \\ 0 & 0 \end{bmatrix}$, show $N^2=\mathbf{0}$ and use it to compute $e^{Nt}$ exactly (the series terminates).

11. The matrix $A = \begin{bmatrix} 0 & 1 \\ -2 & -3 \end{bmatrix}$ has eigenvalues $-1$ and $-2$. Find the eigenvectors, then write the general solution of $\mathbf{x}'=A\mathbf{x}$ as a sum of two modes $c_1 e^{\lambda_1 t}\mathbf{v}_1 + c_2 e^{\lambda_2 t}\mathbf{v}_2$.

12. For the system in Exercise 11 with $\mathbf{x}(0)=\begin{bmatrix} 1 \\ 0 \end{bmatrix}$, find the constants $c_1, c_2$ and write the explicit solution $\mathbf{x}(t)$.

13. Compute $e^{Jt}$ for the defective matrix $J = \begin{bmatrix} 5 & 1 \\ 0 & 5 \end{bmatrix}$ using the splitting $J = 5I + N$. 🧮 Check at $t=1$: every nonzero entry should be a multiple of $e^5 = 148.413159$.

14. Find the eigenvalues of $A = \begin{bmatrix} -1 & -2 \\ 2 & -1 \end{bmatrix}$, identify the real part $\alpha$ and imaginary part $\beta$, and state the oscillation frequency and whether the spiral is inward or outward.

15. Using only the trace and determinant, classify the phase portrait of each: (a) $\begin{bmatrix} -3 & 0 \\ 0 & -1 \end{bmatrix}$; (b) $\begin{bmatrix} 2 & 1 \\ 1 & 0 \end{bmatrix}$; (c) $\begin{bmatrix} 1 & -2 \\ 2 & 1 \end{bmatrix}$; (d) $\begin{bmatrix} 0 & -3 \\ 3 & 0 \end{bmatrix}$.

16. For $A = \begin{bmatrix} -2 & 1 \\ 1 & -2 \end{bmatrix}$ (the chapter's anchor, eigenvalues $-1,-3$), use the closed form $e^{At} = \tfrac12\begin{bmatrix} e^{-t}+e^{-3t} & e^{-t}-e^{-3t} \\ e^{-t}-e^{-3t} & e^{-t}+e^{-3t} \end{bmatrix}$ to find $\mathbf{x}(t)$ for $\mathbf{x}(0) = \begin{bmatrix} 0 \\ 2 \end{bmatrix}$, and confirm $\mathbf{x}(t)\to\mathbf{0}$.

17. Decide, without finding eigenvectors, whether each system is stable: (a) $\operatorname{tr} A = -5$, $\det A = 6$; (b) $\operatorname{tr} A = -1$, $\det A = -4$; (c) $\operatorname{tr} A = 0$, $\det A = 9$. (Use the $2\times2$ rules: stable iff $\operatorname{tr} A<0$ and $\det A>0$.)


⭐⭐⭐ Tier 3 — Proof (✍️) and Coding (🧮)

18. ✍️ Prove that $\dfrac{d}{dt}e^{At} = A\,e^{At}$ by differentiating the power series term by term, justifying that the term-by-term differentiation is legitimate (cite uniform convergence on bounded intervals).

19. ✍️ Prove that if $A$ and $B$ commute ($AB=BA$), then $e^{A+B}=e^Ae^B$. (Outline: expand both sides as Cauchy products of the series; commutativity lets you apply the binomial theorem to $(A+B)^k$.) Then give a one-sentence reason the proof breaks when $AB\neq BA$.

20. ✍️ Suppose $A=PDP^{-1}$ is diagonalizable. Prove $e^{At}=Pe^{Dt}P^{-1}$ directly from the series, justifying each step (why $A^k=PD^kP^{-1}$, why $P,P^{-1}$ may be factored out of the infinite sum).

21. ✍️ Show that $e^{At}\mathbf{v} = e^{\lambda t}\mathbf{v}$ whenever $\mathbf{v}$ is an eigenvector of $A$ with eigenvalue $\lambda$. (Apply the series to $\mathbf{v}$ and use $A^k\mathbf{v}=\lambda^k\mathbf{v}$.) Explain why this is the "eigenmode" fact that makes $\mathbf{x}(t)=\sum_i c_i e^{\lambda_i t}\mathbf{v}_i$ work.

22. 🧮 Write matrix_exponential(A, t) computing $e^{At}$ via eigendecomposition ($Pe^{Dt}P^{-1}$). Verify against scipy.linalg.expm on three matrices: a stable node, a spiral (complex eigenvalues), and the defective $\begin{bmatrix}2&1\\0&2\end{bmatrix}$. For the defective one, report np.linalg.cond(P) and explain in a comment why your routine loses accuracy there.

23. 🧮 Write classify_2x2(A) that returns one of "stable node", "unstable node", "saddle", "stable spiral", "unstable spiral", "center" using only $\operatorname{tr} A$, $\det A$, and the discriminant $\Delta=(\operatorname{tr} A)^2-4\det A$. Test it on the four matrices of Exercise 15 and on the chapter's node/saddle/spiral.

24. 🧮 Reproduce Figure 37.1–37.3: plot the phase portrait (streamplot of the velocity field $A\mathbf{x}$ plus several solve_ivp trajectories) for a stable node, a saddle, and a stable spiral of your own choosing. Confirm by eye that the trajectories match the eigenvalue classification, and overlay the eigenvector directions for the node and saddle.


⭐⭐⭐⭐ Tier 4 — Application & synthesis

25. 🧮 Coupled tanks. Two tanks exchange brine: $\mathbf{x}' = A\mathbf{x}$ with $A = \begin{bmatrix} -3 & 1 \\ 3 & -1 \end{bmatrix}$, where $x_1, x_2$ are the salt amounts. (a) Find the eigenvalues and note one is $0$. (b) Explain what the zero eigenvalue means physically (a conserved quantity — total salt). (c) Starting from $\mathbf{x}(0)=(10,0)$, compute the equilibrium $\lim_{t\to\infty}\mathbf{x}(t)$ by projecting onto the eigenvector of $\lambda=0$, and verify with expm(A*50)@x0. Check: equilibrium $(2.5,\,7.5)$.

26. 🧮 RLC circuit stability. A series RLC circuit (with $L=C=1$) has state $\mathbf{x}=(i, v_C)$ obeying $\mathbf{x}'=\begin{bmatrix} -R & -1 \\ 1 & 0 \end{bmatrix}\mathbf{x}$. (a) For $R=1$, find the eigenvalues and classify the portrait (underdamped → stable spiral). (b) For $R=3$, classify it (overdamped → stable node). (c) Find the critical resistance $R$ at which the behavior switches (the discriminant changes sign), and explain what "critically damped" means. Check: $R=1$ gives $\lambda=-0.5\pm0.866i$; $R=3$ gives $\lambda\approx-2.618,-0.382$.

27. ✍️/🧮 The bridge that shakes itself apart. A lightly damped structure has eigenvalues $\lambda = -\epsilon \pm \beta i$ for small $\epsilon>0$. (a) Argue from the stability rule that the structure is technically stable for any $\epsilon>0$. (b) Now set $\epsilon=0$ (no damping): show the eigenvalues are purely imaginary and the portrait is a center (sustained oscillation). (c) Explain why an engineer treats the $\epsilon\to0$ case as dangerous even though $\operatorname{Re}\lambda$ is not positive, and connect this to resonance and the defective-eigenvalue $t\,e^{\lambda t}$ growth of §37.6.

28. 🧮 Stiffness. Take $A=\begin{bmatrix} -1 & 0 \\ 0 & -100 \end{bmatrix}$. (a) Write the solution from $\mathbf{x}(0)=(1,1)$ and identify the fast and slow modes. (b) Compute $\mathbf{x}(0.05)$ and $\mathbf{x}(5)$; observe the fast mode is essentially gone by $t=0.05$ while the slow mode persists to $t=5$. (c) Explain why this large ratio of decay rates ("stiffness") makes the system hard to integrate numerically, and look up which scipy.integrate.solve_ivp method (e.g. 'BDF' or 'Radau') is designed for stiff systems.


Answers to selected odd-numbered exercises

Show answers (3, 9, 11, 15, 25) **3.** Generalizes the scalar equation $x'=ax$ with solution $x(t)=e^{at}x(0)$. The matrix exponential $e^{At}$ plays the role of $e^{at}$ — and along each eigenvector $\mathbf{v}_i$ it acts exactly as the scalar $e^{\lambda_i t}$. **9.** $e^{At}=\begin{bmatrix} e^{t} & 0 \\ 0 & e^{-2t}\end{bmatrix}$; at $t=1$, $\begin{bmatrix} e & 0 \\ 0 & e^{-2}\end{bmatrix}=\begin{bmatrix} 2.718282 & 0 \\ 0 & 0.135335\end{bmatrix}$. The first coordinate grows, the second decays — a saddle. **11.** Eigenvectors: for $\lambda_1=-1$, solve $(A+I)\mathbf{v}=\mathbf{0}$ → $\mathbf{v}_1=(1,-1)$; for $\lambda_2=-2$, $\mathbf{v}_2=(1,-2)$. General solution $\mathbf{x}(t)=c_1 e^{-t}\begin{bmatrix}1\\-1\end{bmatrix}+c_2 e^{-2t}\begin{bmatrix}1\\-2\end{bmatrix}$. Both modes decay ⇒ stable node. **15.** (a) $\operatorname{tr}=-4,\det=3>0,\Delta=16-12>0$ → **stable node**. (b) $\det=-1<0$ → **saddle**. (c) $\operatorname{tr}=2>0,\det=5>0,\Delta=4-20<0$ → **unstable spiral**. (d) $\operatorname{tr}=0,\det=9>0$ → **center**. **25.** (a) Eigenvalues $0$ and $-4$. (b) The zero eigenvalue corresponds to the conserved total salt $x_1+x_2$ (its eigenvector $(1,1)^{\mathsf T}$ for $A^{\mathsf T}$ gives the conserved combination; nothing decays along the $\lambda=0$ direction). (c) Total salt $=10$ is split in the ratio of the $\lambda=0$ eigenvector $(1,3)$, giving equilibrium $(2.5, 7.5)$, confirmed by `expm(A*50)@x0`.