Numerical integration of ordinary first order differential equations

The initial value problem consists of a first order differential equation and an initial condition:

y(t,y(t)) = f(t,y(t)) for t0 ≤ t ≤ tEnd and given y(t0)=y0.

This is solved numerically with different onestep methods, i.e. the solution y(t) is determined approximately.
The determined solution is displayed graphically and in form of a table.

If the differential equation is given in a different form, it must first be converted to the specified form,
i.e. solved for the first derivative y. The program then only expects the right hand side as input and the initial condition.

The program uses t as an independent variable because typical applications of the initial value problem
have time as independent variable. So if you have a differential equation with x as an independent variable, you have to replace all x by t.

The method used and the selected step size Δt of the integration largely determine the quality of the approximate solution.
For all methods, the value Δt is also the step size for the graphic output.
This also applies to the Runge-Kutta method with automatic step size control. Internally, however, problem-adjusted increments are used.





more JavaScript applications