Calculating Bound States of a Particle in a Triangular Well Using MatLab"

  • MATLAB
  • Thread starter ShayanJ
  • Start date
  • Tags
    Matlab
In summary, the classical turning points for a particle in a symmetric triangular well are found to be at energies that are a multiple of the potential energy. However, when using Numerov's method, the particles ends up with NaN values as their coordinates.
  • #1
ShayanJ
Insights Author
Gold Member
2,810
604
Hi
I'm trying to figure out in what energies the bound states of a particle in a symmetric triangular well happen to be, using MatLab(Actually GNU Octave!)
At first I non-dimensionalized the associated Schrodinger equation and got:
[itex]
\frac{d^2 \varphi}{dy^2}+[ \varepsilon-v(\pm 2y-1) ]\varphi=0
[/itex]
Where the plus and minus signs refer to two sides of the well.
Then I calculated the classical turning points (where the total energy equals the potential energy) and considered a multiple of it as a measure of the distance that the wave function should go to zero:
[itex]
y=\frac 1 2 (\frac \varepsilon v +1)
[/itex]

In this program, I calculate thes stationary states from zero to a multiple of the mentioned point and store its value at that point. Then plot the end points vs the energy to see in what energies the end point is zero.
The problem is, I'm getting NaN as end points! What is wrong?
Thanks

Ohhh...this is the code and I'm using Numerov's method.

PHP:
clear
clc

v=3;
P=-1;

de=.01;
e=[-18:de:-17];
m=length(e);

if(P==1)
	
	phi(1)=1;
	dphi=0;
	
else
	
	phi=0;
	dphi=1;
	
end
	
for j=1:m

	CTP=.5*((abs(e(j))/v)+1);

	dy=.001;
	y=[0:dy:CTP];
	n=length(y);
	y(1)=0;
	
	phi(2)=phi(1)+dphi*dy+(1/2)*(-v-e(j))*phi(1)*dy^2+(1/6)*(2*v*phi(1)+(-v-e(j))*dphi)*dy^3+(1/24)*(4*v*dphi+((-v-e(j))^2)*phi(1))*dy+(1/120)*(4*v*(-v-e(j))*phi(1)+((-v-e(j))^2)*dphi)*dy^5;
	
	for i=2:n-1
	
		phi(i+1)=(2*phi(i)-phi(i-1)+(dy^2)*phi(i)*(v*(2*y(i)-1)-e)+(1/12)*(dy^2)*(phi(i-1)*(v*(2*y(i-1)-1)-e))-2*phi(i)*(v*(2*y(i)-1)-e))/(1-(1/12)*(dy^2)*(v*(2*y(i+1)-1)-e));
	
	end
	
	ephi(j)=phi(n)
	
end
	
plot(e,ephi)
 
  • Like
Likes Milan Bok
Physics news on Phys.org
  • #2
I'm sorry you are not generating any responses at the moment. Is there any additional information you can share with us? Any new findings?
 

1. How do I calculate the bound states of a particle in a triangular well using MatLab?

To calculate the bound states of a particle in a triangular well using MatLab, you will need to use the Schrodinger equation and apply it to the potential energy function of the triangular well. This can be done by using the finite difference method or the shooting method in MatLab.

2. What is the potential energy function for a triangular well?

The potential energy function for a triangular well is a piecewise function that has a constant value inside the well and a larger value outside of the well. It can be represented by the equation V(x) = { 0, if x is within the well; V0, if x is outside the well }, where V0 is the height of the well.

3. What is the Schrodinger equation?

The Schrodinger equation is a fundamental equation in quantum mechanics that describes the evolution of a quantum state over time. In the context of calculating bound states in a triangular well, it is used to find the energy levels of the particle in the well.

4. What is the finite difference method?

The finite difference method is a numerical method used to solve differential equations, such as the Schrodinger equation. It involves discretizing the space and time domains and approximating the derivatives in the equation with finite differences. This method is commonly used in MatLab to solve for the bound states in a triangular well.

5. What is the shooting method?

The shooting method is another numerical method used to solve differential equations. It involves guessing an initial value for the energy of the particle and then iteratively adjusting this value until the solution of the Schrodinger equation matches the boundary conditions of the triangular well. This method is also commonly used in MatLab to calculate the bound states in a triangular well.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • Programming and Computer Science
Replies
1
Views
945
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
128
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • Introductory Physics Homework Help
Replies
17
Views
407
Replies
1
Views
812
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
575
  • Introductory Physics Homework Help
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
Back
Top