% Mingbo Cai
% 10/23/08
%
% To find the intability onset condition
% In implementation the authors did not consider the "2" in equation B.4
function bJ1 = findhete(lambda1, lambda2, bJ2, n)
term1 = 1/2 - bJ2*(1-(-1)^n*exp(-180/2/lambda2))/(1+4*n^2*(lambda2*pi/180)^2);
term2 = (1+4*n^2*(lambda1*pi/180)^2)/(1-(-1)^n*exp(-180/2/lambda1));
bJ1 = term1 * term2;