First version of Heun's method