http://www.mathworks.com/matlabcentral/newsreader/view_thread/194039
MATLAB Central Newsreader  MATLAB modeling of finite quantum model
Feed for thread: MATLAB modeling of finite quantum model
enus
©19942014 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Sat, 16 Aug 2008 03:22:02 +0000
MATLAB modeling of finite quantum model
http://www.mathworks.com/matlabcentral/newsreader/view_thread/194039#510862
Nikolaus Jewell
I am currently programming a model of a finite quantum well and have run <br>
into a couple of problems. After applying boundary conditions, I get two <br>
equations: <br>
<br>
tan(theta) = sqrt(theta_knot^2/theta^2  1)<br>
cot(theta) = sqrt(theta_knot^2/theta^2 1)<br>
<br>
The parameters theta and theta_knot have the width of well, barrier potential, <br>
and mass of the electron embedded in them. <br>
<br>
I tried solving this in two ways:<br>
<br>
1) I arranged loops to solve using the "solve" command for transcendental<br>
equation but the cotangent argument was causing a problem.<br>
<br>
2) My other attempt consisted of incrementing theta between odd intervals of <br>
pi for tangent and even intervals of pi for cotangent until upon substitution <br>
into the above equations they did equal within 0.00000001. This approach is <br>
currently giving me some problems. Am on I doing this correctly or is there a <br>
better way. A friend suggested using NewtonRaphson method but I am <br>
unsure how to apply this because as far as I am aware that method is for <br>
finding zeroes and I am interested in the intersections of these equations so <br>
that I can derive the possible energy levels. Thanks in advance.<br>
<br>
Nik

Sat, 16 Aug 2008 19:07:02 +0000
Re: MATLAB modeling of finite quantum model
http://www.mathworks.com/matlabcentral/newsreader/view_thread/194039#510912
Roger Stafford
"Nikolaus Jewell" <nik.jewell@gmail.com> wrote in message <g85h4q$1bs<br>
$1@fred.mathworks.com>...<br>
> ......<br>
> tan(theta) = sqrt(theta_knot^2/theta^2  1)<br>
> cot(theta) = sqrt(theta_knot^2/theta^2 1)<br>
> .......<br>
<br>
If you are looking for real solutions and if 'sqrt' is considered nonnegative, <br>
there are no solutions to your two equations! You have only to multiply the <br>
left and right sides of the equations and get the impossible equality<br>
<br>
1 = (sqrt(theta_knot^2/theta^2  1))^2<br>
<br>
to see that.<br>
<br>
If you permit one of the above square roots to be negative, you have<br>
<br>
1 = theta_knot^2/theta^2  1,<br>
<br>
which leads to<br>
<br>
tan(theta) = + or  sqrt(1) = +1 or 1.<br>
<br>
Hence theta = pi/4, 3*pi/4, 5*pi/4, or 7*pi/4. Also<br>
<br>
theta_knot = + or  theta*sqrt(2)<br>
<br>
I would suggest you look more carefully into whatever analysis went into <br>
these original two equations of yours and see if some unwarranted <br>
assumptions were made.<br>
<br>
Roger Stafford

Sat, 16 Aug 2008 19:43:02 +0000
Re: MATLAB modeling of finite quantum model
http://www.mathworks.com/matlabcentral/newsreader/view_thread/194039#510916
Per Sundqvist
"Nikolaus Jewell" <nik.jewell@gmail.com> wrote in message<br>
<g85h4q$1bs$1@fred.mathworks.com>...<br>
> I am currently programming a model of a finite quantum<br>
well and have run <br>
> into a couple of problems. After applying boundary<br>
conditions, I get two <br>
> equations: <br>
> <br>
> tan(theta) = sqrt(theta_knot^2/theta^2  1)<br>
> cot(theta) = sqrt(theta_knot^2/theta^2 1)<br>
> <br>
> The parameters theta and theta_knot have the width of<br>
well, barrier potential, <br>
> and mass of the electron embedded in them. <br>
> <br>
> I tried solving this in two ways:<br>
> <br>
> 1) I arranged loops to solve using the "solve" command for<br>
transcendental<br>
> equation but the cotangent argument was causing a problem.<br>
> <br>
> 2) My other attempt consisted of incrementing theta<br>
between odd intervals of <br>
> pi for tangent and even intervals of pi for cotangent<br>
until upon substitution <br>
> into the above equations they did equal within 0.00000001.<br>
This approach is <br>
> currently giving me some problems. Am on I doing this<br>
correctly or is there a <br>
> better way. A friend suggested using NewtonRaphson method<br>
but I am <br>
> unsure how to apply this because as far as I am aware that<br>
method is for <br>
> finding zeroes and I am interested in the intersections of<br>
these equations so <br>
> that I can derive the possible energy levels. Thanks in<br>
advance.<br>
> <br>
> Nik<br>
> <br>
> <br>
> <br>
<br>
Hi, It does not seem likely that you get only trigonometric<br>
functions, because the wave functions in the barrier must<br>
decay, something like exp(kappa*x)<br>
,kappa=sqrt(2*m*(VE)/hbar^2) and in the well<br>
exp(i*k*x),exp(i*k*x), etc. Fitting Psi and derivatives at<br>
x=0 and L gives you a linear problem with 4 unknown<br>
coefficcients. Taking the determinant=0 you get a<br>
oscillating expression weighted with cosh and sinh<br>
contributions as I remember (simplify by using simple if you<br>
have symbolic toolbox). <br>
<br>
You should NOT try to arrange things like: cos+k^2sin=0 into<br>
tan(x(E))=1/k^2 because tan is much more difficult to solve<br>
than the original: <br>
f(E)=cos+k^2sin=0 (now more complicated in the finite wall<br>
problem). Just use plot(Evec,fvec) to see graphically where<br>
your zeros are and you get the eigenvalues there.<br>
<br>
Good luck,<br>
Per