<A NAME=num_odesolve>
<TITLE>num_odesolve</TITLE></A>
<b><a href=r37_idx.html>INDEX</a></b><p><p>
<B>NUM_ODESOLVE</B> _ _ _ _ _ _ _ _ _ _ _ _ <B>operator</B><P>
<P>
<P>
<P>
The <em>Runge-Kutta</em> method of order 3 finds an approximate graph for
the solution of real <em>ODE initial value problem</em>.
<P>
<P>
<P> <H3>
syntax: </H3>
<em>num_odesolve</em>(<exp>,<depvar>=<start>,
<indep>=(<from> .. <to>)
[,accuracy=<a>][,iterations=<i>])
<P>
<P>
or
<P>
<P>
<em>num_odesolve</em>({<exp>,<exp>,...},
{ <depvar>=<start>,<depvar>=<start>,...}
<indep>=(<from> .. <to>)
[,accuracy=<a>][,iterations=<i>])
<P>
<P>
<P>
<P>
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.
<P>
<P>
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.
<P>
<P>
Result is a list of pairs, each representing a point of the
approximate solution of the ODE problem.
<P>
<P>
<P> <H3>
examples: </H3>
<P><PRE><TT>
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}}
</TT></PRE><P>In most cases you must declare the dependency relation
between the variables explicitly using
<A HREF=r37_0192.html>depend</A>;
otherwise the formal derivative might be converted to zero.
<P>
<P>
The operator
<A HREF=r37_0179.html>solve</A> 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.
<P>
<P>