NUM_ODESOLVE _ _ _ _ _ _ _ _ _ _ _ _ operator
The Runge-Kutta method of order 3 finds an approximate graph for the solution of real ODE initial value problem.
or
num_odesolve({<exp>,<exp>,...}, { <depvar>=<start>,<depvar>=<start>,...} <indep>=(<from> .. <to>) [,accuracy=<a>][,iterations=<i>])
where <depvar> and <start> specify the dependent variable(s) and the starting point value (vector), <indep>, <from> and <to> specify the independent variable and the integration interval (starting point and end point), <exp> are equations or expressions which contain the first derivative of the independent variable with respect to the dependent variable.
The ODEs are converted to an explicit form, which then is used for a Runge Kutta iteration over the given range. The number of steps is controlled by the value of <i> (default: 20). If the steps are too coarse to reach the desired accuracy in the neighborhood of the starting point, the number is increased automatically.
Result is a list of pairs, each representing a point of the approximate solution of the ODE problem.
depend(y,x); num_odesolve(df(y,x)=y,y=1,x=(0 .. 1), iterations=5); ,{0.2,1.2214},{0.4,1.49181796},{0.6,1.8221064563}, {0.8,2.2255208258},{1.0,2.7182511366}}
In most cases you must declare the dependency relation between the variables explicitly using depend; otherwise the formal derivative might be converted to zero.
The operator solve is used to convert the form into an explicit ODE. If that process fails or if it has no unique result, the evaluation is stopped with an error message.