Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Quantum SHO Ladder Operator in Mathcad

  1. Sep 21, 2007 #1
    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?

    Attached Files:

  2. jcsd
  3. Sep 21, 2007 #2
    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:

    Attached Files:

  4. Sep 21, 2007 #3
    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?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook