Plain Runge-Kutta algorithm


Vesnog
04-21-2014, 01:39 PM
Greetings,

I am using NR 2nd edition routines in order to solve simple differential equations. I noticed that contrary to what is stated in the book and performed in the example file, the "derivs" function should not be called prior to "rk4"function. If it is called before, odd results are displayed and the solution does not converge to the original value. By the way I am redefining yout and y at the end of each iteration of a for-loop in order to achieve many step integration.