# Numerical integration methods: Explicit vs Semi-Implicit vs Newton-Euler 1, 2 and use in cyclone physics engine

I am trying to understand the difference between explicit Euler and semi-implicit Euler integration, where in explicit Euler the current position is calculated as

$$x_{n+1} = x_n + v_n$$

and semi-implicit Euler method where it is calculated as:

$$x_{n+1} = x_n + v_{n+1}$$

with $$x$$ being position and $$v$$ the velocity, $$n$$ is a time, $$n+1$$ the time at next update.

In particular, can anyone confirm, which of the two methods is used in this code

If I understand, it is semi-implicit Euler, correct? Because the velocity is updated, before being added to the position, right?

If my reasoning is wrong, please let me know how a semi-implicit update would look like then? Or why I am wrong?

Also, I am having trouble with terminology: I've read about an integration called Newton-Euler 1 and another called Newton-Euler 2. Where Newton-Euler 1 was described as less accurate, and only uses the first-order differentiation for calculating the new position, while Newton-Euler 2 also adds the 2nd order differentiation. I've seen the wiki entry for Newton Euler equations, but it doesn't call an equation "1" or "2". The book I've read this in is accompanied by the code given in the link above.

How (if at all) are Newton-Euler 1,2 related to explicit and semi-implicit Euler methods?

• Would Computational Science be a better home for this question? Feb 18 '20 at 11:15
• yes... could well be the case (this is my first question on physics stack exchange, so I apologize..). Shall I move it over? Feb 18 '20 at 11:23
• This seems to be a question about a particular bit of C++ code and a (mysteriously not referenced) book, rather than about computational science per se. Feb 19 '20 at 6:23
• @DavidKetcheson Sorry, on the git page of the code it states the book "Game Physics Engine Design" (by Ian Millington) The question is about a piece of code that is connected to computational science (and perhaps physics), more so than to any other domain. Where else would there be users who know more about this specific matter? Feb 22 '20 at 17:49

## 1 Answer

Looking at the code, unless there is something weird under the hood, it is semi-implicit Euler.

I do not know any integration/differentiation technique called Newton-Euler. From what I read, it is a formulation to describe motion and a competitor to Lagrangian formulation. The book might be talking about the particular forms first and second order explicit Euler method when applied to Newton-Euler description of motion.

• Ok, thanks. I wasn't so much interested in what may be going on under the hood. Just took this piece of code to understand how a semi-implicit Euler would work in code. So this answers my question. Feb 22 '20 at 17:58