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

Homework Help: Runge Kutta method help

  1. Dec 10, 2007 #1
    1. The problem statement, all variables and given/known data
    I really am desperate for help on this one.
    I need to use the runge kutta method to approximate the motion of an electron in the potential below. The T.I.S.E is known, and I have to try and use the runge kutta method to find the wavefunction of the particle.

    [tex] V(x) = infinity [/tex] for |x|>1
    [tex] V(x) = 0 [/tex] for 0.2<|x|<1
    [tex] V(x) = 50 [/tex] for |x|<0.2

    2. Relevant equations
    The time independant schrodinger equation.

    3. The attempt at a solution
    I don't even know where to start. Any form of help would be appreciated. I have found examples of its implementation from google, but all of the websites found only involve first order differential equations.
  2. jcsd
  3. Dec 10, 2007 #2
    I have made last year a program to solve diff equations, if u want i can send it to u.
    But i firts suggest u to start with eulers method than it would be easier to get the runge kutta one.
  4. Dec 10, 2007 #3
    I would be very very grateful to have a look at your program, I will study euler's method, see if that helps. I understand the principle of how the ruger kutta method works, but all the examples I have involve 1st order differential equations, I have a second order, and I'm not sure how you deal with coupled differential equations. If I understood that, then the task wouldnt be any where as difficult.
  5. Dec 10, 2007 #4


    User Avatar
    Homework Helper
    Gold Member

    You can reduce higher order diff eqns to a system of first order eqns by an appropriate change of variables. For example, if the equation is,

    [tex]\psi '' + A(x) \psi = B \psi[/tex]

    set ,

    [tex]\psi = x1[/tex]
    [tex]\psi ' = x2[/tex]

    So that, your system of equations is now

    [tex] x2' = \left(B-A(x)\right)x1[/tex]


    [tex] X = \left(\begin{array}{c}x1 \\ x2\end{array}\right)[/tex]

    You need to solve,

    [tex]\frac{d}{dt} \left(\begin{array}{c}x1 \\ x2\end{array}\right) = \left(\begin{array}{cc} 0&1 \\ B-A(x)&0\end{array}\right) \left( \begin{array}{c}x1 \\ x2\end{array}\right)[/tex]

    If you know the initial values [tex]\psi(0)[/tex] and [tex]\psi'(0)[/tex], you can use any runge kutta method to the above system. The only difference is that, in this case the values of k1,k2,etc in the rk schemes will be matrices.
    Last edited: Dec 10, 2007
  6. Dec 11, 2007 #5
    Siddharth. Once again, you have no idea how useful your posts have been. Thank you. That cleared up alot of problems I had.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook