% BDF2
%

f=@(hlambda) abs(2-sqrt(1+2*hlambda))./abs(2+sqrt(1+2*hlambda));
g=@(hlambda) abs(2+sqrt(1+2*hlambda))./abs(3-2*hlambda);
my_f=@(lambda) f(lambda)
a=-5:0.1:5;
b=-4:0.1:4;
stability(a,b,my_f)
my_g=@(lambda) g(lambda)
stability(a,b,my_g)

%

function []=stability(a,b,f)
[A,B]=meshgrid(a,b);
all_f=f(A+B.*1i);
figure
contour(a,b,all_f,150)
hold on
contour(a,b,all_f,[1 1],'r')
hold off
figure  
surf(A,B,all_f)
zlim([0,2])
end