Implicit equation solver
If the method is of implicit type, a nonlinear equation solver procedure must be described.
In EpODE, a method is declared implicit if the following oriented graph
has cycles: G'=(V',E'), where
V' is the set of 'final' and 'intermediate' variables, and (vi,vj ) in E' if vj 's
iterative equation depends on vi.
Suppose we must solve g(x)=0, where g: Rm to Rm, and suppose we have an approximation of an exact solution x0 .
In the actual implementation, the user can select from two fixed iterative procedures:
- the simple iterations are generated by the equation x n+1 =g(xn). Theoretically, ||g'(x)||<1, and
x0 is enough closed to an exact solution x* (g(x* )=0), x n goes to x* when n goes to infinity;
- a Newton like procedure: x n+1 =xn -[g'(x0 )] -1 g(xn ), n>= 0. The main keys in this iterative process are
the computation of the Jacobian matrix (one time at each method step, for new values of x0 and for the new form of g),
and the solving procedure of the linear system g'(x0 )zn =-g(xn ) (after that, we set x n+1 =xn +zn ).
Note that at each method step, g will be changed, and his form must be recomputed. In order
to use the same procedure for obtaining the Jacobian like that used in determining the
problem properties, g must be represented by a Polish sequence.
The detection of the method variables which will form the vector x is not a simple task.
In EpODE, the vector x is formed from those variables which are included in at least
one cycle of the oriented graph G'. All the other variables are included in a free term
of g (a vector of floating point numbers).
Another problem is the starting vector x0 . Explicit procedure for his evaluation must
be specified. In EpODE, for each variable which will appear as an argument of g,
it must be given an explicit equation. Such an equation can contain 'starting' variables
numbers (integers or
floating point numbers), the arithmetical operators
+, -, *, /, ^
the mathematical functions
acos, asin, atan, cosh, sinh, tanh, cos, sin, tan, exp, log10, log, sqrt, neg, pow10 ,
the ODE system function f, referred by the string 'fct' or the
second derivative, referred by the string 'dfct', and the method stepsize variable, referred by the string 'h'.
Example for the method DIRK4