Talk:Heun's method

Latest comment: 15 years ago by Jitse Niesen in topic Also called Explicit Trapezoidal Method

Tableau edit

The Butcher tableau does not correspond with the equation; the tableau corresponding to the equations is

0
1 1
1/2 1/2

Furthermore, I always thought that Heun's method refers to the three-stage third-order method (sorry, I'm too lazy to format it correctly)

 0  |
1/3 | 1/3
2/3 |  0  2/3
----+-------------
    | 1/4  0  3/4

I'll try to consult some books next week. -- Jitse Niesen (talk) 12:39, 14 June 2007 (UTC)Reply

You are absolutely right on the tableau-bug, that was copy and paste that went on too quickly. With regard to which method is Heun's, I've seen both (now that you have reminded me), but the simpler one is prominent, as also a quick google search confirms. Though I suppose both can be mentioned in this article. --Berland 20:49, 14 June 2007 (UTC)Reply

Heun's method is not the modified Euler's method! edit

In all my textbooks (they are in Italian, but for what I saw the used language is the same as English, unlike for calculus), I can find that while Heun's method has equation:

 

like in the article, while modified Euler's method has equation:

 

with tableau:

0
1/2 1/2
0 1

So, I consider what the article claims ("Heun's method is also sometimes called the modified Euler method.") simply as an error. I'm correcting the article myself, but I'm mentioning it here to allow being corrected. --Blaisorblade (talk) 14:35, 3 February 2008 (UTC)Reply

Also called Explicit Trapezoidal Method edit

In Ascher and Petzold "Computer methods for ODEs and DAEs" which is a standard text for numerical analysis here at the University of Arizona, they also refer to this as the "Explicit Trapezoidal Method" for obvious reasons. A google search for explicit trapezoidal method doesn't turn up much, so this terminology might be non-standard. It could be helpful to add a redirect from ETM to here though. Bradweir (talk) 23:44, 23 April 2009 (UTC)Reply

I agree, so I added this term. -- Jitse Niesen (talk) 10:51, 24 April 2009 (UTC)Reply

"Final Approximation" is just an intermediate step edit

In my textbook (Stöcker 4th Edition, Mathematical Formulas), in Heuns Method (also called Predictor-Corrector method) every step itself is iterative (also visible in the example code).

What is called "Final Approximation" in the Wikipedia article is in this book just a next prediction. This steps are repeated until an error metric is below a given threshold, then the next y_n is calculated and so on. Some pseudo code

def heun(f, t_end, h, y0):
	y = y0
	t = 0.0
	while t < t_end:
		fy = f(t, y)
		y_predict = y + h * fy
		while err > thr:
			y_next = y + (h / 2) * (fy + (f(t + h, y_predict)))
			err = (y_next - y_predict) / y_next
			y_predict = y_next
		y = y_next
		t += h
	return y