% 
% Specify range of S= sigma*dt

sr = -3:0.1:3;
si = -3:0.1:3;
[Sr Si] = meshgrid(sr,si);
S = Sr + Si*1i;

subplot(2,2,1)
A = 1 + S + S.^2/2;
contour(sr,si,abs(A),[1,1]);
xlabel('Re[\sigma\Delta t]')
ylabel('Im[\sigma\Delta t]')
text(1,0,'|A|>1')
text(-1,0,'|A|<1')
axis square
title('2nd order Runge-Kutta')

subplot(2,2,2)
A = 1 + S + S.^2/2 + S.^3/6 + S.^4/24;
contour(sr,si,abs(A),[1,1]);
xlabel('Re[\sigma\Delta t]')
ylabel('Im[\sigma]\Delta t]')
text(1,0,'|A|>1')
text(-1,0,'|A|<1')
axis square
title('4th order Runge-Kutta')