Quantum SHO Ladder Operator in Mathcad

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 4K views
bugbug
Messages
10
Reaction score
0
A Quantum I problem set asks me to graph the first 15 states of the simple harmonic oscillator. Our department uses mathcad heavily, so I think I should write a function that applies the ladder operator repeatedly to generate the wave function. I'm having trouble getting it to actually return a function to me though. Enclosed is the little loop I have written. Any advice on making this actually work?
 

Attachments

  • quantumsholadder.GIF
    quantumsholadder.GIF
    1.8 KB · Views: 562
Physics news on Phys.org
I figured out the problem. I need to assign the result of the application of the wave function to an intermediate function before assigning it back to psi:
 

Attachments

  • quantumsholadderfix.GIF
    quantumsholadderfix.GIF
    2.1 KB · Views: 570
All right. Now I have another problem. When I attempt to graph psi 3 (x) it takes an extraordinarily long time to process. But if I apply simplify to psi n of x and then paste that into the graph it evaluates in much, much less time. Is there any way to automate this process?