MATLAB: To find the root of quantum transcendental equation

MATLAB

Vc = 0.5;
c = 3e8;
m0 = 0.511e6/c^2;
me1 = 0.067*m0;
me2=0.039*m0;
hr = 6.58e-16;
k= sqrt(2*me1*Ee/hr^2);
K= sqrt(2*me2*(Vc-Ee)/hr^2);
R=2e-9;
equation K*cot(K*R)= -k
how to find the root of this eqution

Best Answer

Hi pl,
The boundary condition K*cot((KR) = -k (denoted by bc1 below) is for a wave function that is proportional to sin(KR) in the potential well, giving the odd parity states. However, it appears that your potential well is not deep enough to support any of those states. Plot 1 does not show a crossing for the would-be first excited state.
The even parity states are proportional to cos(KR) in the well; that boundary condition is denoted by bc0 below. Plot 2 shows a crossing and there is a solution for the ground state.
Vc = .5;
Ee = 0:.01:Vc-.01;
c = 3e8;
m0 = 0.511e6/c^2;
me1 = 0.067*m0;
me2=0.039*m0;
hr = 6.58e-16;
R=2e-9;
k= sqrt(2*me1*Ee/hr^2);
K= sqrt(2*me2*(Vc-Ee)/hr^2);
bc1 = K.*cot(K*R); % = -k; first excited state and odd parity states
bc0 = -K.*tan(K*R); % = -k; ground state and even parity states
figure(1)
plot(Ee,bc1,Ee,-k); grid on
figure(2)
plot(Ee,bc0,Ee,-k); grid on
% solution
ks = @(Ee) sqrt(2*me1*Ee/hr^2);
Ks = @(Ee) sqrt(2*me2*(Vc-Ee)/hr^2);
fun = @(Ee) -Ks(Ee).*tan(Ks(Ee)*R) + ks(Ee);
Ee_groundstate = fzero(@(Ee) fun(Ee),[0 .5])