= Computational physics
<Computational physics> uses numerical algorithms to obtain and test predictions of physical models. It includes solving <differential equations>, simulating <stochastic processes> and extracting physical quantities from data. The mathematical model, its numerical approximation and its agreement with an <experiment> are separate questions: an accurately executed algorithm can still solve an unsuitable model.
A simple example is the <harmonic oscillator> $\ddot x=-\omega^2x$. The explicit <Euler method> advances it by
$$
x_{n+1}=x_n+h v_n,\qquad v_{n+1}=v_n-h\omega^2x_n.
$$
For a unit mass, define $E_n=(v_n^2+\omega^2x_n^2)/2$. Direct substitution gives
$$
E_{n+1}=(1+h^2\omega^2)E_n.
$$
The physical oscillator conserves <energy>, but this algorithm creates it on every step. The discrepancy is a numerical effect, not a discovery about the oscillator. Changing the time step and comparing with a known solution exposes the problem; for long integrations, the choice of numerical method matters as well as the size of the step.
<Richard Feynman>'s lecture on planetary motion gives a concrete historical teaching example: forces determine <accelerations>, which update <velocities> and positions through successive arithmetic steps. A computer extends the same approach to systems whose coupled motion has no convenient closed expression.<The Feynman Lectures on Physics, Volume I by Richard Feynman and others>[Chapter 9, section 9–7, Planetary motions, Table 9–2; https://www.feynmanlectures.caltech.edu/I_09.html]{ref} Conservation checks, comparison against solvable limits, and convergence under finer numerical resolution help distinguish a reliable calculation from an attractive plot. Agreement with <measurements> then tests the physical model itself.
Back to article page