Talk:Euler–Cromer algorithm

From Wikipedia, the free encyclopedia

[edit] Initial discussion

This discussion was initiated at User talk:DJIndica and User talk:Jitse Niesen; I copied it from there. -- Jitse Niesen (talk) 11:50, 6 March 2007 (UTC)

Hello. I'm intrigued by the article on the Euler-Cromer algorithm that you created, because it looks like I should know about this method. I have a couple of questions which I hope you could answer:

  • You wrote it performs better for oscillatory solutions. What is the basis for the statement? I find it hard to believe that this is true in general, but it may well be true in special cases (and these special cases may constitute the majority of problems of interest).
  • Can you look at the method again and tell me where the functions a and v that appear in the ODE come in? I suppose that an stands for a(vn,xn,tn)?
  • Any references? Where did you get the method from? Mr Google confirms that the method exist, but I can't find much analysis. To be honest, the method looks very similar to Verlet integration (which sorely needs to be cleaned up; there is always so much more work to be done here).

I realize that you may not know all the answers, but anything you can say would be much appreciated. Cheers, Jitse Niesen (talk) 12:29, 3 March 2007 (UTC)

Hi Jitse,
Hopefully my answers below, combined with the details I have added to the article will answer your questions. I haven't used this algorithm extensively, but feel free to ask if you have any further questions.
  • I originally found this algorithm in Computational Physics, by Giordano, which stated without explanation that it works better than the Euler method for oscillatory solutions; this University of Delaware webpage [1] gives more details.
  • I chose x, v and a because they are quite intuitive, I have added a (very) simple example which illustrates how the method can be used. an refers to acceleration at timestep n.
  • I have added references. Euler-Cromer differs from Verlet integration in that it still uses the velocity to calculate position (velocity at the current timestep).
--DJIndica 15:55, 3 March 2007 (UTC)

Thanks for your answer. Could you please check this edit of mine where I tried to clarify a couple of things, especially about the form of the equation? After quickly reading Verlet integration, it seems that that article describes a different method than the method I have in mind; I need to find out what's going on here. I'll need to think a bit more about the connection with the Verlet method. -- Jitse Niesen (talk) 11:02, 4 March 2007 (UTC)

I like your edit, I think we are converging on something useful. Whatever the shortcomings of the article on Verlet integration (and I don't see any major problems), I believe it gives the correct algorithm and it differs significantly from Euler-Cromer.--DJIndica 16:48, 4 March 2007 (UTC)

I sat down with a piece of paper and thought it over. I quickly discovered that the main problem with the article on Verlet integration is in my own mind. The algorithm that I'm used to is slightly different from (but equivalent to) the algorithm in that article. The article Verlet integration is biased towards mechanics, but I agree that it is mostly correct.

I found that I know the Euler-Cromer method under the name "symplectic Euler", so I added that to the article. I also added a reference which states that these methods are indeed the same. Anyway, the article is expanding nicely. -- Jitse Niesen (talk) 11:55, 6 March 2007 (UTC)

I think it is worth mentioning that Euler-Cromer performs well for oscillatory functions, I do not believe that it is significantly better then Euler for the general case.
In every example I have ever seen, the Euler method leads to an increase in energy. I am not 100% confident that this will always be the case, but I suspect it may be so. Either way I don't think it is appropriate to say that the Euler method "often" leads to decreasing energy.--DJIndica 21:41, 6 March 2007 (UTC)

I removed the fact that Euler-Cromer performs well for oscillatory functions because I have a hard time believing it. You say that Giardano's book does not give any evidence, and the only evidence from the Delaware web page is that it works well for the harmonic oscillator. However, the good performance for the harmonic oscillator is explained by the fact that Euler-Cromer is a symplectic method and the harmonic oscillator is a Hamiltonian system. I don't see a reason why Euler-Cromer would perform well for non-Hamiltonian oscillators.

You're right that the Euler method usually increases energy. That was a mistake on my part, now fixed. Thanks for noticing that. -- Jitse Niesen (talk) 06:36, 7 March 2007 (UTC)