ODE(1)
π¦ ode(1) β the GNU Plotting Utilities manual, bestie edition
okay so you opened the manual for ode, from the GNU Plotting Utilities, and honestly? slay. let's get into it π
β¨ NAME β¨
ode β numerical solution of ordinary differential equations. yes that's the whole name section, she's brief and iconic like that π
πΈ SYNOPSIS πΈ
ode [ options ] [ file ]
π DESCRIPTION π
ode is literally a tool that solves, by numerical integration, the initial value problem for a system of first-order ordinary differential equations you specify. no cap. and she's not locked into one method either β there are three distinct numerical integration schemes available:
- Runge-Kutta-Fehlberg (this one's the default π)
- Adams-Moulton
- Euler
The Adams-Moulton and Runge-Kutta schemes are available with adaptive step size, which is highkey the good stuff β¨
The operation of ode is specified by a program, written in its input language. The program is just a list of expressions for the derivatives of the variables to be integrated, together with some control statements. Some examples are given in the EXAMPLES section, keep scrolling bestie π«Ά
ode reads the program from the specified file, or from standard input if no file name is given. If reading from standard input, ode will stop reading and exit when it sees a single period on a line by itself. that's your little "okay we're done here" signal π
At each time step, the values of variables specified in the program are written to standard output. So a table of values will be produced, like, with each column showing the evolution of a variable. And if there are only two columns, the output can be piped to graph(1) or a similar plotting program β the way that just works ππ
β OPTIONS β
π Input Options
-ffile,--input-filefile β Read input from file before reading from standard input. This option makes it possible to work interactively, after reading a program fragment that defines the system of differential equations. cute little warm-up act fr fr π
π Output Options
-pprec,--precisionprec β When printing numerical results, use prec significant digits (the default is6). If this option is given, the print format will be scientific notation. numbers but make them β¨preciseβ¨-t,--titleβ Print a title line at the head of the output, naming the variables in each column. If this option is given, the print format will be scientific notation. labels on top, we love a header π
π§ Integration Scheme Options
The following options specify the numerical integration scheme. Only one of the three basic options -R, -A, -E may be specified. The default is -R (Runge-Kutta-Fehlberg). one at a time please, don't be greedy π
-R[stepsize],--runge-kutta[stepsize] β Use a fifth-order Runge-Kutta-Fehlberg algorithm, with an adaptive stepsize unless a constant stepsize is specified. When a constant stepsize is specified and no error analysis is requested, then a classical fourth-order Runge-Kutta scheme is used. she adapts, she's flexible, she's the default for a reason π₯-A[stepsize],--adams-moulton[stepsize] β Use a fourth-order Adams-Moulton predictor-corrector scheme, with an adaptive stepsize unless a constant stepsize, stepsize, is specified. The Runge-Kutta-Fehlberg algorithm is used to get past `bad' points (if any). predictor-corrector is giving main character energy ngl β-E[stepsize],--euler[stepsize] β Use aquick and dirty' Euler scheme, with a constant stepsize. The default value of *stepsize* is0.1`. Not recommended for serious applications. she's the messy one and we love her anyway π
The error bound options -r and -e (see below) may not be used if -E is specified. hard boundary, no crossover π«
-hhmin [hmax],--step-size-boundhmin [hmax] β Use a lower bound hmin on the stepsize. The numerical scheme will not let the stepsize go below hmin. The default is to allow the stepsize to shrink to the machine limit, i.e., the minimum nonzero double-precision floating point number. tiny steps are still steps ππ
The optional argument hmax, if included, specifies a maximum value for the stepsize. It is useful in preventing the numerical routine from skipping quickly over an interesting region. don't skip past the good part bestie π
π«Ά Error Bound Options
-rrmax [rmin],--relative-error-boundrmax [rmin] β The-roption sets an upper bound on the relative single-step error. If the-roption is used, the relative single-step error in any dependent variable will never exceed rmax (the default for which is10^-9). If this should occur, the solution will be abandoned and an error message will be printed. If the stepsize is not constant, the stepsize will be decreased `adaptively', so that the upper bound on the single-step error is not violated. Thus, choosing a smaller upper bound on the single-step error will cause smaller stepsizes to be chosen. A lower bound rmin may optionally be specified, to suggest when the stepsize should be increased (the default for rmin is rmax/1000). adaptive queen behavior honestly β¨-eemax [emin],--absolute-error-boundemax [emin] β Similar to-r, but bounds the absolute rather than the relative single-step error. same vibe, different math π-s,--suppress-error-boundβ Suppress the ceiling on single-step error, allowingodeto continue even if this ceiling is exceeded. This may result in large numerical errors. like, actually be careful with this one, I'm not joking π
π₯ Informational Options
--helpβ Print a list of command-line options, and exit. the "help me help you" option π«Ά--versionβ Print the version number ofodeand the plotting utilities package, and exit. proof of identity, periodt π
π DIAGNOSTICS π
Mostly self-explanatory. The biggest exception is `syntax error', meaning there is a grammatical error. Language error messages are of the form
ode: nnn: message...
where nnn' is the number of the input line containing the error. If the -foption is used, the phrase(file)' follows the nnn' for errors encountered inside the file. Subsequently, when odebegins reading the standard input, line numbers start over from1`. fresh start, clean slate πΈ
No effort is made to recover successfully from syntactic errors in the input. However, there is a meager effort to resynchronize so more than one error can be found in one scan. she's doing her best okay π
Run-time errors elicit a message describing the problem, and the solution is abandoned. rip to that solution π
π EXAMPLES π
The program
y' = y
y = 1
print t, y
step 0, 1
solves an initial value problem whose solution is y=e^t. When ode runs this program, it will write two columns of numbers to standard output. Each line will show the value of the independent variable t, and the variable y, as t is stepped from 0 to 1. literally the cutest little hello world of differential equations π₯Ή
A more sophisticated example would be
sine' = cosine
cosine' = -sine
sine = 0
cosine = 1
print t, sine
step 0, 2*PI
This program solves an initial value problem for a system of two differential equations. The initial value problem turns out to define the sine and cosine functions. The program steps the system over a full period. the way this is just trig disguised as a diff eq system, obsessed πβ¨
π AUTHORS π
ode was written by Nicholas B. Tufillaro (nbt@reed.edu), and slightly enhanced by Robert S. Maier (rsm@math.arizona.edu) to merge it into the GNU plotting utilities. legends, both of them π
π¦ SEE ALSO π¦
"The GNU Plotting Utilities Manual". that's it, that's the reference, go read it bestie π«Ά
π BUGS π
Email bug reports to bug-gnu-utils@gnu.org. do it, they want to know, iykyk π
and that's the whole page!! this little slice of the GNU Plotting Utilities manual is brought to you by the FSF, dated Dec 1998 β vintage, iconic, still slaying π β¨π
π¦ where this page comes from
- arch rolling: plotutils 2.6-12 Β· GPL-3.0-or-later
- centos-stream 10: plotutils 2.6-37.el10 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- centos-stream 9: plotutils 2.6-28.el9 Β· GPLv2+ and GPLv3+
- centos-stream 9: plotutils 2.6-28.el9 Β· GPLv2+ and GPLv3+
- fedora 43: plotutils 2.6-38.fc43 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 43: plotutils 2.6-38.fc43 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 44: plotutils 2.6-39.fc44 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 44: plotutils 2.6-39.fc44 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: plotutils 2.6-160000.2.2 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: plotutils 2.6-160000.2.2 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: plotutils 2.6-160000.2.2 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: plotutils 2.6-160000.2.2 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms