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

Help about the numerical computation on the following equations

  1. Oct 17, 2007 #1
    Dear every memeber, I encountered the numerical computation on the following
    differential equations. I use four-step Runge-Kutta methods to integrate, but
    the result is not converge, even if I take the time step (t=0.0001).
    please help me why so? Could you please tellme which Fortran subroutine can do the tasks? (I know the following equations has exact solutions.)

    [tex]i\frac{dy_1}{dt}=20.0y_2; \\ i\frac{dy_2}{dt}=20.0y_1[/tex]
  2. jcsd
  3. Oct 18, 2007 #2


    User Avatar
    Science Advisor

    What do you mean by "converge"? Runge-Kutta gives a specific result, there is no "convegence" involved. Or do you mean "converge, as the time step gets smaller, to the answer I get by integrating directly"?
  4. Oct 18, 2007 #3


    User Avatar

    Why the "i"?
  5. Oct 18, 2007 #4
    "i" is the imaginary unit.
    I tried Runge-Kutta in IMSL, and code in the well-known book 'numerical recipe'.
    They can not give the correct result. The original equations are 2500 differential equations looking like this
    [tex]i\frac{dp_{ij}}{dt}=-50*(p_{i+1,j}+P_{i-1,j})+50*(p_{i,j-1}+P_{i,j+1})))-ip_{ij}/5 [/tex]

    Please help me, Dudes.

    I can not obtained the correct numerical result.
  6. Oct 19, 2007 #5
    Does not look very bad. I think you should first write the equations in the form that does not involve i-s.
  7. Oct 19, 2007 #6
    Thank you, timur, J77 , Hallsofivy

    +50 should be -50.
    The problem is that it is high oscillatory, I can obtained the numerical result when
    i=1,2,3, and j=1,2,3. when i is larger than 3, the numerical result start to diverge.
    That is very tricky

    the correct equations should be


    i is the the imaginary unit
  8. Oct 19, 2007 #7
    I solved it.
    Last edited: Oct 20, 2007
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook