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= A*cos(k*0)+B*sin(k*0)==0

result1= B*sin(k*a)==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)