Numerical Methods for ODEs

time-stepping

You cannot watch a continuous trajectory on a computer the way nature unfolds it — a machine only does a finite number of arithmetic operations. So instead of the smooth flow, you take a series of discrete hops: from where you are now, estimate where you will be a little later, jump there, and repeat. Time-stepping is this hop-by-hop march, turning a continuous differential equation into a sequence of explicit calculations.

Concretely, you replace the continuous time axis by a grid t0, t1, t2, ... usually spaced a fixed step h apart, so t_{n+1} = t_n + h. You keep an approximation y_n to the true solution y(t_n), and a stepping rule (the numerical method) tells you how to compute y_{n+1} from y_n (and possibly from f evaluated at one or more points). The very simplest rule, forward Euler, just follows the current slope for one step: y_{n+1} = y_n + h * f(t_n, y_n). More accurate rules sample the slope at several places inside the step before committing. Either way, you march t0 -> t1 -> t2 -> ... until you reach the time you care about, and the discrete sequence y_0, y_1, y_2, ... is your numerical solution.

Two honest tensions live at the heart of time-stepping. Smaller steps h are more ACCURATE (the per-step error usually shrinks like a power of h) but cost more work, because you need more steps to cover the same time span. And smaller is not automatically safer: with certain (explicit) methods on certain (stiff) problems, a step that is too large does not merely lose accuracy — it makes the computed solution blow up, even though the true solution is calmly decaying. Choosing the step is therefore a balance of accuracy, cost, and stability, and adaptive solvers adjust h on the fly to keep all three under control.

March y' = y, y(0) = 1 with h = 0.1 by forward Euler: y_1 = 1 + 0.1*1 = 1.1, y_2 = 1.1 + 0.1*1.1 = 1.21, y_3 = 1.331, ... After ten steps you reach t = 1 with y_10 = 1.1^10 = 2.594, versus the true e = 2.718. Smaller h closes that gap; sampling the slope more cleverly (RK4) closes it far faster.

Continuous flow becomes a discrete march of hops of size h.

Time-stepping never produces the exact trajectory — only samples at grid points, each carrying error. Between grid points you interpolate, and 'finishing at exactly t = 1' may require a final short step or a value squeezed between two grid points.

Also called
marchingtime integrationstepping forward步進時間積分