Consider the IVP \begin{align*} y''=-y \end{align*} for $t \geq 0$, and $y(0)=1$, $y'(0)=2$.
I have rewritten this differential equation as a system of first-order ODE's such that \begin{align*} u'=v\\ v'=-u\\ \end{align*} with $u(0)=1, v(0)=2$.
The solution is $y=2\sin(t)+\cos(t)$, $y'=2\cos(t)-\sin(t)$.
I am asked to perform one step of Euler's method with $h=0.5$, and determine if Euler's method is stable for this problem.
For the first part, I find that one step of Euler's method yields \begin{align*} y_1=y_0+hf(t_0, y_0)=1+(0.5)(2\cos(0)-\sin(0))=2. \end{align*} But how do I determine if Euler's method is stable? I know that for the equation $y'=\lambda y$, Euler's method is stable for $|1+h\lambda| \leq 1$, but since this problem is in a different form I'm not sure what I need to do here.
Thanks !
You apply the Euler step to the first-order system. $$u_1=u_0+hu_0'=u_0+hv_0,\\ v_1=v_0+hv_0'=v_0-hu_0.$$ As the Euler step is tangential to the convex solution curve, it will always move outwards, away from the center of the concentric exact solution curves.