File Exchange

image thumbnail

Runge-Kutta-Fehlberg (RKF78)

version (2.78 MB) by Meysam Mahooti
Fehlberg's 7th and 8th Order Embedded Method


Updated 23 Nov 2019

View License

One way to guarantee accuracy in the solution of an I.V.P. is to solve the problem twice using step sizes h and h/2 and compare answers at the mesh points corresponding to the larger step size. But this requires a significant amount of computation for the smaller step size and must be repeated if it is determined that the agreement is not good enough. The Fehlberg method is one way to try to resolve this problem. It has a procedure to determine if the proper step size h is being used. At each step, two different approximations for the solution are made and compared. If the two answers are in close agreement, the approximation is accepted. If the two answers do not agree to a specified accuracy, the step size is reduced. If the answers agree to more significant digits than required, the step size is increased.

Cite As

Meysam Mahooti (2020). Runge-Kutta-Fehlberg (RKF78) (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (5)

Doesnt work

qian xiao

I think a h is missed in the error estimated formulation in Runge_Kutta.m, and why it is so slow on the running of the test code?

Demi Moore


test_Runge_Kutta_Fehlberg_7_8.m is modified and output.txt is added to reveal tremendous accuracy and speed of Runge-Kutta-Fehlberg (RKF78).

test_Runge_Kutta_Fehlberg_7_8.m is modified.


Title is changed.

MATLAB Release Compatibility
Created with R2019a
Compatible with any release
Platform Compatibility
Windows macOS Linux