Talk:Runge–Kutta methods
![]() | Mathematics Start‑class Mid‑priority | |||||||||
|
Definition of h
"...on the order of h4" That's the first mention of h in the article. Perhaps it should be explained somewhere? --Doradus 03:28, 11 Jul 2004 (UTC)
- Oops, my mistake. It's fine as-is. --Doradus 03:29, 11 Jul 2004 (UTC)
- Perhaps someone can explain what h is? —Preceding unsigned comment added by 203.122.193.233 (talk) 17:13, 2 December 2010 (UTC)
- changed the section to mention Rcgldr (talk) 01:54, 27 June 2011 (UTC)
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.
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)
How to define K_1, K_2, etc -- with h or without h
If the k_i are defined with the h, they cannot be termed "slopes", but increments. Please confirm this.
- changed the section so that k_i are termed "deltas" Rcgldr (talk) 01:53, 27 June 2011 (UTC)
— Preceding unsigned comment added by 77.227.21.43 (talk) 22:04, 13 June 2011 (UTC)
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!
--
- But is multiplied by h again in the y_{n+1}=y_n+h/6*(...)
- On numerical recipes (cap 16.1 equation 16.1.3) is without h.
- Maybe is more clear if you try to use a simple function like f(x_n,t_n)=1
- Of course you must find something like y_{n+1}=y_n+dt where dt is h
- Using RK4 with h/6*(...) you find y_{n+1}=y_n+dt^2
- I'm wrong?
-- przemoc —Preceding unsigned comment added by 213.241.34.186 (talk) 21:50, 25 October 2007 (UTC)
It seems the equations below are wrong. The h's are missing in the arguments of the function f
- k_1 = f(t_n, y_n)
- k_2 = f(t_n + \tfrac{1}{2}h, y_n + \tfrac{1}{2} k_1)
- k_3 = f(t_n + \tfrac{1}{2}h, y_n + \tfrac{1}{2} k_2)
- k_4 = f(t_n + h, y_n + k_3)
When compared with numerical recipes, they should be
- k_1 = f(t_n, y_n)
- k_2 = f(t_n + \tfrac{1}{2}h, y_n + h\tfrac{1}{2} k_1)
- k_3 = f(t_n + \tfrac{1}{2}h, y_n + h\tfrac{1}{2} k_2)
- k_4 = f(t_n + h, y_n + hk_3)
Otherwise, the corrections of y_n in k_2, k_3 and k_4 are O(1), instead of O(h).
P.S.: I think it should be better to number the equations, or at least a block of equations. That would make present and future references to them easier to do.
Adriano bb (talk) 18:53, 17 September 2009 (UTC)
Seems to me you wrote this before noticing my reversal of an edit made by an anonymous user, which introduced the error you are pointing out. Hanche (talk) 21:28, 17 September 2009 (UTC)
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 ) 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)
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)
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.
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 (talk • contribs)
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
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)
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)
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)
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)
y_n is equal to y(t_n): it is the value of the solution to the differential equation at the point t_n. The aim with any numerical method for differential equations is to approximate the exact solution as closely as possible. Hope this helps. Tweet7 (talk) 21:53, 23 November 2009 (UTC)
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
RK methods can be applied to well-posed initial boundary value problems (whether parabolic or hyperbolic), however, the bare application to those methods isn't terribly informative and the analysis of the limitations of those applications is quite in depth. There are literally whole bookshelves worth of material devoted to understanding just that. -- Grigjd3 — Preceding unsigned comment added by Grigjd3 (talk • contribs) 13:23, 27 May 2011 (UTC)
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)
Hyphenated name, not endashed
The current name of this page (and others that are linked from it) includes an endash, but it should be a hyphen. This page needs to be moved to its hyphenated version. Among other things, it would make it easier for people to link to it. --TedPavlic | talk 19:48, 6 August 2008 (UTC)
- Why exactly should it be a hyphen? According to WP:DASH, one of the roles of en dashes is to indicate disjunction, with as one of its main applications being to serve as "a substitute for some uses of and, to or versus for marking a relationship involving independent elements in certain compound expressions". Runge–Kutta methods are methods due to Messrs. Runge and Kutta, being independent individuals. Still according to WP:DASH: "When naming an article, a hyphen is not used as a substitute for an en dash that properly belongs in the title". As Runge-Kutta methods with a hyphen redirects to Runge–Kutta methods with an en dash, linking is easy enough. --Lambiam 22:37, 12 August 2008 (UTC)
Defining aij for a given order??
Is there no general way to define aij for a given order p? The article mentions "there are also accompanying requirements," but doesn't state in general what they are. If there is no general solution, then I think that needs to be stated in the article. If there is one or more, then I think at least one of them should be shown. Erikmartin (talk) 14:19, 7 August 2008 (UTC)
- There is no general definition of aij. The coefficients simply are what the person who derived the tableau decided that they should be.
- What I wonder about though, is how the tableaus are derived? How can one determine of which order a tableau is? I think this information is very essential and should be in the article! --Kri (talk) 10:20, 19 October 2009 (UTC)
Crank-Nicolson Example
The final Butcher tableau in this article (added in this [1] edit) looks to be incorrect. I believe it should be
Correcting my own LaTeX typos. --92.242.168.176 (talk) 16:43, 15 March 2010 (UTC)\\
I'm not so sure about this. Crank Nicolson is a 1-stage method. I'll look it up later tonight and find out and correct it with the relevent sources :) (Oliver 31/10/2011 14:54)
definition of k as a slope
Is there a problem with the defnition of k_i and the corresponding description of k_i? For example k_1 = h*f(t_n,y_n), and f(...) is dy/dt. so h*f(t_n,y_n) is infact "the difference in y over the interval t -> t+h, based on the slope at the beginning of the interval" and not "the slope at the beginning of the interval" as in the current text. The same for definitions/descriptions of k_2, k_3 and k_4. —Preceding unsigned comment added by 143.117.13.21 (talk) 16:04, 2 June 2010 (UTC)
Yes, this problem is the result of a recent edit in which someone moved the hs outside of the ks, to increase consistency across the article. The end result is mathematically identical, but the definition of k1-k4 as slopes is now incorrect. Should h be moved back into the ks, or should section on slope be modified? 76.212.130.54 (talk) 18:39, 20 June 2011 (UTC)
- changed the section so that k_i are termed "deltas" Rcgldr (talk) 01:49, 27 June 2011 (UTC)
Merson
I was surprised to find no mention of Runge Kutta Merson, which, adding a fifth evaluation to RK4, enables a better interval to be computed. In cases where stability varies over the range of integration, the cost of the extra evaluation is more than balanced by the reduction in the number of evaluations required. I regret my maths is not up to the high standard set in this article, but I found RKM so useful that I am mentioning it here hoping that someone better qualified will put it in. John Wheater (talk) 11:14, 3 September 2010 (UTC).
Runge-Kutta Nystrom
I understand there exists a class of integrators referred to as Runge-Kutta Nystrom integrators designed to allow one to integrate second order ODEs using the method of lines. My personal literature search has only revealed to me some of the most recent findings about such systems at all. If anyone is knowledgeable about such methods, it would be nice to see an explanation of them and perhaps a couple of useful examples (for instance, ERKNs at various orders). — Preceding unsigned comment added by Grigjd3 (talk • contribs) 13:29, 27 May 2011 (UTC)
- Yes, it would be nice to see a page on RK-Nystrom methods, and yes, you're correct they're used to integrate 2nd-order ODEs. Hairer, Nørsett & Wanner (1993) have a section on numerical methods for second-order ODEs, II.14, pages 283--301, that includes a couple examples that I would be willing to describe. Where would an appropriate place be to add them? Should I add them to this page or a new page? MathRocks2012 (talk) 21:14, 6 August 2013 (UTC)
Doubts on the derivation of Runge-Kutta fourth order method
I have some major doubts on the derivation of Runge-Kutta fourth order method as it is presented now, even if I found this explanation elsewhere (for example, here) and even if, at first, this sounds right, now I am wondering why you are allowed to take the coefficients up to shouldn't they be expanded at least up to to obtain a expression? Some clarifications are in order. -- CristianCantoro (talk) 14:18, 15 March 2013 (UTC) In particular, more detailed calculation (using Butcher tables) lead to more complicated systems of equations (see pag. 5 of this) with the same result. Unfortunately I wasn't able to find an explicit derivation using Butcher tables with all the complete calculations. -- CristianCantoro (talk) 14:20, 15 March 2013 (UTC)