Contents
ALGORITHMS
Site map
Links
Site and author
News
About the site
FAQ
Contact
TERMS OF USE
Contents - Differential equations - Runge-Kutta method for a system of ODEs

Fourth order Runge-Kutta method for a system of ODEs

This set of routines numerically integrates the system of ordinary differential equations div(dy_i_,dx)=F_i_(x,y_1_,..,y_n_), x∈ using a fourth order Runge-Kutta method with fixed step size. The user supplies the routine F(I,X,Y), which returns value of dYi/dx at (x,y1,..yn).

The routine SystemRungeKuttStep

The routine SystemRungeKuttStep performs one step of Runge-Kutta method.

The input parameters are given below:

  • X is the starting value of independent variable X.
  • H is the step to take.
  • N is the number of equations.
  • Y is an array of N elements. Contains initial values of the dependent variables. Numbering of elements starts at 1 and ends at N.

The output parameters are given below:

  • Y - An array of N elements. Contains values of the dependent variables at point X+H. Numbering of elements starts at 1 and ends at N.

The routine SystemRungeKutt

The routine SystemRungeKuttStep performs M steps of fourth order Runge-Kutta method.

The input parameters are given below:

  • X is the starting value of the independent variable X.
  • X1 is the ending value of the independent variable X.
  • M is the number of steps to take
  • N is the number of equations
  • Y is an array of N elements. Contains initial values of dependent variables. Numbering of elements starts at 1 and ends at N.

The output parameters are given below:

  • Y is an array of N elements. Contains values of dependent variables at point X1. Numbering of elements starts at 1 and ends at N.

Report a bug

Source codes

C#

C# 1.0 source.
rungekuttasys.csharp.zip - Fourth order Runge-Kutta method for a system of ODEs


C++

C++ source.
rungekuttasys.cpp.zip - Fourth order Runge-Kutta method for a system of ODEs
ablas.zip - optimized basic linear algebra subroutines with SSE2 support (for C++ sources only)


Delphi

Delphi source.
Can be compiled under FPC (in Delphi compatibility mode).
rungekuttasys.delphi.zip - Fourth order Runge-Kutta method for a system of ODEs


Visual Basic 6

Visual Basic 6 source.
rungekuttasys.vb6.zip - Fourth order Runge-Kutta method for a system of ODEs


Zonnon beta

Zonnon source.
Zonnon is an experimental language developed at ETH Zurich.
See www.zonnon.ethz.ch for more information.
rungekuttasys.zonnon.zip - Fourth order Runge-Kutta method for a system of ODEs



 
 
Sergey Bochkanov, Vladimir Bystritsky
Copyright © 1999-2008