Runge-Kutta Method

The Runge-Kutta method (fourth order) approximates the solution of an initial value problem of the form y' = f(x,y), y(x_0) = y_0.

In the script below, enter f(x,y), x_0, y_0, and b, where [x_0, b] is the interval over which you want to approximate. Also enter n, the number of subintervals of [x_0, b] you want to use. (Then h = (b - x_0)/n is the step size.) When entering f(x,y), you can use +, -, *, /, ^, ( ), abs(), sin(), cos(), tan(), exp(), log(), log10(), asin(), acos(), atan(), pi, e. Take care to remember the * in all multiplications and avoid discontinuities. Also, note that here, log() stands for the natural logarithm, while log10() stands for the common logarithm. When entering x_0, y_0, and b, you can use integers and decimals. Press the "Calculate" button to get the trajectory traced out by the Runge-Kutta method.


     f(x, y) =

     x_0 =      y_0 =

     b =      n =   


arrowBack to the Protas home page