Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
MATLAB modeling of finite quantum model

Subject: MATLAB modeling of finite quantum model

From: Nikolaus Jewell

Date: 16 Aug, 2008 03:22:02

Message: 1 of 3

I am currently programming a model of a finite quantum well and have run
into a couple of problems. After applying boundary conditions, I get two
equations:

tan(theta) = sqrt(theta_knot^2/theta^2 - 1)
cot(theta) = -sqrt(theta_knot^2/theta^2 -1)

The parameters theta and theta_knot have the width of well, barrier potential,
and mass of the electron embedded in them.

I tried solving this in two ways:

1) I arranged loops to solve using the "solve" command for transcendental
equation but the cotangent argument was causing a problem.

2) My other attempt consisted of incrementing theta between odd intervals of
pi for tangent and even intervals of pi for cotangent until upon substitution
into the above equations they did equal within 0.00000001. This approach is
currently giving me some problems. Am on I doing this correctly or is there a
better way. A friend suggested using Newton-Raphson method but I am
unsure how to apply this because as far as I am aware that method is for
finding zeroes and I am interested in the intersections of these equations so
that I can derive the possible energy levels. Thanks in advance.

Nik

Subject: MATLAB modeling of finite quantum model

From: Roger Stafford

Date: 16 Aug, 2008 19:07:02

Message: 2 of 3

"Nikolaus Jewell" <nik.jewell@gmail.com> wrote in message <g85h4q$1bs
$1@fred.mathworks.com>...
> ......
> tan(theta) = sqrt(theta_knot^2/theta^2 - 1)
> cot(theta) = -sqrt(theta_knot^2/theta^2 -1)
> .......

  If you are looking for real solutions and if 'sqrt' is considered non-negative,
there are no solutions to your two equations! You have only to multiply the
left and right sides of the equations and get the impossible equality

 1 = -(sqrt(theta_knot^2/theta^2 - 1))^2

to see that.

  If you permit one of the above square roots to be negative, you have

 1 = theta_knot^2/theta^2 - 1,

which leads to

 tan(theta) = + or - sqrt(1) = +1 or -1.

Hence theta = pi/4, 3*pi/4, 5*pi/4, or 7*pi/4. Also

 theta_knot = + or - theta*sqrt(2)

  I would suggest you look more carefully into whatever analysis went into
these original two equations of yours and see if some unwarranted
assumptions were made.

Roger Stafford

Subject: MATLAB modeling of finite quantum model

From: Per Sundqvist

Date: 16 Aug, 2008 19:43:02

Message: 3 of 3

"Nikolaus Jewell" <nik.jewell@gmail.com> wrote in message
<g85h4q$1bs$1@fred.mathworks.com>...
> I am currently programming a model of a finite quantum
well and have run
> into a couple of problems. After applying boundary
conditions, I get two
> equations:
>
> tan(theta) = sqrt(theta_knot^2/theta^2 - 1)
> cot(theta) = -sqrt(theta_knot^2/theta^2 -1)
>
> The parameters theta and theta_knot have the width of
well, barrier potential,
> and mass of the electron embedded in them.
>
> I tried solving this in two ways:
>
> 1) I arranged loops to solve using the "solve" command for
transcendental
> equation but the cotangent argument was causing a problem.
>
> 2) My other attempt consisted of incrementing theta
between odd intervals of
> pi for tangent and even intervals of pi for cotangent
until upon substitution
> into the above equations they did equal within 0.00000001.
This approach is
> currently giving me some problems. Am on I doing this
correctly or is there a
> better way. A friend suggested using Newton-Raphson method
but I am
> unsure how to apply this because as far as I am aware that
method is for
> finding zeroes and I am interested in the intersections of
these equations so
> that I can derive the possible energy levels. Thanks in
advance.
>
> Nik
>
>
>

Hi, It does not seem likely that you get only trigonometric
functions, because the wave functions in the barrier must
decay, something like exp(-kappa*x)
,kappa=sqrt(2*m*(V-E)/hbar^2) and in the well
exp(i*k*x),exp(-i*k*x), etc. Fitting Psi and derivatives at
x=0 and L gives you a linear problem with 4 unknown
coefficcients. Taking the determinant=0 you get a
oscillating expression weighted with cosh and sinh
contributions as I remember (simplify by using simple if you
have symbolic toolbox).

You should NOT try to arrange things like: cos+k^2sin=0 into
tan(x(E))=-1/k^2 because tan is much more difficult to solve
than the original:
f(E)=cos+k^2sin=0 (now more complicated in the finite wall
problem). Just use plot(Evec,fvec) to see graphically where
your zeros are and you get the eigenvalues there.

Good luck,
Per

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us