0

This is my first time asking on StackExchange, so forgive me for any mishaps on this question. I saw this post by Paul Manta on "Solving coupled 2nd order ODEs with Runge-Kutta 4" that shows basically the steps to calculate $x, y, x'$ and $y'$ given two coupled second-ordered ODEs of the form: $$x'' = f(t, x, y, x', y')$$ $$y'' = g(t, x, y, x', y')$$ Link to Paul's post: https://math.stackexchange.com/questions/146823/solving-coupled-2nd-order-odes-with-runge-kutta-4\

I implemented the algorithm on Python, and it worked, but I'd like to learn more about how his algorithm was derived. Are there any books or academic papers that show or use the aforementioned algorithm? All I could find are about RK4 for first order ODEs.

  • You can read more if you search for RK4. I've made a list of original papers by Runge, Heun and Kutta in https://math.stackexchange.com/questions/2527302/whats-the-motivation – Lutz Lehmann Feb 15 '21 at 07:48
  • Is your question on the ways to transform a higher-order equation or system into a first-order system? Try to use vectors for the state, it makes the whole code more readable, which in turn makes debugging easier and avoids copy-paste errors from the start. – Lutz Lehmann Feb 15 '21 at 08:25
  • Hello @LutzLehmann, no, I'd like to solve the coupled second-order ODEs as they are, using RK4, without having to transform them to first order. The post by Paul Manta seems to make it possible and I'd like to know where he got his reference(s). – James David Feb 15 '21 at 08:43
  • @LutzLehmann right now I'm looking at Runge-Kutta Nyström methods, but I'm a little confused with how it's implemented, as (1) the method looks quite different from Paul's, and (2) the step size h is constantly updated in RKN, which Paul didn't do (I assume) – James David Feb 15 '21 at 08:45
  • But the cited post does transform it into a first-order system. It is in the line "I'll use the notation $u=x′$, $w=y′$, thus $u′=x′′$, $w′=y′′$." You can only apply RK4 to first-order systems. One can apply little simplifications for explicit and conservative second order equations as in https://stackoverflow.com/a/60414658/3088138 – Lutz Lehmann Feb 15 '21 at 08:53
  • @LutzLehmann Oh wow, I didn't see that what he did was a transformation, I just thought it was a substitution, I get it now. I found your answer on this post (linked within the one you shared just now): https://scicomp.stackexchange.com/questions/34257/solving-coupled-odes-using-runge-kutta-method/34330#34330, may I know what book / paper you might have used to come up with these steps? – James David Feb 15 '21 at 08:57
  • No source, I probably had seen this reduction somewhere and reconstructed it from the general idea that it is possible. What source do you use for the Nyström method, what local error estimation is used in the step size control, step doubling or an embedded method? Hairer-Norsett-Wanner: "Solving ODE I" has a nice overview. – Lutz Lehmann Feb 15 '21 at 09:13
  • @LutzLehmann In have not implemented the Nyström method, as I've only been browsing through papers online that use it. Though I have skimmed through Hairer-Norsett-Wanner, and I might implement that in later studies. I'm still an undergrad trying to understand RK4 as it is, and my next step now is to find some resources on transforming the 2nd order ODE to 1st, for applying RK4. Thanks a lot for the help, I didn't think my question would get noticed at all. Hope you have a great day. – James David Feb 15 '21 at 09:21

0 Answers0