fe43cf583ae2379dfe39695bc407ea5bc2398869
[scilab.git] / scilab / modules / differential_equations / help / en_US / bvode.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) 2008 - INRIA
5  * ...
6  * 
7  * This file must be used under the terms of the CeCILL.
8  * This source file is licensed as described in the file COPYING, which
9  * you should have received as part of this distribution.  The terms
10  * are also available at    
11  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
12  *
13  -->
14 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="bvode" xml:lang="en">
15     <refnamediv>
16         <refname>bvode</refname>
17         <refpurpose>boundary value problems for ODE using collocation
18             method
19         </refpurpose>
20     </refnamediv>
21     <refnamediv xml:id="bvodeS">
22         <refname>bvodeS</refname>
23         <refpurpose>Simplified call to bvode</refpurpose>
24     </refnamediv>
25     <refsynopsisdiv>
26         <title>Calling Sequence</title>
27         <synopsis>
28             zu=bvode(xpoints,N,m,x_low,x_up,zeta,ipar,ltol,tol,fixpnt,fsub,dfsub,gsub,dgsub,guess)
29         </synopsis>
30         <synopsis>
31             zu=bvodeS(xpoints,m,N,x_low,x_up,fsub,gsub,zeta, &lt;optional_args&gt;)
32         </synopsis>
33     </refsynopsisdiv>
34     <refsection>
35         <title>Arguments</title>
36         <variablelist>
37             <varlistentry>
38                 <term>zu</term>
39                 <listitem>
40                     <para>
41                         a column vector of size <literal>M</literal>. The solution of the ode evaluated
42                         on the mesh given by points. It contains  <literal>z(u(x))</literal> for each requested
43                         points.
44                     </para>
45                 </listitem>
46             </varlistentry>
47             <varlistentry>
48                 <term>xpoints</term>
49                 <listitem>
50                     <para>an array which gives the points for which we want to observe
51                         the solution.
52                     </para>
53                 </listitem>
54             </varlistentry>
55             <varlistentry>
56                 <term>N</term>
57                 <listitem>
58                     <para>a scalar with integer value, number of differential equations
59                         (N &lt;= 20).
60                     </para>
61                 </listitem>
62             </varlistentry>
63             <varlistentry>
64                 <term>m</term>
65                 <listitem>
66                     <para>
67                         a vector of size <literal>N</literal> with integer elements.
68                         It is the vector of order of each differential equation:
69                         <literal>m(i)</literal> gives the order of the <literal>i</literal>-th differential 
70                         equation. In the following, <literal>M</literal> will represent the sum of the
71                         elements of <literal>m</literal>.
72                     </para>
73                 </listitem>
74             </varlistentry>
75             <varlistentry>
76                 <term>x_low</term>
77                 <listitem>
78                     <para>a scalar: left end of interval</para>
79                 </listitem>
80             </varlistentry>
81             <varlistentry>
82                 <term>x_up</term>
83                 <listitem>
84                     <para>a scalar: right end of interval</para>
85                 </listitem>
86             </varlistentry>
87             <varlistentry>
88                 <term>zeta</term>
89                 <listitem>
90                     <para>
91                         a vector of size <literal>M</literal>, <literal>zeta(j)</literal> gives <literal>j</literal>-th side
92                         condition point (boundary point). One must have <literal>x_low&lt;=zeta(j)
93                             &lt;=zeta(j+1)&lt;=x_up
94                         </literal>
95                     </para>
96                     <para>All side condition points must be mesh points in all meshes
97                         used, see description of <literal>ipar(11)</literal> and
98                         <literal>fixpnt</literal> below.
99                     </para>
100                 </listitem>
101             </varlistentry>
102             <varlistentry>
103                 <term>ipar</term>
104                 <listitem>
105                     <para>an array with 11 integer elements:</para>
106                     <para>
107                         <literal>[nonlin, collpnt, subint, ntol, ndimf, ndimi, iprint,
108                             iread, iguess, rstart,nfxpnt]
109                         </literal>
110                     </para>
111                     <variablelist>
112                         <varlistentry>
113                             <term>nonlin: ipar(1)</term>
114                             <listitem>
115                                 <para>0 if the problem is linear, 1 if the problem is
116                                     nonlinear
117                                 </para>
118                             </listitem>
119                         </varlistentry>
120                         <varlistentry>
121                             <term>collpnt: ipar(2)</term>
122                             <listitem>
123                                 <para>Gives the number of collocation points per subinterval
124                                     where <literal>max(m(j)) &lt;= collpnt &lt;= 7</literal>.
125                                 </para>
126                                 <para>
127                                     If <literal>ipar(2)=0</literal> then <literal>collpnt</literal> is set to  <literal>max( max(m(j))+1, 5-max(m(j)) )</literal>.
128                                 </para>
129                             </listitem>
130                         </varlistentry>
131                         <varlistentry>
132                             <term>subint: ipar(3)</term>
133                             <listitem>
134                                 <para>Gives the number of subintervals in the initial mesh. If
135                                     <literal>ipar(3) = 0</literal> then <literal>bvode</literal> arbitrarily sets
136                                     <literal>subint = 5</literal>.
137                                 </para>
138                             </listitem>
139                         </varlistentry>
140                         <varlistentry>
141                             <term>ntol: ipar(4)</term>
142                             <listitem>
143                                 <para>Gives the number of solution and derivative tolerances.
144                                     We require <literal>0 &lt; ntol &lt;= M</literal>. <literal>ipar(4)</literal>
145                                     must be set to the dimension of the <literal>tol</literal>
146                                     argument or to <literal>0</literal>. In the latter case the
147                                     actual value will automatically be set to
148                                     <literal>size(tol,'*')</literal>.
149                                 </para>
150                             </listitem>
151                         </varlistentry>
152                         <varlistentry>
153                             <term>ndimf: ipar(5)</term>
154                             <listitem>
155                                 <para>
156                                     Gives the dimension of <literal>fspace</literal> (a real
157                                     work array). Its value provides a constraint on <literal>nmax</literal> the
158                                     maximum number of subintervals.
159                                 </para>
160                                 <para>
161                                     The <literal>ipar(5)</literal> value must respect the constraint
162                                     <literal>ipar(5)&gt;=nmax*nsizef</literal> where  
163                                     <literal>nsizef=4 + 3*M + (5+collpnt*N)*(collpnt*N+M) + (2*M-nrec)*2*M</literal>
164                                     (<literal>nrec</literal> is the number of right end boundary conditions).
165                                 </para>
166                             </listitem>
167                         </varlistentry>
168                         <varlistentry>
169                             <term>ndimi: ipar(6)</term>
170                             <listitem>
171                                 <para>
172                                     Gives the dimension of <literal>ispace</literal> (an integer work array).
173                                     Its value provides a constraint on <literal>nmax</literal>, the maximum number of
174                                     subintervals.
175                                 </para>
176                                 <para>
177                                     The <literal>ipar(6)</literal> value must respect the constraint
178                                     <literal>ipar(6)&gt;=nmax*nsizei</literal> where
179                                     <literal>nsizei= 3 + collpnt*N + M</literal>.
180                                 </para>
181                             </listitem>
182                         </varlistentry>
183                         <varlistentry>
184                             <term>iprint: ipar(7)</term>
185                             <listitem>
186                                 <para>output control, may take the following values:</para>
187                                 <variablelist>
188                                     <varlistentry>
189                                         <term>-1</term>
190                                         <listitem>
191                                             <para>for full diagnostic printout</para>
192                                         </listitem>
193                                     </varlistentry>
194                                     <varlistentry>
195                                         <term>0</term>
196                                         <listitem>
197                                             <para>for selected printout</para>
198                                         </listitem>
199                                     </varlistentry>
200                                     <varlistentry>
201                                         <term>1</term>
202                                         <listitem>
203                                             <para>for no printout</para>
204                                         </listitem>
205                                     </varlistentry>
206                                 </variablelist>
207                             </listitem>
208                         </varlistentry>
209                         <varlistentry>
210                             <term>iread: ipar(8)</term>
211                             <listitem>
212                                 <variablelist>
213                                     <varlistentry>
214                                         <term>= 0</term>
215                                         <listitem>
216                                             <para>causes bvode to generate a uniform initial
217                                                 mesh.
218                                             </para>
219                                         </listitem>
220                                     </varlistentry>
221                                     <varlistentry>
222                                         <term>= xx</term>
223                                         <listitem>
224                                             <para>Other values are not implemented yet in
225                                                 Scilab
226                                             </para>
227                                             <variablelist>
228                                                 <varlistentry>
229                                                     <term>= 1</term>
230                                                     <listitem>
231                                                         <para>if the initial mesh is provided by the user.
232                                                             it is defined in <literal>fspace</literal> as follows: the mesh 
233                                                             will occupy <literal>fspace(1), ..., fspace(n+1)</literal>. The user needs to supply only
234                                                             the interior mesh points <literal>fspace(j) = x(j),
235                                                                 j = 2, ..., n.
236                                                             </literal>
237                                                         </para>
238                                                     </listitem>
239                                                 </varlistentry>
240                                                 <varlistentry>
241                                                     <term>= 2 
242                                                     </term>
243                                                     <listitem>
244                                                         <para>
245                                                             if the initial mesh is supplied by the user as with <literal>ipar(8)=1</literal>, and 
246                                                             in addition no adaptive mesh selection is to be done.
247                                                         </para>
248                                                     </listitem>
249                                                 </varlistentry>
250                                             </variablelist>
251                                         </listitem>
252                                     </varlistentry>
253                                 </variablelist>
254                             </listitem>
255                         </varlistentry>
256                         <varlistentry>
257                             <term>iguess: ipar(9)</term>
258                             <listitem>
259                                 <variablelist>
260                                     <varlistentry>
261                                         <term>= 0</term>
262                                         <listitem>
263                                             <para>if no initial guess for the solution is
264                                                 provided.
265                                             </para>
266                                         </listitem>
267                                     </varlistentry>
268                                     <varlistentry>
269                                         <term>= 1</term>
270                                         <listitem>
271                                             <para>if an initial guess is provided by the user
272                                                 through the argument <literal>guess</literal>.
273                                             </para>
274                                         </listitem>
275                                     </varlistentry>
276                                     <varlistentry>
277                                         <term>= 2</term>
278                                         <listitem>
279                                             <para>if an initial mesh and approximate solution
280                                                 coefficients are provided by the user in <literal>fspace</literal> (the
281                                                 former and new mesh are the same).
282                                             </para>
283                                         </listitem>
284                                     </varlistentry>
285                                     <varlistentry>
286                                         <term>= 3</term>
287                                         <listitem>
288                                             <para>if a former mesh and approximate solution
289                                                 coefficients are provided by the user in <literal>fspace</literal> , and the
290                                                 new mesh is to be taken twice as coarse; i.e.,every
291                                                 second point from the former mesh.
292                                             </para>
293                                         </listitem>
294                                     </varlistentry>
295                                     <varlistentry>
296                                         <term>= 4</term>
297                                         <listitem>
298                                             <para>if in addition to a former initial mesh and
299                                                 approximate solution coefficients, a new mesh is
300                                                 provided in <literal>fspace</literal> as well (see description of output
301                                                 for further details on iguess = 2, 3 and 4).
302                                             </para>
303                                         </listitem>
304                                     </varlistentry>
305                                 </variablelist>
306                             </listitem>
307                         </varlistentry>
308                         <varlistentry>
309                             <term>ireg: ipar(10)</term>
310                             <listitem>
311                                 <variablelist>
312                                     <varlistentry>
313                                         <term>= 0</term>
314                                         <listitem>
315                                             <para>if the problem is regular</para>
316                                         </listitem>
317                                     </varlistentry>
318                                     <varlistentry>
319                                         <term>= 1</term>
320                                         <listitem>
321                                             <para>
322                                                 if the first relaxation factor is equal to <literal>ireg</literal>, and
323                                                 the nonlinear iteration does not rely on past convergence
324                                                 (use for an extra-sensitive nonlinear problem only)
325                                             </para>
326                                         </listitem>
327                                     </varlistentry>
328                                     <varlistentry>
329                                         <term>= 2</term>
330                                         <listitem>
331                                             <para>if we are to return immediately upon (a) two
332                                                 successive nonconvergences, or (b) after obtaining an error
333                                                 estimate for the first time.
334                                             </para>
335                                         </listitem>
336                                     </varlistentry>
337                                 </variablelist>
338                             </listitem>
339                         </varlistentry>
340                         <varlistentry>
341                             <term>nfxpnt: ipar(11)</term>
342                             <listitem>
343                                 <para>Gives the number of fixed points in the mesh other than
344                                     <literal>x_low</literal> and <literal>x_up</literal> (the
345                                     dimension of <literal>fixpnt</literal>).
346                                     <literal>ipar(11)</literal> must be set to the dimension of
347                                     the <literal>fixpnt</literal> argument or to
348                                     <literal>0</literal>. In the latter case the actual value will
349                                     automatically be set to
350                                     <literal>size(fixpnt,'*')</literal>.
351                                 </para>
352                             </listitem>
353                         </varlistentry>
354                     </variablelist>
355                 </listitem>
356             </varlistentry>
357             <varlistentry>
358                 <term>ltol</term>
359                 <listitem>
360                     <para>
361                         an array of dimension <literal>ntol=ipar(4)</literal>.
362                         <literal>ltol(j) = l</literal> specifies that the <literal>j</literal>-th tolerance in
363                         the <literal> tol</literal> array controls the error in the <literal>l</literal>-th
364                         component of 
365                         <inlinemediaobject>
366                             <imageobject>
367                                 <imagedata>
368                                     <mml:math>
369                                         <mml:semantics>
370                                             <mml:mi>z</mml:mi>
371                                             <mml:mrow>
372                                                 <mml:mo mml:stretchy="false">(</mml:mo><mml:mi>u</mml:mi><mml:mo mml:stretchy="false">)</mml:mo>
373                                             </mml:mrow>
374                                         </mml:semantics>
375                                     </mml:math>
376                                 </imagedata>
377                             </imageobject>
378                         </inlinemediaobject>
379                         . It is also required that:
380                     </para>
381                     <para>
382                         <literal>1 &lt;= ltol(1) &lt; ltol(2) &lt; ... &lt; ltol(ntol)
383                             &lt;= M
384                         </literal>
385                     </para>
386                 </listitem>
387             </varlistentry>
388             <varlistentry>
389                 <term>tol</term>
390                 <listitem>
391                     <para>
392                         an array of dimension <literal>ntol=ipar(4)</literal>.
393                     </para>
394                     <para>
395                         <literal>tol(j)</literal> is the error tolerance on the
396                         <literal>ltol(j)</literal>-th component of 
397                         <inlinemediaobject>
398                             <imageobject>
399                                 <imagedata>
400                                     <mml:math>
401                                         <mml:semantics>
402                                             <mml:mi>z</mml:mi>
403                                             <mml:mrow>
404                                                 <mml:mo mml:stretchy="false">(</mml:mo><mml:mi>u</mml:mi><mml:mo mml:stretchy="false">)</mml:mo>
405                                             </mml:mrow>
406                                         </mml:semantics>
407                                     </mml:math>
408                                 </imagedata>
409                             </imageobject>
410                         </inlinemediaobject>
411                         . Thus, the code attempts to satisfy
412                         <inlinemediaobject>
413                             <imageobject>
414                                 <imagedata>
415                                     <mml:math>
416                                         <mml:semantics>
417                                             <mml:mrow>
418                                                 <mml:mrow>
419                                                     <mml:mfenced mml:close="∣" mml:open="∣">
420                                                         <mml:msub>
421                                                             <mml:mrow>
422                                                                 <mml:mo mml:stretchy="false">(</mml:mo>
423                                                                 <mml:mrow>
424                                                                     <mml:mi>z</mml:mi>
425                                                                     <mml:mrow>
426                                                                         <mml:mrow>
427                                                                             <mml:mo mml:stretchy="false">(</mml:mo><mml:mi>v</mml:mi><mml:mo mml:stretchy="false">)</mml:mo>
428                                                                         </mml:mrow>
429                                                                         <mml:mo mml:stretchy="false">−</mml:mo><mml:mi>z</mml:mi>
430                                                                     </mml:mrow>
431                                                                     <mml:mrow>
432                                                                         <mml:mo mml:stretchy="false">(</mml:mo><mml:mi>u</mml:mi><mml:mo mml:stretchy="false">)</mml:mo>
433                                                                     </mml:mrow>
434                                                                 </mml:mrow>
435                                                                 <mml:mo mml:stretchy="false">)</mml:mo>
436                                                             </mml:mrow>
437                                                             <mml:mrow>
438                                                                 <mml:mi mml:fontstyle="italic">ltol</mml:mi>
439                                                                 <mml:mrow>
440                                                                     <mml:mo mml:stretchy="false">(</mml:mo><mml:mi>j</mml:mi><mml:mo mml:stretchy="false">)</mml:mo>
441                                                                 </mml:mrow>
442                                                             </mml:mrow>
443                                                         </mml:msub>
444                                                     </mml:mfenced>
445                                                     <mml:mo mml:stretchy="false">≤</mml:mo><mml:mi mml:fontstyle="italic">tol</mml:mi>
446                                                 </mml:mrow>
447                                                 <mml:mrow>
448                                                     <mml:mrow>
449                                                         <mml:mrow>
450                                                             <mml:mo mml:stretchy="false">(</mml:mo><mml:mi>j</mml:mi><mml:mo mml:stretchy="false">)</mml:mo>
451                                                         </mml:mrow>
452                                                         <mml:mo mml:stretchy="false">⋅</mml:mo>
453                                                         <mml:mfenced mml:close="∣" mml:open="∣">
454                                                             <mml:msub>
455                                                                 <mml:mrow>
456                                                                     <mml:mo mml:stretchy="false">(</mml:mo>
457                                                                     <mml:mrow>
458                                                                         <mml:mi>z</mml:mi>
459                                                                         <mml:mrow>
460                                                                             <mml:mo mml:stretchy="false">(</mml:mo><mml:mi>u</mml:mi><mml:mo mml:stretchy="false">)</mml:mo>
461                                                                         </mml:mrow>
462                                                                     </mml:mrow>
463                                                                     <mml:mo mml:stretchy="false">)</mml:mo>
464                                                                 </mml:mrow>
465                                                                 <mml:mrow>
466                                                                     <mml:mi mml:fontstyle="italic">ltol</mml:mi>
467                                                                     <mml:mrow>
468                                                                         <mml:mo mml:stretchy="false">(</mml:mo><mml:mi>j</mml:mi><mml:mo mml:stretchy="false">)</mml:mo>
469                                                                     </mml:mrow>
470                                                                 </mml:mrow>
471                                                             </mml:msub>
472                                                         </mml:mfenced>
473                                                     </mml:mrow>
474                                                     <mml:mo mml:stretchy="false">+</mml:mo><mml:mi mml:fontstyle="italic">tol</mml:mi>
475                                                 </mml:mrow>
476                                                 <mml:mrow>
477                                                     <mml:mo mml:stretchy="false">(</mml:mo><mml:mi>j</mml:mi><mml:mo mml:stretchy="false">)</mml:mo>
478                                                 </mml:mrow>
479                                                 <mml:mi>,</mml:mi><mml:mi mml:fontstyle="normal">for</mml:mi>
480                                                 <mml:mrow>
481                                                     <mml:mi>j</mml:mi><mml:mo mml:stretchy="false">=</mml:mo><mml:mn>1</mml:mn>
482                                                 </mml:mrow>
483                                                 <mml:mi mml:fontstyle="normal">:</mml:mi><mml:mi mml:fontstyle="normal">ntol</mml:mi>
484                                             </mml:mrow>
485                                             <mml:annotation mml:encoding="StarMath 5.0">abs(z(v)-z(u))_{ltol(j)}
486                                                 &lt;= tol(j) cdot abs(z(u))_{ltol(j)} + tol(j), for
487                                                 j=1:ntol
488                                             </mml:annotation>
489                                         </mml:semantics>
490                                     </mml:math>
491                                 </imagedata>
492                             </imageobject>
493                         </inlinemediaobject>
494                         on each subinterval
495                     </para>
496                     <para>
497                         where
498                         <inlinemediaobject>
499                             <imageobject>
500                                 <imagedata>
501                                     <mml:math>
502                                         <mml:semantics>
503                                             <mml:mi>v</mml:mi>
504                                         </mml:semantics>
505                                     </mml:math>
506                                 </imagedata>
507                             </imageobject>
508                         </inlinemediaobject>
509                         is the approximate solution vector and 
510                         <inlinemediaobject>
511                             <imageobject>
512                                 <imagedata>
513                                     <mml:math>
514                                         <mml:semantics>
515                                             <mml:mi>u</mml:mi>
516                                         </mml:semantics>
517                                     </mml:math>
518                                 </imagedata>
519                             </imageobject>
520                         </inlinemediaobject>
521                         is the
522                         exact solution (unknown).
523                     </para>
524                 </listitem>
525             </varlistentry>
526             <varlistentry>
527                 <term>fixpnt</term>
528                 <listitem>
529                     <para>
530                         an array of dimension <literal>nfxpnt=ipar(11)</literal>. It
531                         contains the points, other than <literal>x_low</literal> and
532                         <literal>x_up</literal>, which are to be included in every mesh. The
533                         code requires that all side condition points other than
534                         <literal>x_low</literal> and <literal>x_up</literal> (see
535                         description of <literal>zeta</literal> ) be included as fixed points in
536                         <literal>fixpnt</literal>.
537                     </para>
538                 </listitem>
539             </varlistentry>
540             <varlistentry>
541                 <term>fsub</term>
542                 <listitem>
543                     <para>
544                         an <link linkend="external">external</link> used to evaluate
545                         the column vector <literal>f=</literal> 
546                         <inlinemediaobject>
547                             <imageobject>
548                                 <imagedata>
549                                     <mml:math>
550                                         <mml:semantics>
551                                             <mml:mrow>
552                                                 <mml:mo mml:stretchy="false">[</mml:mo>
553                                                 <mml:mrow>
554                                                     <mml:msub>
555                                                         <mml:mi>f</mml:mi><mml:mn>1</mml:mn>
556                                                     </mml:msub>
557                                                     <mml:mrow>
558                                                         <mml:mo mml:stretchy="false">(</mml:mo>
559                                                         <mml:mrow>
560                                                             <mml:mi>x</mml:mi><mml:mi>,</mml:mi><mml:mi>z</mml:mi>
561                                                             <mml:mrow>
562                                                                 <mml:mo mml:stretchy="false">(</mml:mo>
563                                                                 <mml:mrow>
564                                                                     <mml:mi>u</mml:mi>
565                                                                     <mml:mrow>
566                                                                         <mml:mo mml:stretchy="false">(</mml:mo><mml:mi>x</mml:mi><mml:mo mml:stretchy="false">)</mml:mo>
567                                                                     </mml:mrow>
568                                                                 </mml:mrow>
569                                                                 <mml:mo mml:stretchy="false">)</mml:mo>
570                                                             </mml:mrow>
571                                                         </mml:mrow>
572                                                         <mml:mo mml:stretchy="false">)</mml:mo>
573                                                     </mml:mrow>
574                                                     <mml:mi>;</mml:mi>
575                                                     <mml:msub>
576                                                         <mml:mi>f</mml:mi><mml:mn>2</mml:mn>
577                                                     </mml:msub>
578                                                     <mml:mrow>
579                                                         <mml:mo mml:stretchy="false">(</mml:mo>
580                                                         <mml:mrow>
581                                                             <mml:mi>x</mml:mi><mml:mi>,</mml:mi><mml:mi>z</mml:mi>
582                                                             <mml:mrow>
583                                                                 <mml:mo mml:stretchy="false">(</mml:mo>
584                                                                 <mml:mrow>
585                                                                     <mml:mi>u</mml:mi>
586                                                                     <mml:mrow>
587                                                                         <mml:mo mml:stretchy="false">(</mml:mo><mml:mi>x</mml:mi><mml:mo mml:stretchy="false">)</mml:mo>
588                                                                     </mml:mrow>
589                                                                 </mml:mrow>
590                                                                 <mml:mo mml:stretchy="false">)</mml:mo>
591                                                             </mml:mrow>
592                                                         </mml:mrow>
593                                                         <mml:mo mml:stretchy="false">)</mml:mo>
594                                                     </mml:mrow>
595                                                     <mml:mi>,</mml:mi><mml:mo mml:stretchy="false">⋯</mml:mo><mml:mi>,</mml:mi>
596                                                     <mml:msub>
597                                                         <mml:mi>f</mml:mi><mml:mi>N</mml:mi>
598                                                     </mml:msub>
599                                                     <mml:mrow>
600                                                         <mml:mo mml:stretchy="false">(</mml:mo>
601                                                         <mml:mrow>
602                                                             <mml:mi>x</mml:mi><mml:mi>,</mml:mi><mml:mi>z</mml:mi>
603                                                             <mml:mrow>
604                                                                 <mml:mo mml:stretchy="false">(</mml:mo>
605                                                                 <mml:mrow>
606                                                                     <mml:mi>u</mml:mi>
607                                                                     <mml:mrow>
608                                                                         <mml:mo mml:stretchy="false">(</mml:mo><mml:mi>x</mml:mi><mml:mo mml:stretchy="false">)</mml:mo>
609                                                                     </mml:mrow>
610                                                                 </mml:mrow>
611                                                                 <mml:mo mml:stretchy="false">)</mml:mo>
612                                                             </mml:mrow>
613                                                         </mml:mrow>
614                                                         <mml:mo mml:stretchy="false">)</mml:mo>
615                                                     </mml:mrow>
616                                                 </mml:mrow>
617                                                 <mml:mo mml:stretchy="false">]</mml:mo>
618                                             </mml:mrow>
619                                             <mml:annotation mml:encoding="StarMath 5.0">[f_1(x,z(u(x)));
620                                                 f_2(x,z(u(x))),dotsaxis,
621                                                 f_N(x,z(u(x)))]
622                                             </mml:annotation>
623                                         </mml:semantics>
624                                     </mml:math>
625                                 </imagedata>
626                             </imageobject>
627                         </inlinemediaobject>
628                         for any <literal>x</literal> such as <literal>x_low</literal> &lt;= <literal>x</literal> &lt;= <literal>x_up</literal>
629                         and for any <literal>z=z(u(x))</literal> (see description below).
630                     </para>
631                     <para>The external must have the headings:</para>
632                     <itemizedlist>
633                         <listitem>
634                             <para>In Fortran the calling sequence must be:</para>
635                             <programlisting role="no-scilab-exec"><![CDATA[ 
636 subroutine fsub(x,zu,f)
637 double precision zu(*), f(*),x 
638  ]]></programlisting>
639                         </listitem>
640                         <listitem>
641                             <para>In C the function prototype must be:</para>
642                             <programlisting role="no-scilab-exec"><![CDATA[ 
643 void fsub(double *x, double *zu, double *f)
644  ]]></programlisting>
645                         </listitem>
646                         <listitem>
647                             <para>And in Scilab:</para>
648                             <programlisting role="no-scilab-exec"><![CDATA[ 
649 function f=fsub(x,zu,parameters)
650  ]]></programlisting>
651                         </listitem>
652                     </itemizedlist>
653                 </listitem>
654             </varlistentry>
655             <varlistentry>
656                 <term>dfsub</term>
657                 <listitem>
658                     <para>
659                         an <link linkend="external">external</link> used to evaluate
660                         the Jacobian of <literal>f(x,z(u))</literal> at a point <literal>x</literal>. Where
661                         <literal>z(u(x))</literal> is defined as for <literal>fsub</literal>
662                         and the <literal>N</literal> by <literal>M</literal> array <literal>df</literal>
663                         should be filled by the partial derivatives of <literal>f</literal>:
664                     </para>
665                     <informalequation>
666                         <mediaobject>
667                             <imageobject>
668                                 <imagedata align="center">
669                                     <mml:math>
670                                         <mml:semantics>
671                                             <mml:mrow>
672                                                 <mml:mi mml:fontstyle="italic">df</mml:mi>
673                                                 <mml:mrow>
674                                                     <mml:mrow>
675                                                         <mml:mo mml:stretchy="false">(</mml:mo>
676                                                         <mml:mrow>
677                                                             <mml:mi>i</mml:mi>
678                                                             <mml:mi>,</mml:mi>
679                                                             <mml:mi>j</mml:mi>
680                                                         </mml:mrow>
681                                                         <mml:mo mml:stretchy="false">)</mml:mo>
682                                                     </mml:mrow>
683                                                     <mml:mo mml:stretchy="false">=</mml:mo>
684                                                     <mml:mfrac>
685                                                         <mml:mrow>
686                                                             <mml:mo mml:stretchy="false">∂</mml:mo>
687                                                             <mml:msub>
688                                                                 <mml:mi>f</mml:mi>
689                                                                 <mml:mi>i</mml:mi>
690                                                             </mml:msub>
691                                                         </mml:mrow>
692                                                         <mml:mrow>
693                                                             <mml:mo mml:stretchy="false">∂</mml:mo>
694                                                             <mml:msub>
695                                                                 <mml:mi>z</mml:mi>
696                                                                 <mml:mi>j</mml:mi>
697                                                             </mml:msub>
698                                                         </mml:mrow>
699                                                     </mml:mfrac>
700                                                 </mml:mrow>
701                                                 <mml:mtext> for
702                                                 </mml:mtext>
703                                                 <mml:mrow>
704                                                     <mml:mo mml:stretchy="true">{</mml:mo>
705                                                     <mml:mtable>
706                                                         <mml:mtr>
707                                                             <mml:mrow>
708                                                                 <mml:mrow>
709                                                                     <mml:mi>i</mml:mi>
710                                                                     <mml:mo mml:stretchy="false">=</mml:mo>
711                                                                     <mml:mn>1</mml:mn>
712                                                                 </mml:mrow>
713                                                                 <mml:mi mml:fontstyle="normal">:</mml:mi>
714                                                                 <mml:mi mml:fontstyle="italic">N</mml:mi>
715                                                             </mml:mrow>
716                                                         </mml:mtr>
717                                                         <mml:mtr>
718                                                             <mml:mrow>
719                                                                 <mml:mrow>
720                                                                     <mml:mi>j</mml:mi>
721                                                                     <mml:mo mml:stretchy="false">=</mml:mo>
722                                                                     <mml:mn>1</mml:mn>
723                                                                 </mml:mrow>
724                                                                 <mml:mi mml:fontstyle="normal">:</mml:mi>
725                                                                 <mml:mi mml:fontstyle="italic">M</mml:mi>
726                                                             </mml:mrow>
727                                                         </mml:mtr>
728                                                     </mml:mtable>
729                                                 </mml:mrow>
730                                             </mml:mrow>
731                                             <mml:annotation mml:encoding="StarMath 5.0">df(i,j)= {partial{f_i}} over
732                                                 {partial{z_j}} ~ for ~ left lbrace binom{i=1:N}{j=1:M} right
733                                                 none
734                                             </mml:annotation>
735                                         </mml:semantics>
736                                     </mml:math>
737                                 </imagedata>
738                             </imageobject>
739                         </mediaobject>
740                     </informalequation>
741                     <para>The external must have the headings:</para>
742                     <itemizedlist>
743                         <listitem>
744                             <para>In Fortran the calling sequence must be:</para>
745                             <programlisting role="no-scilab-exec"><![CDATA[ 
746 subroutine dfsub(x,zu,df)
747 double precision zu(*), df(*),x
748  ]]></programlisting>
749                         </listitem>
750                         <listitem>
751                             <para>In C the function prototype must be:</para>
752                             <programlisting role="no-scilab-exec"><![CDATA[ 
753 void dfsub(double *x, double *zu, double *df)
754  ]]></programlisting>
755                         </listitem>
756                         <listitem>
757                             <para>And in Scilab:</para>
758                             <programlisting role="no-scilab-exec"><![CDATA[ 
759 function df=dfsub(x,zu,parameters)
760  ]]></programlisting>
761                         </listitem>
762                     </itemizedlist>
763                 </listitem>
764             </varlistentry>
765             <varlistentry>
766                 <term>gsub</term>
767                 <listitem>
768                     <para>
769                         an <link linkend="external">external</link> used to evaluate
770                         <inlinemediaobject>
771                             <imageobject>
772                                 <imagedata>
773                                     <mml:math>
774                                         <mml:semantics>
775                                             <mml:mrow>
776                                                 <mml:msub>
777                                                     <mml:mi>g</mml:mi><mml:mi>i</mml:mi>
778                                                 </mml:msub>
779                                                 <mml:mrow>
780                                                     <mml:mo mml:stretchy="false">(</mml:mo>
781                                                     <mml:mrow>
782                                                         <mml:msub>
783                                                             <mml:mo mml:stretchy="false">ζ</mml:mo><mml:mi>i</mml:mi>
784                                                         </mml:msub>
785                                                         <mml:mi>,</mml:mi><mml:mi>z</mml:mi>
786                                                         <mml:mrow>
787                                                             <mml:mo mml:stretchy="false">(</mml:mo>
788                                                             <mml:mrow>
789                                                                 <mml:mi>u</mml:mi>
790                                                                 <mml:mrow>
791                                                                     <mml:mo mml:stretchy="false">(</mml:mo>
792                                                                     <mml:msub>
793                                                                         <mml:mo mml:stretchy="false">ζ</mml:mo><mml:mi>i</mml:mi>
794                                                                     </mml:msub>
795                                                                     <mml:mo mml:stretchy="false">)</mml:mo>
796                                                                 </mml:mrow>
797                                                             </mml:mrow>
798                                                             <mml:mo mml:stretchy="false">)</mml:mo>
799                                                         </mml:mrow>
800                                                     </mml:mrow>
801                                                     <mml:mo mml:stretchy="false">)</mml:mo>
802                                                 </mml:mrow>
803                                             </mml:mrow>
804                                             <mml:annotation mml:encoding="StarMath 5.0">g_i(%zeta_i,z(u(%zeta_i)))</mml:annotation>
805                                         </mml:semantics>
806                                     </mml:math>
807                                 </imagedata>
808                             </imageobject>
809                         </inlinemediaobject>
810                         given z=
811                         <inlinemediaobject>
812                             <imageobject>
813                                 <imagedata>
814                                     <mml:math>
815                                         <mml:semantics>
816                                             <mml:mrow>
817                                                 <mml:mi>z</mml:mi>
818                                                 <mml:mrow>
819                                                     <mml:mo mml:stretchy="false">(</mml:mo>
820                                                     <mml:mrow>
821                                                         <mml:mi>u</mml:mi>
822                                                         <mml:mrow>
823                                                             <mml:mo mml:stretchy="false">(</mml:mo>
824                                                             <mml:msub>
825                                                                 <mml:mo mml:stretchy="false">ζ</mml:mo><mml:mi>i</mml:mi>
826                                                             </mml:msub>
827                                                             <mml:mo mml:stretchy="false">)</mml:mo>
828                                                         </mml:mrow>
829                                                     </mml:mrow>
830                                                     <mml:mo mml:stretchy="false">)</mml:mo>
831                                                 </mml:mrow>
832                                             </mml:mrow>
833                                             <mml:annotation mml:encoding="StarMath 5.0">z(u(%zeta_i))</mml:annotation>
834                                         </mml:semantics>
835                                     </mml:math>
836                                 </imagedata>
837                             </imageobject>
838                         </inlinemediaobject>
839                         <literal>z = zeta(i)</literal> for
840                         <literal>1&lt;=i&lt;=M.</literal>
841                     </para>
842                     <para>The external must have the headings:</para>
843                     <itemizedlist>
844                         <listitem>
845                             <para>In Fortran the calling sequence must be:</para>
846                             <programlisting role="no-scilab-exec"><![CDATA[ 
847 subroutine gsub(i,zu,g)
848 double precision zu(*), g(*)
849 integer i
850  ]]></programlisting>
851                         </listitem>
852                         <listitem>
853                             <para>In C the function prototype must be:</para>
854                             <programlisting role="no-scilab-exec"><![CDATA[ 
855 void gsub(int *i, double *zu, double *g)
856  ]]></programlisting>
857                         </listitem>
858                         <listitem>
859                             <para>And in Scilab:</para>
860                             <programlisting role="no-scilab-exec"><![CDATA[ 
861 function g=gsub(i,zu,parameters)
862  ]]></programlisting>
863                             <para>
864                                 Note that in contrast to <literal>f</literal> in <literal>fsub</literal>, here only one value per call is returned in <literal>g</literal>.
865                             </para>
866                         </listitem>
867                     </itemizedlist>
868                 </listitem>
869             </varlistentry>
870             <varlistentry>
871                 <term>dgsub</term>
872                 <listitem>
873                     <para>
874                         an <link linkend="external">external</link> used to evaluate
875                         the <literal>i</literal>-th row of the Jacobian of <literal>g(x,u(x))</literal>. Where
876                         <literal>z(u)</literal> is as for <literal>fsub</literal>, <literal>i</literal> as for 
877                         <literal>gsub</literal> and the <literal>M</literal>-vector <literal>dg</literal> should 
878                         be filled with the partial derivatives of <literal>g</literal>, viz, for a particular call one 
879                         calculates
880                     </para>
881                     <informalequation>
882                         <mediaobject>
883                             <imageobject>
884                                 <imagedata align="center">
885                                     <mml:math>
886                                         <mml:semantics>
887                                             <mml:mrow>
888                                                 <mml:mi mml:fontstyle="italic">dg</mml:mi>
889                                                 <mml:mrow>
890                                                     <mml:mrow>
891                                                         <mml:mo mml:stretchy="false">(</mml:mo>
892                                                         <mml:mrow>
893                                                             <mml:mi>i</mml:mi>
894                                                             <mml:mi>,</mml:mi>
895                                                             <mml:mi>j</mml:mi>
896                                                         </mml:mrow>
897                                                         <mml:mo mml:stretchy="false">)</mml:mo>
898                                                     </mml:mrow>
899                                                     <mml:mo mml:stretchy="false">=</mml:mo>
900                                                     <mml:mfrac>
901                                                         <mml:mrow>
902                                                             <mml:mo mml:stretchy="false">∂</mml:mo>
903                                                             <mml:msub>
904                                                                 <mml:mi>g</mml:mi>
905                                                                 <mml:mi>i</mml:mi>
906                                                             </mml:msub>
907                                                         </mml:mrow>
908                                                         <mml:mrow>
909                                                             <mml:mo mml:stretchy="false">∂</mml:mo>
910                                                             <mml:msub>
911                                                                 <mml:mi>z</mml:mi>
912                                                                 <mml:mi>j</mml:mi>
913                                                             </mml:msub>
914                                                         </mml:mrow>
915                                                     </mml:mfrac>
916                                                 </mml:mrow>
917                                                 <mml:mtext> for
918                                                 </mml:mtext>
919                                                 <mml:mrow>
920                                                     <mml:mo mml:stretchy="true">{</mml:mo>
921                                                     <mml:mtable>
922                                                         <mml:mtr>
923                                                             <mml:mrow>
924                                                                 <mml:mrow>
925                                                                     <mml:mi>i</mml:mi>
926                                                                     <mml:mo mml:stretchy="false">=</mml:mo>
927                                                                     <mml:mn>1</mml:mn>
928                                                                 </mml:mrow>
929                                                                 <mml:mi mml:fontstyle="normal">:</mml:mi>
930                                                                 <mml:mi mml:fontstyle="italic">M</mml:mi>
931                                                             </mml:mrow>
932                                                         </mml:mtr>
933                                                         <mml:mtr>
934                                                             <mml:mrow>
935                                                                 <mml:mrow>
936                                                                     <mml:mi>j</mml:mi>
937                                                                     <mml:mo mml:stretchy="false">=</mml:mo>
938                                                                     <mml:mn>1</mml:mn>
939                                                                 </mml:mrow>
940                                                                 <mml:mi mml:fontstyle="normal">:</mml:mi>
941                                                                 <mml:mi mml:fontstyle="italic">M</mml:mi>
942                                                             </mml:mrow>
943                                                         </mml:mtr>
944                                                     </mml:mtable>
945                                                 </mml:mrow>
946                                             </mml:mrow>
947                                             <mml:annotation mml:encoding="StarMath 5.0">dg(i,j)= {partial{g_i}} over
948                                                 {partial{z_j}} ~ for ~ left lbrace binom{i=1:M}{j=1:M} right
949                                                 none
950                                             </mml:annotation>
951                                         </mml:semantics>
952                                     </mml:math>
953                                 </imagedata>
954                             </imageobject>
955                         </mediaobject>
956                     </informalequation>
957                     <para>The external must have the headings:</para>
958                     <itemizedlist>
959                         <listitem>
960                             <para>In Fortran the calling sequence must be:</para>
961                             <programlisting role="no-scilab-exec"><![CDATA[ 
962 subroutine dgsub(i,zu,dg)
963 double precision zu(*), dg(*)
964  ]]></programlisting>
965                         </listitem>
966                         <listitem>
967                             <para>In C the function prototype must be</para>
968                             <programlisting role="no-scilab-exec"><![CDATA[ 
969 void dgsub(int *i, double *zu, double *dg)
970  ]]></programlisting>
971                         </listitem>
972                         <listitem>
973                             <para>And in Scilab </para>
974                             <programlisting role="no-scilab-exec"><![CDATA[ 
975 function dg=dgsub(i,zu,parameters)
976  ]]></programlisting>
977                         </listitem>
978                     </itemizedlist>
979                 </listitem>
980             </varlistentry>
981             <varlistentry>
982                 <term>guess</term>
983                 <listitem>
984                     <para>
985                         An <link linkend="external">external</link> used to evaluate
986                         the initial approximation for <literal>z(u(x))</literal> and
987                         <literal>dmval(u(x))</literal> the vector of the <literal>mj</literal>-th derivatives
988                         of <literal>u(x)</literal>. Note that this subroutine is used only
989                         if <literal>ipar(9) = 1</literal>, and then all <literal>M</literal>
990                         components of  <literal>zu</literal> and <literal>N</literal> components of <literal>dmval</literal> should be computed for
991                         any <literal>x</literal> such as <literal>x_low</literal> &lt;= <literal>x</literal> &lt;= <literal>x_up</literal>.
992                     </para>
993                     <para>The external must have the headings:</para>
994                     <itemizedlist>
995                         <listitem>
996                             <para>In Fortran the calling sequence must be:</para>
997                             <programlisting role="no-scilab-exec"><![CDATA[ 
998 subroutine guess(x,zu,dmval)
999 double precision x,z(*), dmval(*)
1000  ]]></programlisting>
1001                         </listitem>
1002                         <listitem>
1003                             <para>In C the function prototype must be</para>
1004                             <programlisting role="no-scilab-exec"><![CDATA[ 
1005 void fsub(double *x, double *zu, double *dmval)
1006  ]]></programlisting>
1007                         </listitem>
1008                         <listitem>
1009                             <para>And in Scilab </para>
1010                             <programlisting role="no-scilab-exec"><![CDATA[ 
1011 function [dmval,zu]=fsub(x,parameters)
1012  ]]></programlisting>
1013                         </listitem>
1014                     </itemizedlist>
1015                 </listitem>
1016             </varlistentry>
1017             <varlistentry>
1018                 <term>&lt;optional_args&gt;</term>
1019                 <listitem>
1020                     <para>It should be either:</para>
1021                     <itemizedlist>
1022                         <listitem>
1023                             <para>any left part of the ordered sequence of values:
1024                                 <literal>guess, dfsub, dgsub, fixpnt, ndimf, ndimi, ltol, tol,
1025                                     ntol,nonlin, collpnt, subint, iprint, ireg, ifail
1026                                 </literal>
1027                             </para>
1028                         </listitem>
1029                         <listitem>
1030                             <para>
1031                                 or any sequence of <literal>arg_name=argvalue</literal>
1032                                 with <literal>arg_name</literal> in: <literal>guess</literal>,
1033                                 <literal>dfsub</literal>, <literal>dgsub</literal>,
1034                                 <literal>fixpnt</literal>, <literal>ndimf</literal>,
1035                                 <literal>ndimi</literal>, <literal>ltol</literal>,
1036                                 <literal>tol</literal>, <literal>ntol</literal>,
1037                                 <literal>nonlin</literal>, <literal>collpnt</literal>,
1038                                 <literal>subint</literal>, <literal>iprint</literal>,
1039                                 <literal>ireg</literal>, <literal>ifail</literal>
1040                             </para>
1041                         </listitem>
1042                     </itemizedlist>
1043                     <para>
1044                         where all these arguments excepted <literal>ifail</literal> are
1045                         described above. <literal>ifail</literal> can be used to display the
1046                         bvode call corresonding to the selected optional arguments. If
1047                         <literal>guess</literal> is given <literal>iguess</literal> is set to
1048                         1
1049                     </para>
1050                 </listitem>
1051             </varlistentry>
1052         </variablelist>
1053     </refsection>
1054     <refsection>
1055         <title>Description</title>
1056         <para>These functions solve a multi-point boundary value problem for a
1057             mixed order system of ode-s given by
1058         </para>
1059         <informalequation>
1060             <mediaobject>
1061                 <imageobject>
1062                     <imagedata align="left">
1063                         <mml:math>
1064                             <mml:semantics>
1065                                 <mml:mrow>
1066                                     <mml:mo mml:stretchy="true">{</mml:mo>
1067                                     <mml:mtable>
1068                                         <mml:mtr>
1069                                             <mml:mrow>
1070                                                 <mml:mrow>
1071                                                     <mml:msubsup>
1072                                                         <mml:mi>u</mml:mi>
1073                                                         <mml:mi>i</mml:mi>
1074                                                         <mml:mrow>
1075                                                             <mml:mo mml:stretchy="false">(</mml:mo>
1076                                                             <mml:msub>
1077                                                                 <mml:mi>m</mml:mi>
1078                                                                 <mml:mi>i</mml:mi>
1079                                                             </mml:msub>
1080                                                             <mml:mo mml:stretchy="false">)</mml:mo>
1081                                                         </mml:mrow>
1082                                                     </mml:msubsup>
1083                                                     <mml:mo mml:stretchy="false">=</mml:mo>
1084                                                     <mml:msub>
1085                                                         <mml:mi>f</mml:mi>
1086                                                         <mml:mi>i</mml:mi>
1087                                                     </mml:msub>
1088                                                 </mml:mrow>
1089                                                 <mml:mrow>
1090                                                     <mml:mo mml:stretchy="false">(</mml:mo>
1091                                                     <mml:mrow>
1092                                                         <mml:mi>x</mml:mi>
1093                                                         <mml:mi>,</mml:mi>
1094                                                         <mml:mi>z</mml:mi>
1095                                                         <mml:mrow>
1096                                                             <mml:mo mml:stretchy="false">(</mml:mo>
1097                                                             <mml:mrow>
1098                                                                 <mml:mi>u</mml:mi>
1099                                                                 <mml:mrow>
1100                                                                     <mml:mo mml:stretchy="false">(</mml:mo>
1101                                                                     <mml:mi>x</mml:mi>
1102                                                                     <mml:mo mml:stretchy="false">)</mml:mo>
1103                                                                 </mml:mrow>
1104                                                             </mml:mrow>
1105                                                             <mml:mo mml:stretchy="false">)</mml:mo>
1106                                                         </mml:mrow>
1107                                                     </mml:mrow>
1108                                                     <mml:mo mml:stretchy="false">)</mml:mo>
1109                                                 </mml:mrow>
1110                                                 <mml:mi/>
1111                                                 <mml:mrow>
1112                                                     <mml:mo mml:stretchy="true">{</mml:mo>
1113                                                     <mml:mtable>
1114                                                         <mml:mtr>
1115                                                             <mml:mrow>
1116                                                                 <mml:mrow>
1117                                                                     <mml:mi>i</mml:mi>
1118                                                                     <mml:mo mml:stretchy="false">=</mml:mo>
1119                                                                     <mml:mn>1</mml:mn>
1120                                                                 </mml:mrow>
1121                                                                 <mml:mi mml:fontstyle="normal">:</mml:mi>
1122                                                                 <mml:mi>N</mml:mi>
1123                                                             </mml:mrow>
1124                                                         </mml:mtr>
1125                                                         <mml:mtr>
1126                                                             <mml:mrow>
1127                                                                 <mml:mi>x</mml:mi>
1128                                                                 <mml:mo mml:stretchy="false">∈</mml:mo>
1129                                                                 <mml:mfenced mml:close="[" mml:open="]">
1130                                                                     <mml:mrow>
1131                                                                         <mml:msub>
1132                                                                             <mml:mi>x</mml:mi>
1133                                                                             <mml:mi>l</mml:mi>
1134                                                                         </mml:msub>
1135                                                                         <mml:mi>,</mml:mi>
1136                                                                         <mml:msub>
1137                                                                             <mml:mi>x</mml:mi>
1138                                                                             <mml:mi>u</mml:mi>
1139                                                                         </mml:msub>
1140                                                                     </mml:mrow>
1141                                                                 </mml:mfenced>
1142                                                             </mml:mrow>
1143                                                         </mml:mtr>
1144                                                     </mml:mtable>
1145                                                 </mml:mrow>
1146                                             </mml:mrow>
1147                                         </mml:mtr>
1148                                         <mml:mtr>
1149                                             <mml:mi/>
1150                                         </mml:mtr>
1151                                         <mml:mtr>
1152                                             <mml:mrow>
1153                                                 <mml:msub>
1154                                                     <mml:mi>g</mml:mi>
1155                                                     <mml:mi>j</mml:mi>
1156                                                 </mml:msub>
1157                                                 <mml:mrow>
1158                                                     <mml:mrow>
1159                                                         <mml:mo mml:stretchy="false">(</mml:mo>
1160                                                         <mml:mrow>
1161                                                             <mml:msub>
1162                                                                 <mml:mo mml:stretchy="false">ζ</mml:mo>
1163                                                                 <mml:mi>j</mml:mi>
1164                                                             </mml:msub>
1165                                                             <mml:mi>,</mml:mi>
1166                                                             <mml:mi>z</mml:mi>
1167                                                             <mml:mrow>
1168                                                                 <mml:mo mml:stretchy="false">(</mml:mo>
1169                                                                 <mml:mrow>
1170                                                                     <mml:mi>u</mml:mi>
1171                                                                     <mml:mrow>
1172                                                                         <mml:mo mml:stretchy="false">(</mml:mo>
1173                                                                         <mml:msub>
1174                                                                             <mml:mo mml:stretchy="false">ζ</mml:mo>
1175                                                                             <mml:mi>j</mml:mi>
1176                                                                         </mml:msub>
1177                                                                         <mml:mo mml:stretchy="false">)</mml:mo>
1178                                                                     </mml:mrow>
1179                                                                 </mml:mrow>
1180                                                                 <mml:mo mml:stretchy="false">)</mml:mo>
1181                                                             </mml:mrow>
1182                                                         </mml:mrow>
1183                                                         <mml:mo mml:stretchy="false">)</mml:mo>
1184                                                     </mml:mrow>
1185                                                     <mml:mo mml:stretchy="false">=</mml:mo>
1186                                                     <mml:mn>0</mml:mn>
1187                                                 </mml:mrow>
1188                                                 <mml:mi/>
1189                                                 <mml:mrow>
1190                                                     <mml:mtext>,</mml:mtext>
1191                                                     <mml:mi>j</mml:mi>
1192                                                     <mml:mo mml:stretchy="false">=</mml:mo>
1193                                                     <mml:mn>1</mml:mn>
1194                                                 </mml:mrow>
1195                                                 <mml:mi mml:fontstyle="normal">:</mml:mi>
1196                                                 <mml:mi>M</mml:mi>
1197                                             </mml:mrow>
1198                                         </mml:mtr>
1199                                     </mml:mtable>
1200                                 </mml:mrow>
1201                                 <mml:annotation mml:encoding="StarMath 5.0">left lbrace
1202                                     stack{u_i^(m_i)=f_i(x,z(u(x))) ~~left lbrace { binom{i=1:N}{x
1203                                     in left ] a_l, a_u right [} } right none# `#
1204                                     g_j(%zeta_j,z(u(%zeta_j))) = 0~~j=1:M} right
1205                                     none
1206                                 </mml:annotation>
1207                             </mml:semantics>
1208                         </mml:math>
1209                     </imagedata>
1210                 </imageobject>
1211             </mediaobject>
1212         </informalequation>
1213         <para>where</para>
1214         <mediaobject>
1215             <imageobject>
1216                 <imagedata align="left">
1217                     <mml:math>
1218                         <mml:semantics>
1219                             <mml:mrow>
1220                                 <mml:mo mml:stretchy="true">{</mml:mo>
1221                                 <mml:mtable>
1222                                     <mml:mtr>
1223                                         <mml:mrow>
1224                                             <mml:mi>M</mml:mi>
1225                                             <mml:mo mml:stretchy="false">=</mml:mo>
1226                                             <mml:mrow>
1227                                                 <mml:munderover>
1228                                                     <mml:mo mml:stretchy="false">∑</mml:mo>
1229                                                     <mml:mrow>
1230                                                         <mml:mi>i</mml:mi>
1231                                                         <mml:mo mml:stretchy="false">=</mml:mo>
1232                                                         <mml:mn>1</mml:mn>
1233                                                     </mml:mrow>
1234                                                     <mml:mi>N</mml:mi>
1235                                                 </mml:munderover>
1236                                                 <mml:msub>
1237                                                     <mml:mi>m</mml:mi>
1238                                                     <mml:mi>i</mml:mi>
1239                                                 </mml:msub>
1240                                             </mml:mrow>
1241                                         </mml:mrow>
1242                                     </mml:mtr>
1243                                     <mml:mtr>
1244                                         <mml:mi/>
1245                                     </mml:mtr>
1246                                     <mml:mtr>
1247                                         <mml:mrow>
1248                                             <mml:mi>z</mml:mi>
1249                                             <mml:mrow>
1250                                                 <mml:mrow>
1251                                                     <mml:mo mml:stretchy="false">(</mml:mo>
1252                                                     <mml:mrow>
1253                                                         <mml:mi>u</mml:mi>
1254                                                         <mml:mrow>
1255                                                             <mml:mo mml:stretchy="false">(</mml:mo>
1256                                                             <mml:mi>x</mml:mi>
1257                                                             <mml:mo mml:stretchy="false">)</mml:mo>
1258                                                         </mml:mrow>
1259                                                     </mml:mrow>
1260                                                     <mml:mo mml:stretchy="false">)</mml:mo>
1261                                                 </mml:mrow>
1262                                                 <mml:mo mml:stretchy="false">=</mml:mo>
1263                                                 <mml:mrow>
1264                                                     <mml:mo mml:stretchy="false">[</mml:mo>
1265                                                     <mml:mrow>
1266                                                         <mml:msub>
1267                                                             <mml:mi>u</mml:mi>
1268                                                             <mml:mn>1</mml:mn>
1269                                                         </mml:msub>
1270                                                         <mml:mrow>
1271                                                             <mml:mo mml:stretchy="false">(</mml:mo>
1272                                                             <mml:mi>x</mml:mi>
1273                                                             <mml:mo mml:stretchy="false">)</mml:mo>
1274                                                         </mml:mrow>
1275                                                         <mml:mi>;</mml:mi>
1276                                                         <mml:msubsup>
1277                                                             <mml:mi>u</mml:mi>
1278                                                             <mml:mn>1</mml:mn>
1279                                                             <mml:mn>1</mml:mn>
1280                                                         </mml:msubsup>
1281                                                         <mml:mrow>
1282                                                             <mml:mo mml:stretchy="false">(</mml:mo>
1283                                                             <mml:mi>x</mml:mi>
1284                                                             <mml:mo mml:stretchy="false">)</mml:mo>
1285                                                         </mml:mrow>
1286                                                         <mml:mi>;</mml:mi>
1287                                                         <mml:mo mml:stretchy="false">⋯</mml:mo>
1288                                                         <mml:msubsup>
1289                                                             <mml:mi>u</mml:mi>
1290                                                             <mml:mn>1</mml:mn>
1291                                                             <mml:mrow>
1292                                                                 <mml:mo mml:stretchy="false">(</mml:mo>
1293                                                                 <mml:mrow>
1294                                                                     <mml:msub>
1295                                                                         <mml:mi>m</mml:mi>
1296                                                                         <mml:mn>1</mml:mn>
1297                                                                     </mml:msub>
1298                                                                     <mml:mo mml:stretchy="false">−</mml:mo>
1299                                                                     <mml:mn>1</mml:mn>
1300                                                                 </mml:mrow>
1301                                                                 <mml:mo mml:stretchy="false">)</mml:mo>
1302                                                             </mml:mrow>
1303                                                         </mml:msubsup>
1304                                                         <mml:mrow>
1305                                                             <mml:mo mml:stretchy="false">(</mml:mo>
1306                                                             <mml:mi>x</mml:mi>
1307                                                             <mml:mo mml:stretchy="false">)</mml:mo>
1308                                                         </mml:mrow>
1309                                                         <mml:mi>;</mml:mi>
1310                                                         <mml:mi/>
1311                                                         <mml:mo mml:stretchy="false">⋯</mml:mo>
1312                                                         <mml:mi>;</mml:mi>
1313                                                         <mml:mi/>
1314                                                         <mml:msub>
1315                                                             <mml:mi>u</mml:mi>
1316                                                             <mml:mi>N</mml:mi>
1317                                                         </mml:msub>
1318                                                         <mml:mrow>
1319                                                             <mml:mo mml:stretchy="false">(</mml:mo>
1320                                                             <mml:mi>x</mml:mi>
1321                                                             <mml:mo mml:stretchy="false">)</mml:mo>
1322                                                         </mml:mrow>
1323                                                         <mml:mi>;</mml:mi>
1324                                                         <mml:msubsup>
1325                                                             <mml:mi>u</mml:mi>
1326                                                             <mml:mi>N</mml:mi>
1327                                                             <mml:mn>1</mml:mn>
1328                                                         </mml:msubsup>
1329                                                         <mml:mrow>
1330                                                             <mml:mo mml:stretchy="false">(</mml:mo>
1331                                                             <mml:mi>x</mml:mi>
1332                                                             <mml:mo mml:stretchy="false">)</mml:mo>
1333                                                         </mml:mrow>
1334                                                         <mml:mi>;</mml:mi>
1335                                                         <mml:mo mml:stretchy="false">⋯</mml:mo>
1336                                                         <mml:mi>;</mml:mi>
1337                                                         <mml:msubsup>
1338                                                             <mml:mi>u</mml:mi>
1339                                                             <mml:mi>N</mml:mi>
1340                                                             <mml:mrow>
1341                                                                 <mml:mo mml:stretchy="false">(</mml:mo>
1342                                                                 <mml:mrow>
1343                                                                     <mml:msub>
1344                                                                         <mml:mi>m</mml:mi>
1345                                                                         <mml:mi>N</mml:mi>
1346                                                                     </mml:msub>
1347                                                                     <mml:mo mml:stretchy="false">−</mml:mo>
1348                                                                     <mml:mn>1</mml:mn>
1349                                                                 </mml:mrow>
1350                                                                 <mml:mo mml:stretchy="false">)</mml:mo>
1351                                                             </mml:mrow>
1352                                                         </mml:msubsup>
1353                                                         <mml:mrow>
1354                                                             <mml:mo mml:stretchy="false">(</mml:mo>
1355                                                             <mml:mi>x</mml:mi>
1356                                                             <mml:mo mml:stretchy="false">)</mml:mo>
1357                                                         </mml:mrow>
1358                                                     </mml:mrow>
1359                                                     <mml:mo mml:stretchy="false">]</mml:mo>
1360                                                 </mml:mrow>
1361                                             </mml:mrow>
1362                                         </mml:mrow>
1363                                     </mml:mtr>
1364                                     <mml:mtr>
1365                                         <mml:mi/>
1366                                     </mml:mtr>
1367                                     <mml:mtr>
1368                                         <mml:mrow>
1369                                             <mml:mrow>
1370                                                 <mml:mrow>
1371                                                     <mml:mrow>
1372                                                         <mml:msub>
1373                                                             <mml:mi>x</mml:mi>
1374                                                             <mml:mi>l</mml:mi>
1375                                                         </mml:msub>
1376                                                         <mml:mo mml:stretchy="false">≤</mml:mo>
1377                                                         <mml:msub>
1378                                                             <mml:mo mml:stretchy="false">ζ</mml:mo>
1379                                                             <mml:mn>1</mml:mn>
1380                                                         </mml:msub>
1381                                                     </mml:mrow>
1382                                                     <mml:mo mml:stretchy="false">≤</mml:mo>
1383                                                     <mml:mo mml:stretchy="false">⋯</mml:mo>
1384                                                 </mml:mrow>
1385                                                 <mml:mo mml:stretchy="false">≤</mml:mo>
1386                                                 <mml:msub>
1387                                                     <mml:mo mml:stretchy="false">ζ</mml:mo>
1388                                                     <mml:mi>M</mml:mi>
1389                                                 </mml:msub>
1390                                             </mml:mrow>
1391                                             <mml:mo mml:stretchy="false">≤</mml:mo>
1392                                             <mml:msub>
1393                                                 <mml:mi>x</mml:mi>
1394                                                 <mml:mi>u</mml:mi>
1395                                             </mml:msub>
1396                                         </mml:mrow>
1397                                     </mml:mtr>
1398                                 </mml:mtable>
1399                             </mml:mrow>
1400                             <mml:annotation mml:encoding="StarMath 5.0">left lbrace stack
1401                                 { M= sum from {i=1} to {N} m_i # ~# z(u(x)) =
1402                                 [u_1(x);u_1^{1}(x);dotsaxis u_1^(m_1-1)(x);~ dotsaxis;
1403                                 ~u_N(x);u_N^{1}(x);dotsaxis; u_N^(m_N-1)(x)]# ~# x_l &lt;=
1404                                 %zeta_1 &lt;= dotsaxis &lt;= %zeta_M &lt;=x_u}right
1405                                 none
1406                             </mml:annotation>
1407                         </mml:semantics>
1408                     </mml:math>
1409                 </imagedata>
1410             </imageobject>
1411         </mediaobject>
1412         <para>
1413             The argument <literal>zu</literal> used by the external functions
1414             and returned by <literal>bvode</literal> is the column vector formed by
1415             the components of <literal>z(u(x))</literal> for a given <literal>x</literal>.
1416         </para>
1417         <para>
1418             The method used to approximate the solution <literal>u</literal> is collocation at
1419             gaussian points, requiring <literal>m(i)-1</literal> continuous derivatives in the <literal>i</literal>-th
1420             component, <literal>i = 1:N</literal>. here, <literal>k</literal> is the number of collocation points (stages)
1421             per subinterval and is chosen such that <literal>k .ge. max m(i)</literal>. a
1422             runge-kutta-monomial solution representation is utilized.
1423         </para>
1424     </refsection>
1425     <refsection>
1426         <title>Examples</title>
1427         <para>The first two problems below are taken from the paper [1] of the
1428             Bibliography.
1429         </para>
1430         <itemizedlist>
1431             <listitem>
1432                 <para>
1433                     <emphasis role="bold">The problem 1</emphasis> describes a
1434                     uniformy loaded beam of variable stifness, simply supported at both
1435                     end.
1436                 </para>
1437                 <para>It may be defined as follow :</para>
1438                 <para>Solve the fourth order differential equation:</para>
1439                 <mediaobject>
1440                     <imageobject>
1441                         <imagedata align="left">
1442                             <mml:math>
1443                                 <mml:semantics>
1444                                     <mml:mrow>
1445                                         <mml:mfrac>
1446                                             <mml:msup>
1447                                                 <mml:mi>d</mml:mi>
1448                                                 <mml:mn>4</mml:mn>
1449                                             </mml:msup>
1450                                             <mml:mrow>
1451                                                 <mml:mi>d</mml:mi>
1452                                                 <mml:msup>
1453                                                     <mml:mi>x</mml:mi>
1454                                                     <mml:mn>4</mml:mn>
1455                                                 </mml:msup>
1456                                             </mml:mrow>
1457                                         </mml:mfrac>
1458                                         <mml:mi>u</mml:mi>
1459                                         <mml:mrow>
1460                                             <mml:mrow>
1461                                                 <mml:mo mml:stretchy="false">(</mml:mo>
1462                                                 <mml:mi>x</mml:mi>
1463                                                 <mml:mo mml:stretchy="false">)</mml:mo>
1464                                             </mml:mrow>
1465                                             <mml:mo mml:stretchy="false">=</mml:mo>
1466                                             <mml:mfrac>
1467                                                 <mml:mrow>
1468                                                     <mml:mrow>
1469                                                         <mml:mn>1</mml:mn>
1470                                                         <mml:mo mml:stretchy="false">−</mml:mo>
1471                                                         <mml:mrow>
1472                                                             <mml:mrow>
1473                                                                 <mml:mn>6</mml:mn>
1474                                                                 <mml:mo mml:stretchy="false">.</mml:mo>
1475                                                                 <mml:msup>
1476                                                                     <mml:mi>x</mml:mi>
1477                                                                     <mml:mn>2</mml:mn>
1478                                                                 </mml:msup>
1479                                                             </mml:mrow>
1480                                                             <mml:mo mml:stretchy="false">.</mml:mo>
1481                                                             <mml:mfrac>
1482                                                                 <mml:msup>
1483                                                                     <mml:mi>d</mml:mi>
1484                                                                     <mml:mn>3</mml:mn>
1485                                                                 </mml:msup>
1486                                                                 <mml:mrow>
1487                                                                     <mml:mi>d</mml:mi>
1488                                                                     <mml:msup>
1489                                                                         <mml:mi>x</mml:mi>
1490                                                                         <mml:mn>3</mml:mn>
1491                                                                     </mml:msup>
1492                                                                 </mml:mrow>
1493                                                             </mml:mfrac>
1494                                                         </mml:mrow>
1495                                                     </mml:mrow>
1496                                                     <mml:mi>u</mml:mi>
1497                                                     <mml:mrow>
1498                                                         <mml:mrow>
1499                                                             <mml:mo mml:stretchy="false">(</mml:mo>
1500                                                             <mml:mi>x</mml:mi>
1501                                                             <mml:mo mml:stretchy="false">)</mml:mo>
1502                                                         </mml:mrow>
1503                                                         <mml:mo mml:stretchy="false">−</mml:mo>
1504                                                         <mml:mrow>
1505                                                             <mml:mrow>
1506                                                                 <mml:mn>6</mml:mn>
1507                                                                 <mml:mo mml:stretchy="false">.</mml:mo>
1508                                                                 <mml:mi>x</mml:mi>
1509                                                             </mml:mrow>
1510                                                             <mml:mo mml:stretchy="false">.</mml:mo>
1511                                                             <mml:mfrac>
1512                                                                 <mml:msup>
1513                                                                     <mml:mi>d</mml:mi>
1514                                                                     <mml:mn>2</mml:mn>
1515                                                                 </mml:msup>
1516                                                                 <mml:mrow>
1517                                                                     <mml:mi>d</mml:mi>
1518                                                                     <mml:msup>
1519                                                                         <mml:mi>x</mml:mi>
1520                                                                         <mml:mn>2</mml:mn>
1521                                                                     </mml:msup>
1522                                                                 </mml:mrow>
1523                                                             </mml:mfrac>
1524                                                         </mml:mrow>
1525                                                     </mml:mrow>
1526                                                     <mml:mi>u</mml:mi>
1527                                                     <mml:mrow>
1528                                                         <mml:mo mml:stretchy="false">(</mml:mo>
1529                                                         <mml:mi>x</mml:mi>
1530                                                         <mml:mo mml:stretchy="false">)</mml:mo>
1531                                                     </mml:mrow>
1532                                                 </mml:mrow>
1533                                                 <mml:msup>
1534                                                     <mml:mi>x</mml:mi>
1535                                                     <mml:mn>3</mml:mn>
1536                                                 </mml:msup>
1537                                             </mml:mfrac>
1538                                         </mml:mrow>
1539                                     </mml:mrow>
1540                                     <mml:annotation mml:encoding="StarMath 5.0">d^4 over {d
1541                                         x^4} u(x)={1 -6*x^2*{{d^3} over {d x^3}} u(x)-6*x*{{d^2}
1542                                         over {d x^2}} u(x)} over x^3
1543                                     </mml:annotation>
1544                                 </mml:semantics>
1545                             </mml:math>
1546                         </imagedata>
1547                     </imageobject>
1548                 </mediaobject>
1549                 <para>Subjected to the boundary conditions:</para>
1550                 <mediaobject>
1551                     <imageobject>
1552                         <imagedata align="left">
1553                             <mml:math>
1554                                 <mml:semantics>
1555                                     <mml:mrow>
1556                                         <mml:mo mml:stretchy="true">{</mml:mo>
1557                                         <mml:mtable>
1558                                             <mml:mtr>
1559                                                 <mml:mrow>
1560                                                     <mml:mi>u</mml:mi>
1561                                                     <mml:mrow>
1562                                                         <mml:mrow>
1563                                                             <mml:mo mml:stretchy="false">(</mml:mo>
1564                                                             <mml:mn>1</mml:mn>
1565                                                             <mml:mo mml:stretchy="false">)</mml:mo>
1566                                                         </mml:mrow>
1567                                                         <mml:mo mml:stretchy="false">=</mml:mo>
1568                                                         <mml:mn>0</mml:mn>
1569                                                     </mml:mrow>
1570                                                 </mml:mrow>
1571                                             </mml:mtr>
1572                                             <mml:mtr>
1573                                                 <mml:mrow>
1574                                                     <mml:mfrac>
1575                                                         <mml:msup>
1576                                                             <mml:mi>d</mml:mi>
1577                                                             <mml:mn>2</mml:mn>
1578                                                         </mml:msup>
1579                                                         <mml:mrow>
1580                                                             <mml:mi>d</mml:mi>
1581                                                             <mml:msup>
1582                                                                 <mml:mi>x</mml:mi>
1583                                                                 <mml:mn>2</mml:mn>
1584                                                             </mml:msup>
1585                                                         </mml:mrow>
1586                                                     </mml:mfrac>
1587                                                     <mml:mi>u</mml:mi>
1588                                                     <mml:mrow>
1589                                                         <mml:mo mml:stretchy="false">(</mml:mo>
1590                                                         <mml:mi>x</mml:mi>
1591                                                         <mml:mo mml:stretchy="false">)</mml:mo>
1592                                                     </mml:mrow>
1593                                                     <mml:mrow>
1594                                                         <mml:mrow>
1595                                                             <mml:mo mml:stretchy="false">(</mml:mo>
1596                                                             <mml:mn>1</mml:mn>
1597                                                             <mml:mo mml:stretchy="false">)</mml:mo>
1598                                                         </mml:mrow>
1599                                                         <mml:mo mml:stretchy="false">=</mml:mo>
1600                                                         <mml:mn>0</mml:mn>
1601                                                     </mml:mrow>
1602                                                 </mml:mrow>
1603                                             </mml:mtr>
1604                                             <mml:mtr>
1605                                                 <mml:mrow>
1606                                                     <mml:mi>u</mml:mi>
1607                                                     <mml:mrow>
1608                                                         <mml:mrow>
1609                                                             <mml:mo mml:stretchy="false">(</mml:mo>
1610                                                             <mml:mn>2</mml:mn>
1611                                                             <mml:mo mml:stretchy="false">)</mml:mo>
1612                                                         </mml:mrow>
1613                                                         <mml:mo mml:stretchy="false">=</mml:mo>
1614                                                         <mml:mn>0</mml:mn>
1615                                                     </mml:mrow>
1616                                                 </mml:mrow>
1617                                             </mml:mtr>
1618                                             <mml:mtr>
1619                                                 <mml:mrow>
1620                                                     <mml:mfrac>
1621                                                         <mml:msup>
1622                                                             <mml:mi>d</mml:mi>
1623                                                             <mml:mn>2</mml:mn>
1624                                                         </mml:msup>
1625                                                         <mml:mrow>
1626                                                             <mml:mi>d</mml:mi>
1627                                                             <mml:msup>
1628                                                                 <mml:mi>x</mml:mi>
1629                                                                 <mml:mn>2</mml:mn>
1630                                                             </mml:msup>
1631                                                         </mml:mrow>
1632                                                     </mml:mfrac>
1633                                                     <mml:mi>u</mml:mi>
1634                                                     <mml:mrow>
1635                                                         <mml:mo mml:stretchy="false">(</mml:mo>
1636                                                         <mml:mi>x</mml:mi>
1637                                                         <mml:mo mml:stretchy="false">)</mml:mo>
1638                                                     </mml:mrow>
1639                                                     <mml:mrow>
1640                                                         <mml:mrow>
1641                                                             <mml:mo mml:stretchy="false">(</mml:mo>
1642                                                             <mml:mn>2</mml:mn>
1643                                                             <mml:mo mml:stretchy="false">)</mml:mo>
1644                                                         </mml:mrow>
1645                                                         <mml:mo mml:stretchy="false">=</mml:mo>
1646                                                         <mml:mn>0</mml:mn>
1647                                                     </mml:mrow>
1648                                                 </mml:mrow>
1649                                             </mml:mtr>
1650                                         </mml:mtable>
1651                                     </mml:mrow>
1652                                     <mml:annotation mml:encoding="StarMath 5.0">left lbrace
1653                                         stack{ u(1)=0# {{d^2} over {d x^2}} u(x)(1)=0# u(2)=0#
1654                                         {{d^2} over {d x^2}} u(x)(2)=0} right
1655                                         none
1656                                     </mml:annotation>
1657                                 </mml:semantics>
1658                             </mml:math>
1659                         </imagedata>
1660                     </imageobject>
1661                 </mediaobject>
1662                 <para>The exact solution of this problem is known to be:</para>
1663                 <mediaobject>
1664                     <imageobject>
1665                         <imagedata align="left">
1666                             <mml:math>
1667                                 <mml:semantics>
1668                                     <mml:mrow>
1669                                         <mml:mi>u</mml:mi>
1670                                         <mml:mrow>
1671                                             <mml:mrow>
1672                                                 <mml:mo mml:stretchy="false">(</mml:mo>
1673                                                 <mml:mi>x</mml:mi>
1674                                                 <mml:mo mml:stretchy="false">)</mml:mo>
1675                                             </mml:mrow>
1676                                             <mml:mo mml:stretchy="false">=</mml:mo>
1677                                             <mml:mfrac>
1678                                                 <mml:mn>1</mml:mn>
1679                                                 <mml:mn>4</mml:mn>
1680                                             </mml:mfrac>
1681                                         </mml:mrow>
1682                                         <mml:mrow>
1683                                             <mml:mo mml:stretchy="false">(</mml:mo>
1684                                             <mml:mrow>
1685                                                 <mml:mn>10</mml:mn>
1686                                                 <mml:mi/>
1687                                                 <mml:mi>log</mml:mi>
1688                                                 <mml:mrow>
1689                                                     <mml:mrow>
1690                                                         <mml:mo mml:stretchy="false">(</mml:mo>
1691                                                         <mml:mn>2</mml:mn>
1692                                                         <mml:mo mml:stretchy="false">)</mml:mo>
1693                                                     </mml:mrow>
1694                                                     <mml:mo mml:stretchy="false">−</mml:mo>
1695                                                     <mml:mn>3</mml:mn>
1696                                                 </mml:mrow>
1697                                             </mml:mrow>
1698                                             <mml:mo mml:stretchy="false">)</mml:mo>
1699                                         </mml:mrow>
1700                                         <mml:mi/>
1701                                         <mml:mrow>
1702                                             <mml:mrow>
1703                                                 <mml:mo mml:stretchy="false">(</mml:mo>
1704                                                 <mml:mrow>
1705                                                     <mml:mn>1</mml:mn>
1706                                                     <mml:mo mml:stretchy="false">−</mml:mo>
1707                                                     <mml:mi>x</mml:mi>
1708                                                 </mml:mrow>
1709                                                 <mml:mo mml:stretchy="false">)</mml:mo>
1710                                             </mml:mrow>
1711                                             <mml:mo mml:stretchy="false">+</mml:mo>
1712                                             <mml:mfrac>
1713                                                 <mml:mn>1</mml:mn>
1714                                                 <mml:mn>2</mml:mn>
1715                                             </mml:mfrac>
1716                                         </mml:mrow>
1717                                         <mml:mrow>
1718                                             <mml:mo mml:stretchy="false">[</mml:mo>
1719                                             <mml:mrow>
1720                                                 <mml:mfrac>
1721                                                     <mml:mn>1</mml:mn>
1722                                                     <mml:mi>x</mml:mi>
1723                                                 </mml:mfrac>
1724                                                 <mml:mo mml:stretchy="false">+</mml:mo>
1725                                                 <mml:mrow>
1726                                                     <mml:mrow>
1727                                                         <mml:mo mml:stretchy="false">(</mml:mo>
1728                                                         <mml:mrow>
1729                                                             <mml:mn>3</mml:mn>
1730                                                             <mml:mo mml:stretchy="false">+</mml:mo>
1731                                                             <mml:mi>x</mml:mi>
1732                                                         </mml:mrow>
1733                                                         <mml:mo mml:stretchy="false">)</mml:mo>
1734                                                     </mml:mrow>
1735                                                     <mml:mi/>
1736                                                     <mml:mi>log</mml:mi>
1737                                                     <mml:mrow>
1738                                                         <mml:mrow>
1739                                                             <mml:mo mml:stretchy="false">(</mml:mo>
1740                                                             <mml:mi>x</mml:mi>
1741                                                             <mml:mo mml:stretchy="false">)</mml:mo>
1742                                                         </mml:mrow>
1743                                                         <mml:mo mml:stretchy="false">−</mml:mo>
1744                                                         <mml:mi>x</mml:mi>
1745                                                     </mml:mrow>
1746                                                 </mml:mrow>
1747                                             </mml:mrow>
1748                                             <mml:mo mml:stretchy="false">]</mml:mo>
1749                                         </mml:mrow>
1750                                     </mml:mrow>
1751                                     <mml:annotation mml:encoding="StarMath 5.0">u(x)=1 over 4
1752                                         (10`log(2)-3)`(1-x)+ {1 over 2} [ {1 over x} + {(3+x) `
1753                                         log(x)-x}]
1754                                     </mml:annotation>
1755                                 </mml:semantics>
1756                             </mml:math>
1757                         </imagedata>
1758                     </imageobject>
1759                 </mediaobject>
1760                 <programlisting role="example"><![CDATA[ 
1761 N=1;// just one differential equation
1762 m=4;//a fourth order  differential equation
1763 M=sum(m);
1764
1765 x_low=1;
1766 x_up=2; // the x limits
1767 zeta=[x_low,x_low,x_up,x_up]; //two constraints (on the value of u and its second derivative) on each bound.
1768
1769 //The external functions
1770 //These functions are called by the solver with zu=[u(x);u'(x);u''(x);u'''(x)]
1771
1772 // - The function which computes the right hand side of the differential equation
1773 function f=fsub(x,zu)
1774     f=(1-6*x^2*zu(4)-6*x*zu(3))/x^3
1775 endfunction
1776
1777 // - The function which computes the derivative of fsub with respect to zu
1778 function df=dfsub(x,zu)
1779     df=[0,0,-6/x^2,-6/x]
1780 endfunction
1781
1782 // - The function which computes the ith constraint for a given i
1783 function g=gsub(i,zu),
1784   select i
1785   case 1 then  //x=zeta(1)=1
1786     g=zu(1) //u(1)=0
1787   case 2 then //x=zeta(2)=1
1788     g=zu(3) //u''(1)=0
1789   case 3 then //x=zeta(3)=2
1790     g=zu(1) //u(2)=0
1791   case 4 then  //x=zeta(4)=2
1792     g=zu(3) //u''(2)=0
1793   end
1794 endfunction
1795
1796 // - The function which computes the derivative of gsub with respect to z
1797 function dg=dgsub(i,z)
1798   select i
1799   case 1 then  //x=zeta(1)=1
1800     dg=[1,0,0,0]
1801   case 2 then //x=zeta(2)=1
1802     dg=[0,0,1,0]
1803   case 3 then //x=zeta(3)=2
1804      dg=[1,0,0,0]
1805   case 4 then  //x=zeta(4)=2
1806     dg=[0,0,1,0]
1807   end
1808 endfunction
1809
1810 // - The function which computes the initial guess, unused here
1811 function [zu,mpar]=guess(x)
1812     zu=0;
1813     mpar=0;
1814 endfunction
1815
1816  //define the function which computes the exact value of u for a given x ( for testing purposes)
1817 function zu=trusol(x)
1818   zu=0*ones(4,1)
1819   zu(1) =  0.25*(10*log(2)-3)*(1-x) + 0.5 *( 1/x   + (3+x)*log(x) - x)
1820   zu(2) = -0.25*(10*log(2)-3)       + 0.5 *(-1/x^2 + (3+x)/x      + log(x) - 1)
1821   zu(3) = 0.5*( 2/x^3 + 1/x   - 3/x^2)
1822   zu(4) = 0.5*(-6/x^4 - 1/x/x + 6/x^3)
1823 endfunction
1824
1825 fixpnt=[ ];//All boundary conditions are located at x_low and x_up
1826
1827 //    nonlin  collpnt n ntol ndimf  ndimi iprint iread iguess rstart nfxpnt
1828 ipar=[0       0       1 2    2000   200   1      0     0      0      0     ]
1829
1830 ltol=[1,3];//set tolerance control on zu(1) and zu(3)
1831 tol=[1.e-11,1.e-11];//set tolreance values for these two controls
1832 xpoints=x_low:0.01:x_up;
1833
1834 zu=bvode(xpoints,N,m,x_low,x_up,zeta,ipar,ltol,tol,fixpnt,...
1835         fsub,dfsub,gsub,dgsub,guess)
1836 //check the constraints
1837 zu([1,3],[1 $]) //should be zero
1838 plot(xpoints,zu(1,:)) // the evolution of the solution u
1839 zu1=[];
1840 for x=xpoints
1841     zu1=[zu1,trusol(x)];
1842 end;
1843 norm(zu-zu1)
1844  ]]></programlisting>
1845             </listitem>
1846             <listitem>
1847                 <para>
1848                     Same problem using <literal>bvodeS</literal> and an initial guess.
1849                 </para>
1850                 <programlisting role="no-scilab-exec"><![CDATA[
1851 function [z,lhS]=zstart(x)
1852   z=zeros(5,1);z(5)=1;
1853   lhS=[0;1];
1854 endfunction
1855 zu=bvode(xpoints,N,m,x_low,x_up,zeta,ltol=ltol,tol=tol,guess=zstart)
1856  ]]></programlisting>
1857             </listitem>
1858             <listitem>
1859                 <para>
1860                     <emphasis role="bold">The problem 2</emphasis> describes the
1861                     small finite deformation of a thin shallow spherical cap of constant
1862                     thickness subject to a quadratically varying axisymmetric external
1863                     pressure distribution. Here <latex>$\varphi$</latex> is the meridian angle change of the
1864                     deformed shell and <latex>$\psi$</latex> is a stress function. For <latex>$\varepsilon=\mu=10^{-3}$</latex> two
1865                     different solutions may found depending on the starting point
1866                 </para>
1867                 <mediaobject>
1868                     <imageobject>
1869                         <imagedata align="left">
1870                             <mml:math>
1871                                 <mml:semantics>
1872                                     <mml:mrow>
1873                                         <mml:mo mml:stretchy="true">{</mml:mo>
1874                                         <mml:mtable>
1875                                             <mml:mtr>
1876                                                 <mml:mrow>
1877                                                     <mml:mfrac>
1878                                                         <mml:msup>
1879                                                             <mml:mo mml:stretchy="false">ε</mml:mo>
1880                                                             <mml:mn>4</mml:mn>
1881                                                         </mml:msup>
1882                                                         <mml:mo mml:stretchy="false">μ</mml:mo>
1883                                                     </mml:mfrac>
1884                                                     <mml:mrow>
1885                                                         <mml:mrow>
1886                                                             <mml:mo mml:stretchy="false">(</mml:mo>
1887                                                             <mml:mrow>
1888                                                                 <mml:mo mml:stretchy="false">φ</mml:mo>
1889                                                                 <mml:mi>'</mml:mi>
1890                                                                 <mml:mrow>
1891                                                                     <mml:mrow>
1892                                                                         <mml:mi>'</mml:mi>
1893                                                                         <mml:mo mml:stretchy="false">+</mml:mo>
1894                                                                         <mml:mfrac>
1895                                                                             <mml:mrow>
1896                                                                                 <mml:mo mml:stretchy="false">φ</mml:mo>
1897                                                                                 <mml:mi>'</mml:mi>
1898                                                                             </mml:mrow>
1899                                                                             <mml:mi>x</mml:mi>
1900                                                                         </mml:mfrac>
1901                                                                     </mml:mrow>
1902                                                                     <mml:mo mml:stretchy="false">−</mml:mo>
1903                                                                     <mml:mfrac>
1904                                                                         <mml:mo mml:stretchy="false">φ</mml:mo>
1905                                                                         <mml:msup>
1906                                                                             <mml:mi>x</mml:mi>
1907                                                                             <mml:mn>2</mml:mn>
1908                                                                         </mml:msup>
1909                                                                     </mml:mfrac>
1910                                                                 </mml:mrow>
1911                                                             </mml:mrow>
1912                                                             <mml:mo mml:stretchy="false">)</mml:mo>
1913                                                         </mml:mrow>
1914                                                         <mml:mo mml:stretchy="false">+</mml:mo>
1915                                                         <mml:mo mml:stretchy="false">ψ</mml:mo>
1916                                                     </mml:mrow>
1917                                                     <mml:mrow>
1918                                                         <mml:mrow>
1919                                                             <mml:mrow>
1920                                                                 <mml:mo mml:stretchy="false">(</mml:mo>
1921                                                                 <mml:mrow>
1922                                                                     <mml:mn>1</mml:mn>
1923                                                                     <mml:mo mml:stretchy="false">−</mml:mo>
1924                                                                     <mml:mfrac>
1925                                                                         <mml:mo mml:stretchy="false">φ</mml:mo>
1926                                                                         <mml:mi>x</mml:mi>
1927                                                                     </mml:mfrac>
1928                                                                 </mml:mrow>
1929                                                                 <mml:mo mml:stretchy="false">)</mml:mo>
1930                                                             </mml:mrow>
1931                                                             <mml:mo mml:stretchy="false">−</mml:mo>
1932                                                             <mml:mo mml:stretchy="false">φ</mml:mo>
1933                                                         </mml:mrow>
1934                                                         <mml:mo mml:stretchy="false">+</mml:mo>
1935                                                         <mml:mo mml:stretchy="false">γ</mml:mo>
1936                                                     </mml:mrow>
1937                                                     <mml:mi>x</mml:mi>
1938                                                     <mml:mrow>
1939                                                         <mml:mrow>
1940                                                             <mml:mo mml:stretchy="false">(</mml:mo>
1941                                                             <mml:mrow>
1942                                                                 <mml:mn>1</mml:mn>
1943                                                                 <mml:mo mml:stretchy="false">−</mml:mo>
1944                                                                 <mml:mfrac>
1945                                                                     <mml:msup>
1946                                                                         <mml:mi>x</mml:mi>
1947                                                                         <mml:mn>2</mml:mn>
1948                                                                     </mml:msup>
1949                                                                     <mml:mn>2</mml:mn>
1950                                                                 </mml:mfrac>
1951                                                             </mml:mrow>
1952                                                             <mml:mo mml:stretchy="false">)</mml:mo>
1953                                                         </mml:mrow>
1954                                                         <mml:mo mml:stretchy="false">=</mml:mo>
1955                                                         <mml:mn>0</mml:mn>
1956                                                     </mml:mrow>
1957                                                 </mml:mrow>
1958                                             </mml:mtr>
1959                                             <mml:mtr>
1960                                                 <mml:mrow>
1961                                                     <mml:mo mml:stretchy="false">μ</mml:mo>
1962                                                     <mml:mrow>
1963                                                         <mml:mrow>
1964                                                             <mml:mo mml:stretchy="false">(</mml:mo>
1965                                                             <mml:mrow>
1966                                                                 <mml:mo mml:stretchy="false">ψ</mml:mo>
1967                                                                 <mml:mi>'</mml:mi>
1968                                                                 <mml:mrow>
1969                                                                     <mml:mrow>
1970                                                                         <mml:mi>'</mml:mi>
1971                                                                         <mml:mo mml:stretchy="false">+</mml:mo>
1972                                                                         <mml:mfrac>
1973                                                                             <mml:mrow>
1974                                                                                 <mml:mo mml:stretchy="false">ψ</mml:mo>
1975                                                                                 <mml:mi>'</mml:mi>
1976                                                                             </mml:mrow>
1977                                                                             <mml:mi>x</mml:mi>
1978                                                                         </mml:mfrac>
1979                                                                     </mml:mrow>
1980                                                                     <mml:mo mml:stretchy="false">−</mml:mo>
1981                                                                     <mml:mfrac>
1982                                                                         <mml:mo mml:stretchy="false">ψ</mml:mo>
1983                                                                         <mml:msup>
1984                                                                             <mml:mi>x</mml:mi>
1985                                                                             <mml:mn>2</mml:mn>
1986                                                                         </mml:msup>
1987                                                                     </mml:mfrac>
1988                                                                 </mml:mrow>
1989                                                             </mml:mrow>
1990                                                             <mml:mo mml:stretchy="false">)</mml:mo>
1991                                                         </mml:mrow>
1992                                                         <mml:mo mml:stretchy="false">−</mml:mo>
1993                                                         <mml:mo mml:stretchy="false">φ</mml:mo>
1994                                                     </mml:mrow>
1995                                                     <mml:mrow>
1996                                                         <mml:mrow>
1997                                                             <mml:mo mml:stretchy="false">(</mml:mo>
1998                                                             <mml:mrow>
1999                                                                 <mml:mn>1</mml:mn>
2000                                                                 <mml:mo mml:stretchy="false">−</mml:mo>
2001                                                                 <mml:mfrac>
2002                                                                     <mml:mo mml:stretchy="false">φ</mml:mo>
2003                                                                     <mml:mn>2x</mml:mn>
2004                                                                 </mml:mfrac>
2005                                                             </mml:mrow>
2006                                                             <mml:mo mml:stretchy="false">)</mml:mo>
2007                                                         </mml:mrow>
2008                                                         <mml:mo mml:stretchy="false">=</mml:mo>
2009                                                         <mml:mn>0</mml:mn>
2010                                                     </mml:mrow>
2011                                                 </mml:mrow>
2012                                             </mml:mtr>
2013                                             <mml:mtr>
2014                                                 <mml:mrow>
2015                                                     <mml:mrow>
2016                                                         <mml:mn>0</mml:mn>
2017                                                         <mml:mo mml:stretchy="false">&lt;</mml:mo>
2018                                                         <mml:mi>x</mml:mi>
2019                                                     </mml:mrow>
2020                                                     <mml:mo mml:stretchy="false">&lt;</mml:mo>
2021                                                     <mml:mn>1</mml:mn>
2022                                                 </mml:mrow>
2023                                             </mml:mtr>
2024                                         </mml:mtable>
2025                                     </mml:mrow>
2026                                     <mml:annotation mml:encoding="StarMath 5.0">left lbrace
2027                                         stack{{%epsilon^4} over %mu (%phi''+ {%phi'} over x
2028                                         -{%phi} over {x^2} ) +%psi (1- %phi over x ) -%phi+%gamma
2029                                         x(1-{x^2} over 2)=0# %mu(%psi''+{%psi'} over x-%psi over
2030                                         {x^2})-%phi(1-%phi over{2x})=0 # 0&lt;x&lt;1} right
2031                                         none
2032                                     </mml:annotation>
2033                                 </mml:semantics>
2034                             </mml:math>
2035                         </imagedata>
2036                     </imageobject>
2037                 </mediaobject>
2038                 <para>Subject to the boundary conditions</para>
2039                 <mediaobject>
2040                     <imageobject>
2041                         <imagedata align="left">
2042                             <mml:math>
2043                                 <mml:semantics>
2044                                     <mml:mrow>
2045                                         <mml:mo mml:stretchy="true">{</mml:mo>
2046                                         <mml:mtable>
2047                                             <mml:mtr>
2048                                                 <mml:mrow>
2049                                                     <mml:mo mml:stretchy="false">φ</mml:mo>
2050                                                     <mml:mo mml:stretchy="false">=</mml:mo>
2051                                                     <mml:mn>0</mml:mn>
2052                                                 </mml:mrow>
2053                                             </mml:mtr>
2054                                             <mml:mtr>
2055                                                 <mml:mrow>
2056                                                     <mml:mi>x</mml:mi>
2057                                                     <mml:mi/>
2058                                                     <mml:mo mml:stretchy="false">ψ</mml:mo>
2059                                                     <mml:mrow>
2060                                                         <mml:mi>'</mml:mi>
2061                                                         <mml:mo mml:stretchy="false">−</mml:mo>
2062                                                         <mml:mn>0.3</mml:mn>
2063                                                     </mml:mrow>
2064                                                     <mml:mrow>
2065                                                         <mml:mrow>
2066                                                             <mml:mo mml:stretchy="false">ψ</mml:mo>
2067                                                             <mml:mo mml:stretchy="false">+</mml:mo>
2068                                                             <mml:mn>0.7x</mml:mn>
2069                                                         </mml:mrow>
2070                                                         <mml:mo mml:stretchy="false">=</mml:mo>
2071                                                         <mml:mn>0</mml:mn>
2072                                                     </mml:mrow>
2073                                                 </mml:mrow>
2074                                             </mml:mtr>
2075                                         </mml:mtable>
2076                                     </mml:mrow>
2077                                     <mml:annotation mml:encoding="StarMath 5.0">left lbrace
2078                                         stack{ %phi=0# x`%psi'-0.3%psi+0.7x=0} right
2079                                         none
2080                                     </mml:annotation>
2081                                 </mml:semantics>
2082                             </mml:math>
2083                         </imagedata>
2084                     </imageobject>
2085                 </mediaobject>
2086                 <para>
2087                     for <literal>x=0</literal> and <literal>x=1</literal>
2088                 </para>
2089                 <programlisting role="example"><![CDATA[ 
2090 N=2;// two differential equations
2091 m=[2 2];//each differential equation is of second  order
2092 M=sum(m);
2093
2094 x_low=0;x_up=1; // the x limits
2095 zeta=[x_low,x_low, x_up x_up]; //two  constraints on each bound.
2096
2097 //The external functions
2098 //These functions are called by the solver with zu=[u1(x);u1'(x);u2(x);u2'(x)]
2099
2100 // - The function which computes the right hand side of the differential equation
2101 function f=fsub2(x,zu,eps,dmu,eps4mu,gam,xt),
2102    f=[zu(1)/x^2-zu(2)/x+(zu(1)-zu(3)*(1-zu(1)/x)-gam*x*(1-x^2/2))/eps4mu //phi''
2103       zu(3)/x^2-zu(4)/x+zu(1)*(1-zu(1)/(2*x))/dmu];//psi''
2104 endfunction
2105
2106 // - The function which computes the derivative of fsub with respect to zu
2107 function df=dfsub2(x,zu,eps,dmu,eps4mu,gam,xt),
2108   df=[1/x^2+(1+zu(3)/x)/eps4mu, -1/x, -(1-zu(1)/x)/eps4mu, 0
2109       (1-zu(1)/x)/dmu             0    1/x^2              -1/x];
2110 endfunction
2111
2112 // - The function which computes the ith constraint for a given i
2113 function g=gsub2(i,zu),
2114   select i
2115   case 1 then  //x=zeta(1)=0
2116     g=zu(1) //u(0)=0
2117   case 2 then //x=zeta(2)=0
2118     g=-0.3*zu(3) //x*psi'-0.3*psi+0.7x=0
2119   case 3 then //x=zeta(3)=1
2120     g=zu(1) //u(1)=0
2121   case 4 then  //x=zeta(4)=1
2122     g=1*zu(4)-0.3*zu(3)+0.7*1 //x*psi'-0.3*psi+0.7x=0
2123   end
2124 endfunction
2125
2126 // - The function which computes the derivative of gsub with respect to z
2127 function dg=dgsub2(i,z)
2128   select i
2129   case 1 then  //x=zeta(1)=1
2130     dg=[1,0,0,0]
2131   case 2 then //x=zeta(2)=1
2132     dg=[0,0,-0.3,0]
2133   case 3 then //x=zeta(3)=2
2134      dg=[1,0,0,0]
2135   case 4 then  //x=zeta(4)=2
2136     dg=[0,0,-0.3,1]
2137   end
2138 endfunction
2139
2140 gam=1.1
2141 eps=1d-3
2142 dmu=eps
2143 eps4mu=eps^4/dmu
2144 xt=sqrt(2*(gam-1)/gam)
2145
2146 fixpnt=[ ];//All boundary conditions are located at x_low and x_up
2147 collpnt=4;
2148 nsizef=4+3*M+(5+collpnt*N)*(collpnt*N+M)+(2*M-2)*2*M ;
2149 nsizei=3 + collpnt*N+M;;
2150 nmax=200;
2151 //    nonlin  collpnt n  ntol  ndimf        ndimi       iprint iread iguess rstart nfxpnt
2152 ipar=[1       collpnt 10  4   nmax*nsizef  nmax*nsizei   -1      0     0      0      0     ]
2153
2154 ltol=1:4;//set tolerance control on zu(1), zu(2), zu(3) and zu(4)
2155 tol=[1.e-5,1.e-5,1.e-5,1.e-5];//set tolreance values for these four controls
2156 xpoints=x_low:0.01:x_up;
2157
2158 // - The function which computes the initial guess, unused here
2159 function [zu,dmval]=guess2(x,gam),
2160    cons=gam*x*(1-x^2/2)
2161    dcons=gam*(1-3*x^2/2)
2162    d2cons=-3*gam*x
2163    dmval=zeros(2,1)
2164    if x>xt then
2165      zu=[0 0 -cons -dcons]
2166      dmval(2)=-d2cons
2167    else
2168      zu=[2*x;2;-2*x+cons;-2*dcons]
2169      dmval(2)=d2cons
2170    end
2171 endfunction
2172
2173 zu=bvode(xpoints,N,m,x_low,x_up,zeta,ipar,ltol,tol,fixpnt,...
2174         fsub2,dfsub2,gsub2,dgsub2,guess2);
2175 scf(1);clf();plot(xpoints,zu([1 3],:)) // the evolution of the solution phi and psi
2176
2177 //using an initial guess
2178 ipar(9)=1;//iguess
2179
2180 zu2=bvode(xpoints,N,m,x_low,x_up,zeta,ipar,ltol,tol,fixpnt,...
2181         fsub2,dfsub2,gsub2,dgsub2,guess2);
2182 scf(2);clf();plot(xpoints,zu2([1 3],:)) // the evolution of the solution phi and psi
2183  ]]></programlisting>
2184             </listitem>
2185             <listitem>
2186                 <para>
2187                     <emphasis role="bold">An eigenvalue problem:</emphasis>
2188                 </para>
2189                 <programlisting role="example"><![CDATA[ 
2190 // y''(x)=-la*y(x)
2191 // BV: y(0)=y'(0); y(1)=0
2192 // Eigenfunctions and eigenvalues are y(x,n)=sin(s(n)*(1-x)), la(n)=s(n)^2,
2193 // where s(n) are the zeros of f(s,n)=s+atan(s)-(n+1)*pi, n=0,1,2,...
2194 // To get a third boundary condition, we choose y(0)=1
2195 // (With y(x) also c*y(x) is a solution for each constant c.)
2196 // We solve the following ode system:
2197 // y''=-la*y
2198 // la'=0
2199 // BV: y(0)=y'(0), y(0)=1; y(1)=0
2200 // z=[y(x) ; y'(x) ; la]
2201
2202 function rhs=fsub(x,z)
2203   rhs=[-z(3)*z(1);0]
2204 endfunction
2205
2206 function g=gsub(i,z)
2207   g=[z(1)-z(2) z(1)-1 z(1)]
2208   g=g(i)
2209 endfunction
2210
2211 // The following start function is good for the first 8 eigenfunctions.
2212 function [z,lhs]=ystart(x,z,la0)
2213   z=[1;0;la0]
2214   lhs=[0;0]
2215 endfunction
2216
2217 a=0;b=1;
2218 m=[2;1];
2219 n=2;
2220 zeta=[a a b];
2221 N=101;
2222 x=linspace(a,b,N)';
2223
2224 // We have s(n)-(n+1/2)*pi -> 0 for n to infinity.
2225 la0=input('n-th eigenvalue: n= ?');la0=(%pi/2+la0*%pi)^2;
2226
2227 z=bvodeS(x,m,n,a,b,fsub,gsub,zeta,ystart=list(ystart,la0));
2228 // The same call without any display
2229 z=bvodeS(x,m,n,a,b,fsub,gsub,zeta,ystart=list(ystart,la0),iprint=1);
2230 // The same with a lot of display
2231 z=bvodeS(x,m,n,a,b,fsub,gsub,zeta,ystart=list(ystart,la0),iprint=-1);
2232
2233 clf()
2234 plot(x,[z(1,:)' z(2,:)']) 
2235 xtitle(['Startvalue =  '+string(la0);'Eigenvalue = '+string(z(3,1))],'x',' ')
2236 legend(['y(x)';'y''(x)'])
2237  ]]></programlisting>
2238                 <scilab:image localized="true">
2239                     function rhs=fsub(x,z)
2240                     rhs=[-z(3)*z(1);0]
2241                     endfunction
2242                     
2243                     function g=gsub(i,z)
2244                     g=[z(1)-z(2) z(1)-1 z(1)]
2245                     g=g(i)
2246                     endfunction
2247                     
2248                     function [z,lhs]=ystart(x,z,la0)
2249                     z=[1;0;la0]
2250                     lhs=[0;0]
2251                     endfunction
2252                     
2253                     a=0;b=1;
2254                     m=[2;1];
2255                     n=2;
2256                     zeta=[a a b];
2257                     N=101;
2258                     x=linspace(a,b,N)';
2259                     
2260                     la0=10;
2261                     la0=(%pi/2+la0*%pi)^2;
2262                     
2263                     z=bvodeS(x,m,n,a,b,fsub,gsub,zeta,ystart=list(ystart,la0),iprint=1);
2264                     
2265                     plot(x,[z(1,:)' z(2,:)']);
2266                     xtitle(['Startvalue =  '+string(la0);'Eigenvalue = '+string(z(3,1))],'x',' ');
2267                     legend(['y(x)';'y''(x)']);
2268                 </scilab:image>
2269                 
2270             </listitem>
2271             <listitem>
2272                 <para>
2273                     <emphasis role="bold">A boundary value problem with more than one solution.</emphasis>
2274                 </para>
2275                 <programlisting role="example"><![CDATA[ 
2276 // DE: y''(x)=-exp(y(x))
2277 // BV: y(0)=0; y(1)=0
2278 // This boundary value problem has more than one solution.
2279 // It is demonstrated how to find two of them with the help of
2280 // some preinformation of the solutions y(x) to build the function ystart.
2281 // z=[y(x);y'(x)]
2282
2283 a=0;
2284 b=1;
2285 m=2;
2286 n=1;
2287 zeta=[a b];
2288 N=101;
2289 tol=1e-8*[1 1];
2290 x=linspace(a,b,N);
2291
2292 function rhs=fsub(x,z)
2293   rhs=-exp(z(1));
2294 endfunction
2295
2296 function g=gsub(i,z)
2297   g=[z(1) z(1)]
2298   g=g(i)
2299 endfunction
2300
2301 function [z,lhs]=ystart(x,z,M) 
2302   //z=[4*x*(1-x)*M ; 4*(1-2*x)*M]
2303   z=[M;0]
2304   //lhs=[-exp(4*x*(1-x)*M)]
2305   lhs=0
2306 endfunction
2307
2308 for M=[1 4]
2309    if M==1
2310       z=bvodeS(x,m,n,a,b,fsub,gsub,zeta,ystart=list(ystart,M),tol=tol);
2311    else
2312       z1=bvodeS(x,m,n,a,b,fsub,gsub,zeta,ystart=list(ystart,M),tol=tol);
2313    end
2314 end
2315
2316 // Integrating the ode yield e.g. the two solutions yex and yex1.
2317
2318 function y=f(c)
2319   y=c.*(1-tanh(sqrt(c)/4).^2)-2;
2320 endfunction
2321 c=fsolve(2,f);
2322
2323 function y=yex(x,c)
2324   y=log(c/2*(1-tanh(sqrt(c)*(1/4-x/2)).^2))
2325 endfunction
2326
2327 function y=f1(c1), y=2*c1^2+tanh(1/4/c1)^2-1;endfunction
2328 c1=fsolve(0.1,f1);
2329
2330 function y=yex1(x,c1)
2331   y=log((1-tanh((2*x-1)/4/c1).^2)/2/c1/c1)
2332 endfunction
2333
2334 disp(norm(z(1,:)-yex(x)),'norm(yex(x)-z(1,:))= ')
2335 disp(norm(z1(1,:)-yex1(x)),'norm(yex1(x)-z1(1,:))= ')
2336 clf();
2337 subplot(2,1,1)
2338 plot2d(x,z(1,:),style=[5])
2339 xtitle('Two different solutions','x',' ') 
2340 subplot(2,1,2)
2341 plot2d(x,z1(1,:),style=[5])
2342 xtitle(' ','x',' ')
2343  ]]></programlisting>
2344                 <scilab:image>
2345                     a=0;
2346                     b=1;
2347                     m=2;
2348                     n=1;
2349                     zeta=[a b];
2350                     N=101;
2351                     tol=1e-8*[1 1];
2352                     x=linspace(a,b,N);
2353                     
2354                     function rhs=fsub(x,z)
2355                     rhs=-exp(z(1));
2356                     endfunction
2357                     
2358                     function g=gsub(i,z)
2359                     g=[z(1) z(1)]
2360                     g=g(i)
2361                     endfunction
2362                     
2363                     function [z,lhs]=ystart(x,z,M) 
2364                     //z=[4*x*(1-x)*M ; 4*(1-2*x)*M]
2365                     z=[M;0]
2366                     //lhs=[-exp(4*x*(1-x)*M)]
2367                     lhs=0
2368                     endfunction
2369                     
2370                     for M=[1 4]
2371                     if M==1
2372                     z=bvodeS(x,m,n,a,b,fsub,gsub,zeta,ystart=list(ystart,M),tol=tol);
2373                     else
2374                     z1=bvodeS(x,m,n,a,b,fsub,gsub,zeta,ystart=list(ystart,M),tol=tol);
2375                     end
2376                     end
2377                     
2378                     // Integrating the ode yield e.g. the two solutions yex and yex1.
2379                     
2380                     function y=f(c)
2381                     y=c.*(1-tanh(sqrt(c)/4).^2)-2;
2382                     endfunction
2383                     c=fsolve(2,f);
2384                     
2385                     function y=yex(x,c)
2386                     y=log(c/2*(1-tanh(sqrt(c)*(1/4-x/2)).^2))
2387                     endfunction
2388                     
2389                     function y=f1(c1), y=2*c1^2+tanh(1/4/c1)^2-1;endfunction
2390                     c1=fsolve(0.1,f1);
2391                     
2392                     function y=yex1(x,c1)
2393                     y=log((1-tanh((2*x-1)/4/c1).^2)/2/c1/c1)
2394                     endfunction
2395                     
2396                     disp(norm(z(1,:)-yex(x)),'norm(yex(x)-z(1,:))= ')
2397                     disp(norm(z1(1,:)-yex1(x)),'norm(yex1(x)-z1(1,:))= ')
2398                     clf();
2399                     subplot(2,1,1)
2400                     plot2d(x,z(1,:),style=[5])
2401                     xtitle('Two different solutions','x',' ')
2402                     subplot(2,1,2)
2403                     plot2d(x,z1(1,:),style=[5])
2404                     xtitle(' ','x',' ')
2405                 </scilab:image>
2406             </listitem>
2407             <listitem>
2408                 <para>
2409                     <emphasis role="bold">A multi-point boundary value problem.</emphasis>
2410                 </para>
2411                 <programlisting role="example"><![CDATA[ 
2412 // DE y'''(x)=1
2413 // z=[y(x);y'(x);y''(x)]
2414 // BV: y(-1)=2 y(1)=2
2415 // Side condition: y(0)=1
2416
2417 a=-1;b=1;c=0;
2418 // The side condition point c must be included in the array fixpnt.
2419 n=1;
2420 m=[3];
2421
2422 function rhs=fsub(x,z)
2423   rhs=1
2424 endfunction
2425
2426 function g=gsub(i,z)
2427   g=[z(1)-2 z(1)-1 z(1)-2]
2428   g=g(i)
2429 endfunction
2430
2431 N=10;
2432 zeta=[a c b];
2433 x=linspace(a,b,N);
2434
2435 z=bvodeS(x,m,n,a,b,fsub,gsub,zeta,fixpnt=c);
2436
2437 function y=yex(x)
2438 y=x.^3/6+x.^2-x./6+1
2439 endfunction
2440
2441 disp(norm(yex(x)-z(1,:)),'norm(yex(x)-z(1,:))= ')
2442  ]]></programlisting>
2443             </listitem>
2444         </itemizedlist>
2445     </refsection>
2446     <refsection role="see also">
2447         <title>See Also</title>
2448         <simplelist type="inline">
2449             <member>
2450                 <link linkend="link">link</link>
2451             </member>
2452             <member>
2453                 <link linkend="external">external</link>
2454             </member>
2455             <member>
2456                 <link linkend="ode">ode</link>
2457             </member>
2458             <member>
2459                 <link linkend="dassl">dassl</link>
2460             </member>
2461         </simplelist>
2462     </refsection>
2463     <refsection>
2464         <title>Used Functions</title>
2465         <para>This function is based on the Fortran routine
2466             <literal>colnew</literal> developed by
2467         </para>
2468         <para>U. Ascher, Department of Computer Science, University of British
2469             Columbia, Vancouver, B.C. V6T 1W5, Canada
2470         </para>
2471         <para>G. Bader, institut f. Angewandte mathematik university of
2472             Heidelberg; im Neuenheimer feld 294d-6900 Heidelberg 1
2473         </para>
2474     </refsection>
2475     <refsection>
2476         <title>Bibliography</title>
2477         <orderedlist>
2478             <listitem>
2479                 <para>U. Ascher, J. Christiansen and R.D. Russell, collocation
2480                     software for boundary-value ODEs, acm trans. math software 7 (1981),
2481                     209-222. this paper contains EXAMPLES where use of the code is
2482                     demonstrated.
2483                 </para>
2484             </listitem>
2485             <listitem>
2486                 <para>G. Bader and U. Ascher, a new basis implementation for a mixed
2487                     order boundary value ode solver, siam j. scient. stat. comput.
2488                     (1987).
2489                 </para>
2490             </listitem>
2491             <listitem>
2492                 <para>U. Ascher, J. Christiansen and R.D. Russell, a collocation
2493                     solver for mixed order systems of boundary value problems, math. comp.
2494                     33 (1979), 659-679.
2495                 </para>
2496             </listitem>
2497             <listitem>
2498                 <para>U. Ascher, J. Christiansen and R.D. russell, colsys - a
2499                     collocation code for boundary value problems, lecture notes comp.sc.
2500                     76, springer verlag, b. children et. al. (eds.) (1979), 164-185.
2501                 </para>
2502             </listitem>
2503             <listitem>
2504                 <para>C. Deboor and R. Weiss, solveblok: a package for solving almost
2505                     block diagonal linear systems, acm trans. math. software 6 (1980),
2506                     80-87.
2507                 </para>
2508             </listitem>
2509         </orderedlist>
2510     </refsection>
2511 </refentry>