M2.3 8 min read Oct 2026

M2.3 Navigation Updates Every 30 Seconds: Euler's Method and Its Error

Builds on2 notes

A bend and a navigation system saving power

You drive at 60 km/h around a quarter-circle bend of radius 2 km. Your navigation system checks velocity only every 30 seconds, then extrapolates straight ahead at that velocity until the next check.

After about 3.1 km and just over three minutes, how far is its estimated position from yours? What if the road is straight?

Infrequent updates miss turns, but they also miss acceleration and braking along a straight road. How does more frequent updating reduce error? Separate the change missed this step from propagation of the previous position error.

DiscussionQ1

Which objects represent the true and approximate positions? Write the update and the quantity we want to bound.

Show the reasoning

The true position satisfies dxtdt=vt(xt)\frac{dx_t}{dt}=v_t(x_t). Let tk=kht_k=kh and denote the estimate by x^tk\hat x_{t_k}. It evaluates velocity at the approximate position:

x^tk+1=x^tk+h vtk(x^tk).\hat x_{t_{k+1}}=\hat x_{t_k}+h\,v_{t_k}(\hat x_{t_k}).

This is Euler’s method. With matching initial positions, the endpoint error is eN=∥xT−x^T∥e_N=\|x_T-\hat x_T\|. There is no sampling randomness here: this is ODE discretization error.

A tangent leaves the circle

One Euler step moves 500 m along the tangent: 30 seconds times 16.7 m/s. The exact motion follows the arc, so the approximate endpoint lies outside the circle. This discrepancy, starting from the exact point, is the local error.

The next step starts from an already displaced point and reads a different velocity. Error therefore combines new local defects with propagated earlier errors, which may amplify.

Constant-velocity straight motion is exact for Euler. A straight path with changing speed still has error.

Euler tangent steps, accumulated error, and exact constant-velocity straight motion.

Local error is second order; accumulated global error is first order. Constant velocity gives zero error.

One-step defects and accumulated error

Assume sufficient smoothness and define acceleration along the exact trajectory:

at(xt):=ddtvt(xt)=∂tvt(xt)+∇xvt(xt) vt(xt).a_t(x_t):=\frac{d}{dt}v_t(x_t) =\partial_t v_t(x_t)+\nabla_xv_t(x_t)\,v_t(x_t).

By the chain rule in M0.3, velocity changes both explicitly with time and because the particle moves through the field. Acceleration includes turning, speeding up, and slowing down; it is not geometric curvature.

One step. Exact displacement integrates velocity. Express the change from its initial value by integrating acceleration:

xtk+1=xtk+h vtk(xtk)+rk,rk=∫tktk+1 ⁣(vs(xs)−vtk(xtk)) ds=∫tktk+1(tk+1−r) ar(xr) dr.\begin{aligned} x_{t_{k+1}}&=x_{t_k}+h\,v_{t_k}(x_{t_k})+r_k,\\ r_k&=\int_{t_k}^{t_{k+1}}\!\big(v_s(x_s)-v_{t_k}(x_{t_k})\big)\,ds\\ &=\int_{t_k}^{t_{k+1}}(t_{k+1}-r)\,a_r(x_r)\,dr. \end{aligned}

The last equality exchanges integration order. Thus ∥rk∥≤h2Mk/2\|r_k\|\le h^2M_k/2, where Mk=sup⁡[tk,tk+1]∥at(xt)∥M_k=\sup_{[t_k,t_{k+1}]}\|a_t(x_t)\|. The vector integral remainder avoids assuming a common Taylor intermediate point for all components.

Propagating old errors. Subtract the Euler update from the exact update:

xtk+1−x^tk+1=(xtk−x^tk)+h(vtk(xtk)−vtk(x^tk))+rk.x_{t_{k+1}}-\hat x_{t_{k+1}} =(x_{t_k}-\hat x_{t_k}) +h\big(v_{t_k}(x_{t_k})-v_{t_k}(\hat x_{t_k})\big)+r_k.

Set ek=∥xtk−x^tk∥e_k=\|x_{t_k}-\hat x_{t_k}\| and apply the triangle inequality:

ek+1≤ek+h∥vtk(xtk)−vtk(x^tk)∥+∥rk∥.e_{k+1}\le e_k +h\|v_{t_k}(x_{t_k})-v_{t_k}(\hat x_{t_k})\|+\|r_k\|.

If vtv_t is LL-Lipschitz in position, the middle term is bounded by hLekhLe_k, giving

