Heun's method: Difference between revisions

Content deleted Content added
Line 42:
:<math>\textstyle \Delta y = h (Slope_{ideal})</math>
 
:<math>\textstyle x_{ni+1} = x_i + h</math>, <math>\textstyle y_{n+1} = y_i + \Delta y</math>
:<math>\textstyle y_{ni+1} = y_i + h Slope_{ideal}</math>
:<math>y_{ni+1} = y_{ni} + \frac{1}{2} h (Slope_{left} + Slope_{right})</math>
 
:<math>y_{ni+1} = y_{ni} + \frac{1}{2} h (f(x_i, y_i) f(x_i + h, y_i + hf(x_i, y_i)))</math>
or
:<math>y_{ni+1} = y_{ni} + \frac{h}{2}(f(x_i, y_i) + f(x_i + h, y_i + hf(x_i, y_i)))</math>
 
The accuracy of the Euler method improves only linearly with the step size is decreased, whereas the Heun Method improves accuracy quadratically