Message Boards Message Boards

Solve a single PDE?

GROUPS:

Hi there, i've been doing some quantum mechanics and I wanted to solve the time dependent Schrodinger equation in 1 spacial dimension with a periodic potential in time, yet whenever I use Mathematica's DSolve tool, I get the same argument that I input as an output.. my argument goes as follows:

A=-6.104263*10^-39 ; B= i*6.625*10^-34 ;
s=DSolve[ {A*D[\[Ψ][x,t],x,x]+Sin[2\[Pi]*t]*\[Ψ][x,t]+B*D[\[Ψ][x,t],t]==0 ,\[Ψ][0,t]==0, \[Ψ][0.005,t]==0},\[CapitalPsi],{x,t}]

I've even set a boundary condition, I just don't know what I'm doing incorrectly

POSTED BY: aly ghobashy
Answer
3 months ago

I guess you need NDSolve since you are having numerical constants in your equations

POSTED BY: Sander Huisman
Answer
3 months ago

using the exact same code?

POSTED BY: aly ghobashy
Answer
3 months ago

Something like:

A=-6.104263*10^-39;B=I*6.625*10^-34;
s=NDSolve[{A*D[\[CapitalPsi][x,t],x,x]+Sin[2\[Pi]*t]*\[CapitalPsi][x,t]+B*D[\[CapitalPsi][x,t],t]==0,\[CapitalPsi][0,t]==0,\[CapitalPsi][0.005,t]==0},\[CapitalPsi][x,t],{x,0,0.005},{t,0,1}]

note also that imaginary i is capital I in Wolfram Language

POSTED BY: Sander Huisman
Answer
3 months ago

holy molly it actually worked :D how do i plot it now?

POSTED BY: aly ghobashy
Answer
3 months ago
A=-6.104263*10^-39;B=I*6.625*10^-34;
out=NDSolve[{A*D[\[CapitalPsi][x,t],x,x]+Sin[2\[Pi]*t]*\[CapitalPsi][x,t]+B*D[\[CapitalPsi][x,t],t]==0,\[CapitalPsi][0,t]==0,\[CapitalPsi][0.005,t]==0},\[CapitalPsi],{x,0,0.005},{t,0,1}]

sol=\[CapitalPsi]/.First[out]
Plot3D[Im[sol[x,t]],{x,0,0.005},{t,0,1},WorkingPrecision->100]

As you can see the solution is kinda boring; it is zero everywhere. That's because your boundary conditions are 0...

POSTED BY: Sander Huisman
Answer
3 months ago

hahahaha but wait, thats because it has to be... the wave function has to equal zero at the boundries...

POSTED BY: aly ghobashy
Answer
3 months ago

Group Abstract Group Abstract