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