This is an applet to explore Runge Kutta method. This numerical method to approximate solutions to differential equations is very powerful.
However the truncation error generated by this method has to be understood in order to make a good use of it.
Consider the following differential equation:
with y(x0) = K (initial or starting value of y)
We wish to approximate the solution to this equation over the interval [a,b]. Let divide this interval into n smaller intervals of size h. A numerical approximation to the above differential equation may be obtained using the 4th order Runge Kutta method as follows.
The local truncation error is of the order O(h5) and in principle decreases as h decreases.
The exploration is carried by changing the step size h.
All the differential equations used in the applet have the same initial value y(0) = 1 and exact solutions for comparison.
1 - click on the button above "click here to start" and MAXIMIZE the window obtained.
2 - Select the first (left panel, top) differential equation y' = x2. At the start h = 1.25 and n = 8. Examine the exact (ex value) solution and the approximate (ap value) one on the left panel. Decrease h by increasing n, read h and n top right. Any differences?
3 - Select the second diffenrial equation y' = x4. Explore by deceasing h and compare the exact and approximate values.
4 - Select the two other differential equations and analyze the results. Compare the exact and approximate values.