ePiX can plot the derivative or definite integral of real-valued functions, solve ODEs in two or three variables, and graph slope- or vector fields. Let f be a real-valued function of one variable, F a P-valued function of two or three variables.
plot(D(f), a, b, n); // plot f' over [a,b] plot(I(f, x0), a, b, n); ode_plot(F, p_0, t_min, t_max, n); flow(F, p_0, t_max, n);The second command graphs the definite integral
The third command plots the solution curve of the initial-value
problem
,
, over the specified time interval.
If
is omitted, its value is 0, so the curve starts
at
. With manual calculation to rotate a planar field a quarter
turn, ode_plot can be used to draw level curves (isobars) of a
function; see the sample file dipole.xp. The fourth command
returns the result of starting at
and flowing by
for
time
, using Euler's method with
timesteps. This
is useful for placing markers or arrowheads precisely along a flow
line. A vector field itself may be drawn in three ways:
vector_field(F, p, q, n1, n2); // proportional length dart_field (F, p, q, n1, n2); // constant length slope_field (F, p, q, n1, n2); // directionless, const lengthThe field is sampled at the grid points of the coordinate rectangle whose corners are specified.