Chapter 20: Problem 4
Use Euler's method to find a numerical solution of \(\frac{\mathrm{d} y}{\mathrm{~d} x}=-2 y, y(0)=1\), for \(0 \leq x \leq 0.5 .\) First take \(h=0.1\), then \(h=0.05\), and compare your answers at \(x=0.5\) with the exact solution obtained by separating the variables. Work throughout to six decimal places.