Numerical Analysis/stability of RK methods/exercises

Ex:1
find the stability function for RK2 which is given by: $$ y_{n+1}=y_{n}+hf(t+\frac {h}{2},y_{n}+\frac {hf(t_n,y_n)}{2})$$

Solution: applying this method to the test equation $$ y'=\lambda y$$
 * we get $$ \begin{align}

y_{n+1} &=y_n+h \lambda y_n+\frac {(h \lambda)^2}{2}y_n \\ \Rightarrow \end{align}$$ the stability polynomial $$ \phi(z)=1+h \lambda +\frac {(h \lambda)^2}{2}$$

Ex:2
find the absolute stability region for RK2. Solution: by setting $$ z = h \lambda $$
 * $$ \Rightarrow $$ the abs.stability region is given by $$\{z\in \mathbb{C}||1+ h \lambda + \frac {(h \lambda)^2}{2}| < 1 \}$$

Ex:3
find the characteristic polynomial for RK2. Solution: it is $$ r^{i+1}=(1+z+\frac {z^2}{2})r^i$$ divide both sides of the equation by $$ r^i;r \ne 0$$ you get $$ r^{i+1}=(1+z+\frac {z^2}{2})r^i$$
 * $$ \Rightarrow \phi(r,z)=r-1+z+\frac {z^2}{2}$$

Ex:4
is RK2 stable, if it is what type of stability. Solution: you get $$ r^{i+1}=(1+z+\frac {z^2}{2})r^i$$ by setting z=0,
 * $$ \Rightarrow r=1$$
 * so the method is strongly stable since r=1, is the only root, and has a value of 1.

Ex:5
Determine the stability of Back ward Euler method. Solution: $$ y_{n+1}=y_n+hf(t_{n+1},y_{n+1})$$
 * by applying this method to the test equation
 * then $$ y_{n+1}=y_n+h\lambda y_{n+1}$$
 * and so $$ y_{n+1}=\frac{1}{1+h\lambda }y_{n}$$
 * call $$ z=h\lambda$$ and so:
 * $$ G(z)\longrightarrow 0$$ as $$ Re(z)\longrightarrow \infty$$
 * and so this is L-Stable method when applied to stiff equation.