Time Stepping Newton’s Laws of Motion

Newton’s Laws of Motion:

  • 1st Law: In the absence of a net force, a body either is at rest or moves in a straight line with constant speed.
  • 2nd Law: A body experiencing a force F experiences an acceleration a related to F by F = ma, where m is the mass of the body. Alternatively, force is equal to the time derivative of momentum.
  • 3rd Law: Whenever a first body exerts a force F on a second body, the second body exerts a force -F on the first body. F and -F are equal in magnitude and opposite in direction.

 

 

Time Stepping

Newton’s World is based on the following incremental equations of motion with smallest unit of time dt:

  • dx = vdt,\quad dv =adt,

as another way of writing

  • \frac{dx}{dt}=v, \quad \frac{dv}{dt}=a,

which combined with Newton’s 2nd Law F = a assuming M=1, take the form:

  • dx = vdt, \quad dv = F dt,

or

  • \frac{dx}{dt}=v, \quad \frac{dv}{dt}=F.

These equations can be solved by time-stepping with time step dt:

  • dx^n = v^ndt \quad dv^n=a^ndt,

where

  • dx^n=x^{n+1}-x^n, \quad dv^n=v^{n+1}-v^n,

and x^n\equiv x(ndt), v^n\equiv v(ndt) and a^n\equiv a(ndt) are position, velocity and acceleration at time ndt after n successive time steps with time step dt. By time-stepping forward in time v^{n+1} and x^{n+1} at time (n+1)dt=ndt + dt are computed from v^n and x^n already computed at the preceding time ndt.

Euler’s Method: Forward Euler

With each tick of time, velocity and position are thus updated according to

  • v^{n+1}=v^n+F^ndt, \quad x^{n+1}=x^n+v^ndt, \quad\mbox{for }n=0,1,...,

from given initial values v(0) and x(0) at initial time t=0, where F^n=F(ndt) is the force acting on the body at time ndt. We refer to this update formula as Forward Euler. 

Smart Euler

An alternative update formula is obtained by updating first velocity to v^{n+1} and using this value when updating to x^{n+1}:

  • v^{n+1}=v^n + F^ndt, \quad x^{n+1}=x^n+v^{n+1}dt,

which we will refer to as Smart-Euler. You will soon discover the difference between Euler and Smart-Euler.

A variant of Smart-Euler is

  • v^{n+1}=v^n + F^ndt, \quad x^{n+1}=x^n+\frac{1}{2}(v^n+v^{n+1})dt,

where the mean velocity \frac{1}{2}(v^n+v^{n+1}) is used instead of either v^n or v^{n+1}.

Trapezoidal Method

Below we shall meet variants with F^n depending on x^{n+1}. The basic method of this form is the Trapezoidal Method:

  • v^{n+1}=v^n + \frac{1}{2}(F^n+F^{n+1})dt, \quad x^{n+1}=x^n+\frac{1}{2}(v^n+v^{n+1})dt,

where F^n=F(ndt,x^n) and F^{n+1}=F((n+1)dt,x^{n+1}), which requires iteration because F^{n+1} depends on x^{n+1},which depends on v^{n+1}.

Backward Euler

We compare with Backward Euler:

  • v^{n+1}=v^n+F^{n+1}dt, \quad x^{n+1}=x^n+v^{n+1}dt, \quad\mbox{for }n=0,1,...,

which also requires iteration.

Midpoint Euler

A variant of the Trapezoidal Method is Midpoint Euler:

  • v^{n+1}=v^n + F((n+\frac{1}{2})dt, \frac{1}{2}(x^{n}+x^{n+1}))dt, \quad x^{n+1}=x^n+\frac{1}{2}(v^n+v^{n+1})dt,

with F evaluated at the midpoint between (ndt,x^n) and ((n+1)dt,x^{n+1}), also requiring iteration.

Explicit vs Implicit Methods

We distinguish between explicit methods like Forward Euler and Smart Euler with direct update, and implicit methods requiring iteration, like the Trapezoidal Method, Backward and Midpoint Euler, where the update formula for v^{n+1} and F^{n+1} is repeated with latest values inserted in the right hand side.

With a (small) fixed number of iterations, implicit methods can be viewed as explicit direct update methods.

First and Second Order Accurate Methods

Forward and Backward Euler are first order accurate in the sense that the time-stepping error is proportional to the time step dt, while the Trapezoidal Method and Midpoint Euler are second order accurate  in the sense that the time stepping error is proportional to the time-step squared dt^2, which is much smaller than dt since dt is small. Smart Euler is rather second than first order accurate.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: