Specify the additional data an ordinary initial value omits
For \(t\ge0\) consider \(y'(t)=-a y(t-\tau)\) with positive constant gain \(a\) and delay \(\tau>0\). The derivative at the start depends on \(y(-\tau)\); an initial value \(y(0)\) alone is insufficient. Supply a history \(y(t)=\phi(t)\) on \([-\tau,0]\), continuous at zero for a continuous state. Two preparations sharing \(y(0)\) but different earlier values can immediately develop different slopes. This is why treating a delay as a new algebraic coefficient in an ODE solver without a history buffer changes the physical problem.
Take constant history \(\phi=1\). For \(0\le t\le\tau\), the delayed input is one and \(y=1-at\). For \(\tau\le t\le2\tau\), the derivative is \(-a[1-a(t-\tau)]\); integrate from \(t=\tau\) to get
On the next interval another integral gives
Each new interval solves an ordinary forced equation with known earlier right-side data. This is the method of steps. A smooth-looking initial history can nevertheless mismatch derivatives: here the left derivative at zero is zero while the equation supplies \(-a\) on the right.
Trace how a step mismatch propagates through the delay
At \(t=\tau\) continuity of \(y\) at zero makes \(y'\) continuous, but \(y''(t)=-a y'(t-\tau)\) inherits the earlier jump in \(y'\). At \(2\tau\) the discontinuity appears in the third derivative. High-order adaptive ODE error formulas assume smooth derivatives within an interval. Marking known breakpoints and integrating separately across the delay intervals avoids applying a high-degree interpolant through an unacknowledged loss of smoothness. With several delays, sums of delay lengths can generate additional event locations and their bookkeeping matters. A discontinuity in the physical forcing can also generate new fronts of reduced regularity.
Within a method-of-steps solver, values \(y(t-\tau)\) usually lie between stored previous mesh points. Dense output supplies their interpolation. Its error feeds directly into the next interval's right side and can limit global accuracy even when the ODE time-step rule has higher formal order. Maintain enough history to cover the largest delay and requested outputs, and preserve the known one-sided behaviour at breakpoints. If a trial step is longer than the delay its stages may refer to the current unknown interval; an algorithm must either constrain that step or solve the resulting within-step interpolation problem consistently. A generic lookup of the last stored value instead creates an unintended zero-order-held feedback law.
Background · Can smooth data prevent the first derivative jump?
A constant history \(\phi(t)=1\) has zero left derivative at the start. The equation \(y'=-a\,y(t-\tau)\) demands right derivative \(-a\), creating an immediate mismatch. A history with \(\phi(-\tau)=1\) and \(\phi'(0^-)=-a\) instead matches the first derivative. For example, choose \(\phi(t)=1-a(t+\tau)\) on the history interval.
Matching a first derivative does not guarantee a smooth second derivative. Differentiating the equation once shows that the next matching condition would be
For the linear history, the two sides are zero and \(a^2\). The mismatch has moved up by one derivative. A high-order interpolant across the start may therefore still lose order even though the trajectory and its tangent look continuous.
Derive a delay-induced change of oscillatory stability
For a constant-coefficient retarded equation try \(y=e^{st}\). Substitution gives
Unlike a polynomial characteristic equation, this transcendental equation generally has infinitely many roots. A pair crosses the imaginary axis when \(s=i\omega\), giving \(a\cos(\omega\tau)=0,\ \omega-a\sin(\omega\tau)=0\). For positive \(\omega\), the first crossing is at \(\omega=a,\ a\tau=\pi/2\). With negligible delay the model behaves like the stable ODE \(y'=-ay\). The crossing indicates that negative feedback acting on old information can become destabilising; stability of the zero-delay ODE is no guarantee for arbitrary delay.
To check crossing direction, differentiate \(s+a e^{-s\tau}=0\) at constant \(a\), obtaining \(ds/d\tau=-s^2/(1+\tau s)\) after using the characteristic equation. At \(s=ia\) its real part is \(a^2/[1+(a\tau)^2]>0\). Increasing delay moves this pair into the unstable half-plane. A numerically observed sign-changing transient alone does not prove instability, as stable delay systems can oscillate while decaying. Compare an envelope over successive periods with the characteristic roots and refine both time discretisation and history interpolation. An unstable numerical discretisation can otherwise imitate a feedback-induced growth.
Compare a stored history with the method-of-steps solution
The delay is the time unit and the history on the preceding interval is one. The calculator integrates an explicit Euler update with an integer number of steps per delay so it can read the delayed state exactly at a stored grid index. The comparison curve evaluates the exact piecewise polynomial. Its kth contribution starts after k minus one delay intervals and has coefficient given by the kth power of minus the dimensionless feedback divided by k factorial. This follows by repeatedly integrating the previous interval’s polynomial, so it is independent of the Euler recurrence.
At feedback one, inspect the exact values after one, two and three delays before refining the grid. Euler already integrates the constant derivative on the first interval exactly, while errors enter on later intervals. Change the feedback across π/2 and compare the oscillation envelope. Six displayed delays are useful for checking the calculation but can be too short to measure slow growth close to threshold. A stable-looking short record does not replace the characteristic-root analysis. Because the grids here align with the delay, this experiment isolates stepping error and does not test a general off-grid history interpolator.
Tutorial · distinguish history dependence from numerical error
Compute three exact method-of-steps values
For \(a=1\,\mathrm{s^{-1}}\), \(\tau=1\) s and constant unit history, find \(y(1),y(2),y(3)\). Does a negative response at two seconds prove instability?
Work through the solution
The first value is zero. The second is
The third is
A negative value reflects delayed feedback overshoot. With \(a\tau=1<\pi/2\) the zero solution is asymptotically stable for this model even though the transient crosses zero. The exact interval polynomials provide stringent tests for a history interpolator at the first few breakpoints.
Construct incompatible histories with the same initial value
Keep \(a=\tau=1\) and compare \(\phi_1(t)=1\) with \(\phi_2(t)=1+t\) on \([-1,0]\). Obtain the distinct states on the first interval.
Work through the solution
For the first history \(y_1=1-t\). For the second, \(\phi_2(t-1)=t\), so \(y_2'= -t\) and \(y_2=1-t^2/2\). At \(t=1\) their values are 0 and 0.5 although both began at 1. Their initial right derivatives differ by one. A restart record containing only time and last state cannot reconstruct the interrupted integration; retaining the relevant past function is part of the state representation.
Compare physical and discrete stability boundaries
A controller has \(a=4\,\mathrm{s^{-1}}\). Estimate the first critical delay and the oscillation period there. What numerical checks would separate it from a coarse-step instability?
Work through the solution
The first critical delay is
Its frequency is \(a/(2\pi)=0.6366\) Hz and period \(2\pi/a=1.571\) s. Change the delay on both sides of the predicted value, resolve the oscillation with multiple step sizes and compare measured growth with the characteristic equation. Keep history interpolation accurate while refining; fixed low-order delayed lookup can determine the observed stability error even as the main integrator step is reduced.