ek+1≤(1+hL)ek+∥rk∥.e_{k+1}\le(1+hL)e_k+\|r_k\|.

These terms represent the old displacement, the velocity difference caused by that displacement, and the new local defect. Starting from e0=0e_0=0, expand the recurrence:

eN≤∑k=0N−1(1+hL)N−1−k∥rk∥≤eLT∑k=0N−1∥rk∥.e_N\le\sum_{k=0}^{N-1}(1+hL)^{N-1-k}\|r_k\| \le e^{LT}\sum_{k=0}^{N-1}\|r_k\|.

Using tk+1−r≤ht_{k+1}-r\le h inside each remainder gives the bound

eN≤heLT∫0T∥at(xt)∥ dt.\boxed{e_N\le h e^{LT}\int_0^T\|a_t(x_t)\|\,dt.}

With a common acceleration bound MM, the local bounds also yield eN≤eLTThM/2e_N\le e^{LT}ThM/2. Both establish first-order convergence as hh shrinks. A halved bound does not imply the actual error halves exactly; eLTe^{LT} is a worst-case propagation estimate.

DetailsContinuous Grönwall inequality and a short proof

If φ(t)≥0 and φ(t)≤A+L∫₀ᵗφ(s)ds, then φ(t)≤Ae^(Lt). Set Ψ(t)=A+L∫₀ᵗφ. Since Ψ′=Lφ≤LΨ, the derivative of Ψe^(−Lt) is nonpositive. Hence φ≤Ψ≤Ae^(Lt). □ For two trajectories initially separated by δ, their distance satisfies this inequality with A=δ. Their separation is at most δe^(Lt). The discrete recurrence replaces the integral by a sum and the exponential step factor by 1+hL.

Correct intuition, different numbers

On the circular arc, speed c=16.7c=16.7 m/s and radius R=2000R=2000 m give ∥at∥=c2/R≈0.139\|a_t\|=c^2/R\approx0.139 m/s² over about 188 seconds. The factor hTM/2hTM/2 is about 390 m, before the field’s Lipschitz propagation factor. This is a conservative bound, not an endpoint-error prediction.

The code computes actual errors for this field. It adjusts the effective step to end exactly at TT, so a displayed 30 seconds is approximate. The theory identifies controlling quantities; the specified field and solver determine the numerical answer.

Reducing the interval from 30 to 10 seconds reduces error by roughly three, rather than nine, in this smooth small-step regime: global order one differs from local order two.

Remember that x¨\ddot x is acceleration. Speed changes on a straight road also cause error, now along the road rather than sideways.

Run it, then make the step too large

import numpy as np
R, v = 2000.0, 60/3.6
T = (np.pi/2)*R/v  # Time for a quarter circle
def u(x):
    r = np.hypot(*x)
    return v*np.array([-x[1], x[0]])/r
def euler(h):
    N = int(round(T/h))
    x = np.array([R, 0.0])
    for _ in range(N):
        x = x + (T/N)*u(x)
    return np.linalg.norm(x - np.array([0.0, R]))
for h in [30, 10, 3, 1]:
    print(h, round(euler(h)))
# Errors scale approximately linearly with h in the small-step regime.

Stability asks another question. For x˙=−kx\dot x=-kx with k>0k>0, the exact solution decays, while Euler multiplies by 1−hk1-hk. Its magnitude is below one when 0<hk<20<hk<2, equals one at hk=2hk=2, and exceeds one for hk>2hk>2. Check this actual amplification factor; the conservative (1+hL)(1+hL) bound alone does not decide stability.

Check your understanding

Check your understanding

A robot estimates position by reading velocity every half-second and extrapolating at constant velocity. Which motion gives the most accurate estimate?

Check your understanding

Reducing the update interval from 30 to 10 seconds changes endpoint error from about 486 to 161 m. What is a reasonable expectation at one second?

Check your understanding

What does LL control in heLT∫∥at(xt)∥dth e^{LT}\int\|a_t(x_t)\|dt?

References

  1. Hairer, E., Nørsett, S. P., Wanner, G. Solving Ordinary Differential Equations I: Nonstiff Problems. Springer, 2nd ed., 1993.
  2. Butcher, J. C. Numerical Methods for Ordinary Differential Equations. Wiley, 3rd ed., 2016.
  3. Grönwall, T. H. Note on the Derivatives with Respect to a Parameter of the Solutions of a System of Differential Equations. Annals of Mathematics 20(4), 1919.