Talk:Runge–Kutta methods

From Wikipedia, the free encyclopedia

WikiProject Mathematics
This article is within the scope of WikiProject Mathematics, which collaborates on articles related to mathematics.
Mathematics rating: Start Class Mid Priority  Field: Applied mathematics
One of the 500 most frequently viewed mathematics articles.

Contents

[edit] Definition of h

"...on the order of h4" That's the first mention of h in the article. Perhaps it should be explained somewhere? --P3d0 03:28, 11 Jul 2004 (UTC)

Oops, my mistake. It's fine as-is. --P3d0 03:29, 11 Jul 2004 (UTC)

[edit] Great!

I just wanted to say that it's articles like this that make wikipedia great! It's completely mindboggling that a free encyclopedia can be this much better than many of the expensive dead-tree ones! I especially like the fact that you put up the equation for Runge Kutta-integration up front, and describe it without using unnecessary mathematics. This gives me the impression that you really want people to understand! Some paper encyclopedias seem more worried about fellow nitpicking scientists than getting the message across, so to speak.

[edit] Comparison

How much better actually is RK4 than Euler's method? For example, when numerically solving a system of linear ODEs, how much bigger can the step h be to give the same level of accuracy, how do they scale? If someone can post an informative answer, it would be appreciated and make the article more beneficial to those wanting to use these methods. —Preceding unsigned comment added by 128.214.120.79 (talk • contribs)

With RK4, you can extract an error estimate, and use this to cut b when necessary to maintain the error within desired limits. --John Nagle 06:27, 7 January 2007 (UTC)
(BTW Nagle: You're my hero!)
For the Euler Method, the (global) error grows like O(h), while for (explicit) RK4, it grows like O(h^3). In the real-world, with RK4, that means you can take the cube-root (within a scaling factor(12?)) of the h you would use in the euler method to get the same error bounds, with only 4 times as many function evaluations. (~100x faster for the same level of accuracy using single precision floats.)
...Unfortunately, this only works if your ODE is non-stiff. If you're trying to solve a stiff_equation, then using a higher-order method might even make the situation worse. Depending on your application, you may wish to look at the symplectic integrators, and in particular, the verlet leap-frog, which is almost trivial to implement, and the (global) error grows only linearly wrt time... ~~(anon)06:40, 17 July 2007 (UTC)

[edit] How to define K_1, K_2, etc -- with h or without h

I can't say if the equations given in the article are wrong, but there: http://search.netscape.com/ns/boomframe.jsp?query=runge+kutta+method&page=1&offset=0&result_url=redir%3Fsrc%3Dwebsearch%26requestId%3D98746ea48585333e%26clickedItemRank%3D1%26userQuery%3Drunge%2Bkutta%2Bmethod%26clickedItemURN%3Dhttp%253A%252F%252Fmathworld.wolfram.com%252FRunge-KuttaMethod.html%26invocationType%3D-%26fromPage%3DnsBrowserRoll%26amp%3BampTest%3D1&remove_url=http%3A%2F%2Fmathworld.wolfram.com%2FRunge-KuttaMethod.html

and in my books, they are a little bit different.

eg.:K3= f(ti+h/2,wi+k2/2) and not f(ti+h/2,wi+k2*h/2)

--anon forgot to sign

You see, you need to multiply by h sooner or later either way. Either you do
k_2 = f ( t_n + h/2, y_n + k_1*h/2)
k_3 = f ( t_n + h/2, y_n + k_2*h/2)
or you do:
k_2 = h*f ( t_n + h/2, y_n + k_1/2)
k_3 = h*f ( t_n + h/2, y_n + k_2/2)
Let me know if this needs more explanation. Oleg Alexandrov 22:34, 31 Mar 2005 (UTC)

--

Oleg is right and I was wrong in my previous comment. My apologies!

-- przemoc —Preceding unsigned comment added by 213.241.34.186 (talk) 21:50, 25 October 2007 (UTC)

[edit] Starting with RK4

I don't quite like the idea of starting with RK4 as it is rather complex, but I thought of starting with a simple two-stage RK method and application thereof, thus elucidating why RK4 is as it is. Does that sound okay? There is a large family of RK methods, we should be aiming to be rather general... Dysprosia 09:49, 15 May 2005 (UTC)

Good point; I agree. My edit of your previous contribution, in which you introduced the general formula, was perhaps too hasty, but I did not like your second-order example (it evaluates f outside the interval [tn,tn + h]) and you changed the definition of the k_i (if I remember correctly); I was further emboldened by Oleg's edit comment. One possible outline for the article is to start with Euler's method, then some second-order method which is still easy to understand, like the midpoint rule, then give the general formula for explicit RK, then some examples, including RK4, and then whatever else you'd like to mention. Also keep in mind that some people think that "Runge-Kutta method" means RK4, so it's probably best to mention very early where RK4 is described. But most importantly, don't listen to me and make any improvements to the article that you see fit. -- Jitse Niesen 13:09, 15 May 2005 (UTC)
Well, call me biased, but I like the article the way it is now. It does refer at the top to numerical ordinary differential equations for general background. Also, indeed, the name "Runge-Kutta method" means most often RK4, as the two-stage method is usually known as midpoint method, or otherwise there also is Heun's method, etc.
But I wonder which two-stage Runge-Kutta Dysprosia is referring to. Maybe there is indeed a way to start even simpler than what is now. However, the section on Explicit Runge-Kutta methods with all those formulas and undertermined coefficients, should indeed stay at the bottom where it is now. Oleg Alexandrov 14:54, 15 May 2005 (UTC)
(Jitse) I did indeed change the definition for the k_i -- it was the one I was more familiar with. It shouldn't be difficult to push the RK4 example to fit that definition, or vice versa.
(Oleg) We can start with any simple two-stage RK method, and a simple example of solving a simple DE with it 'on paper', so to speak.
Dysprosia 23:05, 15 May 2005 (UTC)
Dysprosia, thanks for adding the example (and also the examples in Lagrange polynomial and Newton polynomial). Unfortunately, the table does not look very nice on my laptop, where my screen is a mere 1000-and-a-bit pixels wide. It may also be nice to use a nonautonomous equation. Finally, I'm wondering why you are not using the midpoint method. Sorry for not being more constructive; I have little time now. -- Jitse Niesen 14:35, 21 Jun 2005 (UTC)
Sorry, I spaced out the table so it wouldn't look so cluttered and it would line up properly. I have a wide screen. I'll try and fiddle with it later.
I didn't use the midpoint method, so we would have a greater diversity of examples.
Dysprosia 04:49, 22 Jun 2005 (UTC)
I don't see greater diversity as a good thing, in this case, but fair enough. However, please use a decent method as an example, and not a method with c_i outside the interval [0,1]. You can use for instance
             0 |
           2/3 | 2/3
           ----+----------
               | 1/4  3/4
Of course, a plot would be very nice. Jitse Niesen 12:57, 22 Jun 2005 (UTC)
Sorry, my stupidity -- recalculated. Plot later. Dysprosia 12:05, 23 Jun 2005 (UTC)

[edit] Local error

I removed the last phrase of "The RK4 method is a fourth-order method, meaning that the total accumulated error is on the order of h4, and that it gives the exact integral for polynomials up to the fourth order." because it is not clear for somebody who does not know the subject. To make it clear, it should be explained that methods for solving ODEs can also be used for calculating integrals, that the error in solving ODEs is related to the error in calculating integrals, and that the latter is related to the degree of polynomials that can be integrated exactly. While all this can be done, I think it is not relevant for this article; perhaps it can be added to numerical ordinary differential equations. -- Jitse Niesen 00:03, 8 Jun 2005 (UTC)

[edit] implicit and explicit

This document mentions that Runge-Kutta methods include both implicit and explicit methods, however it doesn't describe the difference between either of these. This should be clarified.

[edit] Iterative versus Non-iterative

If I'm not mistaken, there are iterative approaches to calculating the internal stages of the Runge-Kutta method. For instance, for a 3rd order Runga-Kutta iterative approach, a foward Euler step is taken from t to (t + dt/3), then a leapfrog step is taken from t to (t + dt/2) using forcing at (t + dt/3). Then a final leapfrog step is taken from t to (t + dt) using forcing at (t + dt/2). Someone should make a more formal mention of this proceedure on this page. I would, but I'm still currently looking up journal articles to fully understand how this plays out in the expansion to yeild 3rd order accuracy. If I'm not mistaken, similar proceedures can be adopted to perform the time integral at higher orders. —Preceding unsigned comment added by 64.241.37.140 (talkcontribs)

[edit] The Usage-section

The Usage section in the article as of now is quite voluminous and I also think it violates WP:NOT#HOWTO. --Berland 18:33, 28 June 2007 (UTC)

I agree it's too long, but to me it's more of an example than a how to. More seriously though, it seems to follow a different notation from the rest of the article and so is more likely to confuse than clarify. Is an example really needed here or is the article clear without it?--RDBury (talk) 05:39, 21 November 2007 (UTC)

I agree with RDBury, the change of notation is rather confusing, the section should be either "translated" to the notation defined above or either erased. Maybe the translation from tableau to equations - in proper notation - would be enough?

Jose Brox

[edit] Pronunciation?

How is 'Runge' pronounced? I'm not wild about IPA phonetics, but a "rhymes with" would be awfully useful. :) —Preceding unsigned comment added by Myself248 (talk • contribs) 23:18, 24 November 2007 (UTC)

The 'u' is (approximately) pronounced like the 'oo' in 'look', the 'ng' is as in 'sing', and the 'e' is as in 'the'. I don't know a word which rhymes with 'Runge'. -- Jitse Niesen (talk) 16:45, 25 November 2007 (UTC)

[edit] Not to teach subject matter ?!

I suppose the banner saying that purpose of the wikipedia is only to present facts is put there by some sort of robot, but it is unfortunate. The wiki disavows being a reference that meets scholarly standards. So an emphasis on merely "presenting facts" seems rather silly. Doing so would result in some rather barren pages for mathematics.

It would be useful to have an example of stability analysis. From an article on the scholarpedia, I see that this involves an equation with matrices in it. For persons who are not at the top of their game in matrix notation, an example would clarify whether a notation means the number 1 or the identity matrix, the absolute value of something or a determinant, etc.

It is interesting that the vector b, which appears at the bottom of the table is written horizontaly and denoted as b_transpose. This suggests that, in another way of looking at things, b is naturally thought about as a column vector. It would be useful to comment upon this.

In the spirit of knowing that certain approximations are bad, it would be useful to comment on whether pronouncing "Runge" to rhyme with "lunge" , as mamy USA instructions do, is a good one.

Tashiro 15:22, 1 December 2007 (UTC)

[edit] Advisory excluding examples from Wiki Articles should be removed ==

Whatever the Wiki is, it is presumably trying to present HUMAN useful information, and an example is often used in mathematical articles to better communicate what is meant by what was more abstractly said. The author's example should stay, and the editor's advisory should go. —Preceding unsigned comment added by 76.191.132.120 (talk) 20:06, 22 January 2008 (UTC)

[edit] Leaves something to be desired

At the time of writing the article might be clear as crystal to someone who already knows what the Runge-Kutta method is trying to achieve, but to someone who is pretty much a beginner like me I am left wondering: OK the method produces a series of yk's but what do these represent? In other words what is the meaning of the output of the method? Feraudyh (talk) 14:00, 23 April 2008 (UTC)

[edit] PDEs

Runge-Kutta can be used for PDEs as well (I believe mostly parabolic) should a section on using Runge-Kutta for PDEs exist on this page? What is everyones thoughts on this? Im just a mere math undergrad with little sophistication when in comes to numerical analysis. --User:MATThematical

[edit] Error term

I see lots of literature that says the error term is O(h^5) for a single step, and O(h^4) globally, but the error term derivation is never given. It should be pretty straightforward using the Taylor series. Would be great if someone could add it (I'd do it myself, but the derivation would probably constitute original research, plus I could make a mistake :P It must be in a text book that someone has somewhere). --Numsgil (talk) 08:14, 24 May 2008 (UTC)