Ask Your Question

Grim's profile - activity

2021-01-25 20:53:38 +0200 received badge  Student (source)
2021-01-25 19:49:13 +0200 asked a question Trying to solve the Schrodinger equation using sage (well)

Hi guys,

I'm trying to solve the Schrodinger equation through sage, for the potencial well.

I have it:

var('k a ')

psi=function('psi')(x)

eqs=diff(psi,x,2)+k^(2)*psi==0

assume (k>0, a>0 )

EQS=function('EQS')(x)

EQS= desolve (eqs, psi, ivar=x )

var ('A B c')

result0= Acos(k0)+Bsin(k0)==0

result1= Bsin(ka)==0

assume (B>0)

You guys know how can i find the constants A and B through boundary conditions? My conditions are: Psi(0)=0 and Psi(a)=0, If a put it in desolve function it return me zero. So i tried to work with the equations separated but i cannot figure out how to get k=n*pi/a (the expected result)

2021-01-25 19:49:13 +0200 asked a question Solving the Schrodinger equation using sage (Well)

I'm trying to solve the Schrödinger equation through Sage, for the potential well.

I wrote:

k, a = var('k, a')
psi = function('psi')(x)
eqs = diff(psi, x, 2) + k^(2)*psi == 0
assume(k > 0, a > 0)
EQS = function('EQS')(x)
EQS = desolve(eqs, psi, ivar=x)
A, B, c = var('A, B, c')
result0 = A*cos(k*0) + B*sin(k*0) == 0
result1 = B*sin(k*a) == 0
assume(B > 0)

How can i find the constants A and B through boundary conditions?

My conditions are: Psi(0)=0 and Psi(a)=0.

If i put it in desolve function it return me zero.

So i tried to work with the equations separated but i cannot figure out how to get k=n*pi/a (the expected result).