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