Chapter 4: Problem 29
The exact solution of the initial value problem \(\mathbf{y}^{\prime}=\left[\begin{array}{cc}0.5 & 1 \\ 1 & 0.5\end{array}\right] \mathbf{y}, \quad \mathbf{y}(0)=\left[\begin{array}{l}1 \\\ 0\end{array}\right] \quad\) is given by \(\quad \mathbf{y}(t)=\frac{1}{2}\left[\begin{array}{c}e^{-t / 2}+e^{3 t / 2} \\\ -e^{-t / 2}+e^{3 t / 2}\end{array}\right] .\) (a) Write a program that applies the Runge-Kutta method (12) to this problem. (b) Run your program on the interval \(0 \leq t \leq 1\), using step size \(h=0.01\). (c) Run your program on the interval \(0 \leq t \leq 1\), using step size \(h=0.005\). (d) Let \(\mathbf{y}_{100}\) and \(\mathbf{y}_{200}\) denote the numerical approximations to \(\mathbf{y}(1)\) computed in parts (b) and (c), respectively. Compute the error vectors \(\mathbf{y}(1)-\mathbf{y}_{100}\) and \(\mathbf{y}(1)-\overline{\mathbf{y}}_{200}\). By roughly what fractional amount is the error reduced when the step size is halved?
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.