Non trivial solution to Schrödinger equation for 1-D infinite well

Click For Summary

Discussion Overview

The discussion revolves around finding a non-trivial solution to the Schrödinger equation for a one-dimensional infinite potential well using MATLAB. Participants explore issues related to boundary conditions and the quantization of energy levels.

Discussion Character

  • Technical explanation
  • Homework-related

Main Points Raised

  • One participant expresses difficulty in obtaining a non-trivial solution from MATLAB, specifically mentioning that the software returns coefficients of zero when applying boundary conditions.
  • Another participant suggests that the issue arises because MATLAB is attempting to solve the equation for an arbitrary energy, which typically does not yield a solution, and emphasizes that energy must be quantized.
  • A suggestion is made to solve the differential equation using one boundary condition first, leaving one integration constant, and then use the second boundary condition to determine the quantized energy levels.
  • Participants discuss alternatives for symbolic computations, with one recommending Mathematica and another mentioning Maple as a popular option.

Areas of Agreement / Disagreement

Participants generally agree on the need for quantization of energy levels in the context of the Schrödinger equation, but there is no consensus on the best approach to modify the MATLAB code or the ideal software for symbolic calculations.

Contextual Notes

Limitations include the dependence on the specific setup of the Schrödinger equation and the assumptions regarding the boundary conditions and energy quantization.

MrMuscle
Messages
12
Reaction score
1
TL;DR
Hello, I am trying to find the solution of Schrödinger equation on matlab. However, when I apply boundary conditions, MATLAB only gives me the solution with both coefficients 0. I want to find the solution : Asin(n*pi*x/L)
You can see my code below. Could you please tell me where is my mistake?
Thanks in advance!
Hello, I am trying to find the solution of Schrödinger equation on matlab. However, when I apply boundary conditions, MATLAB only gives me the solution with both coefficients 0. I want to find the solution : Asin(n*pi*x/L)
You can see my code below. Could you please tell me where is my mistake?
Thanks in advance!

clear,clc %Solution of Schrödinger eqn with 1-D infinite well
syms WF(x) V(x) %WF is the wavefunction, V(x) is the potential
syms hbar m L E positive %E energy, L length of the well, m mass, hbar reduced Planck
V(x)=0 %Potential
Sch=((-hbar^2)/(2*m))*diff(WF,x,2)+V*WF==E*WF %Schrödinger equation

Solution1=dsolve(Sch) %Solution without applying boundary conditions

%BOUNDARY CONDITIONS
cond1=WF(0)==0;
cond2=WF(L)==0;
conds=[cond1 cond2];
Solution2=dsolve(Sch,conds) %Solution with applying boundary conditions.
 
Physics news on Phys.org
Matlab is trying to solve your setup for an arbitrary energy ##E##. This will generally not have a solution but ##E## will be quantised. What you want to do is to solve the differential equation using one of the boundary conditions, leaving you one integration constant. Then you can solve the second boundary condition for the energy. This will give you the quantised energy levels.

Note that MATLAB is not the ideal for symbolic computations.
 
  • Like
Likes   Reactions: MrMuscle and PeroK
Thanks for the answer! what would you suggest for symbolic calculations?
Also, do you have any suggestions about how to modify the code?
 
Personally, I would use Mathematica. Maple is also popular.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
4K
Replies
7
Views
2K
Replies
8
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 17 ·
Replies
17
Views
3K
Replies
1
Views
2K
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 39 ·
2
Replies
39
Views
14K