function DD= deter(om);
global ro go        % for boundary condition
global omegao2 lorder
%global Xfin_i Yfin_i Xfin_o Yfin_o
global sol_out sol_in kk_out
global r_in r_cut r_out
omegao2=om;
r_tp=r_in^(lorder-1);
Y0 = [omegao2*r_in*r_tp; lorder*r_tp];
opt_ode = odeset('RelTol',3e-5);
sol_in = ode45(@Diffur, [r_in r_cut], Y0, opt_ode);
%[Xfin_i, Yfin_i] = ode45('Diffur', [r_in r_cut], Y0, opt_ode);
Yf0 = deval (sol_in, r_cut);
%Yf0=Yfin_i(:,end);
% downward
Y0 = [go(1); 1];
sol_out = ode45(@Diffur, [r_out r_cut], Y0, opt_ode);
%[Xfin_o, Yfin_o] = ode45('Diffur', [r_out r_cut], Y0, opt_ode);
%
Yf1 = deval(sol_out, r_cut);
kk_out=Yf0(1)/Yf1(1);
%
DD=det([Yf0 Yf1]);