annotate doc/interpreter/diffeq.txi @ 20901:afe9c529760d

2015 Code Sprint: move ode23 and runge_kutta_23 from odepkg to core * scripts/ode/ode23.m: new file * scripts/ode/private/runge_kutta_23.m: new file * scripts/ode/module.mk: list new files * doc/interpreter/diffeq.txi: mention ode23 among available solvers * scripts/help/__unimplemented__.m: remove ode23 from list of unimplemented functions
author Stefan Miereis <stefan.miereis@gmx.de>
date Tue, 15 Dec 2015 13:59:17 +0100
parents 75d09edcfc75
children dba88797f69f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19697
4197fc428c7d maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents: 19596
diff changeset
1 @c Copyright (C) 1996-2015 John W. Eaton
7018
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6778
diff changeset
2 @c
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6778
diff changeset
3 @c This file is part of Octave.
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6778
diff changeset
4 @c
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6778
diff changeset
5 @c Octave is free software; you can redistribute it and/or modify it
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6778
diff changeset
6 @c under the terms of the GNU General Public License as published by the
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6778
diff changeset
7 @c Free Software Foundation; either version 3 of the License, or (at
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6778
diff changeset
8 @c your option) any later version.
19593
446c46af4b42 strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents: 17744
diff changeset
9 @c
7018
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6778
diff changeset
10 @c Octave is distributed in the hope that it will be useful, but WITHOUT
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6778
diff changeset
11 @c ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6778
diff changeset
12 @c FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6778
diff changeset
13 @c for more details.
19593
446c46af4b42 strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents: 17744
diff changeset
14 @c
7018
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6778
diff changeset
15 @c You should have received a copy of the GNU General Public License
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6778
diff changeset
16 @c along with Octave; see the file COPYING. If not, see
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6778
diff changeset
17 @c <http://www.gnu.org/licenses/>.
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
18
4167
aae05d51353c [project @ 2002-11-12 02:52:50 by jwe]
jwe
parents: 4115
diff changeset
19 @node Differential Equations
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
20 @chapter Differential Equations
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
21
6700
b55d109ffe7e [project @ 2007-06-12 20:51:47 by jwe]
jwe
parents: 5173
diff changeset
22 Octave has built-in functions for solving ordinary differential equations,
b55d109ffe7e [project @ 2007-06-12 20:51:47 by jwe]
jwe
parents: 5173
diff changeset
23 and differential-algebraic equations.
8828
8463d1a2e544 Doc fixes.
Brian Gough <bjg@network-theory.co.uk>
parents: 8286
diff changeset
24 All solvers are based on reliable ODE routines written in Fortran.
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
25
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
26 @menu
17152
f2a8592b8fbd doc: Shorten some long subsection names in Manual.
Rik <rik@octave.org>
parents: 16868
diff changeset
27 * Ordinary Differential Equations::
f2a8592b8fbd doc: Shorten some long subsection names in Manual.
Rik <rik@octave.org>
parents: 16868
diff changeset
28 * Differential-Algebraic Equations::
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
29 @end menu
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
30
12578
f5a780d675a1 Clean up operator and function indices in documentation.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
31 @cindex differential equations
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
32 @cindex ODE
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
33 @cindex DAE
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
34
4167
aae05d51353c [project @ 2002-11-12 02:52:50 by jwe]
jwe
parents: 4115
diff changeset
35 @node Ordinary Differential Equations
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
36 @section Ordinary Differential Equations
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
37
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
38 The function @code{lsode} can be used to solve ODEs of the form
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
39 @tex
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
40 $$
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
41 {dx\over dt} = f (x, t)
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
42 $$
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
43 @end tex
10668
72585f1ca7a2 Replace @ifinfo with @ifnottex.
Rik <octave@nomad.inbox5.com>
parents: 9209
diff changeset
44 @ifnottex
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
45
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
46 @example
9067
8970b4b10e9f Cleanup documentation for quad.texi and diffeq.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
47 @group
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
48 dx
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
49 -- = f (x, t)
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
50 dt
9067
8970b4b10e9f Cleanup documentation for quad.texi and diffeq.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
51 @end group
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
52 @end example
10828
322f43e0e170 Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents: 10668
diff changeset
53
10668
72585f1ca7a2 Replace @ifinfo with @ifnottex.
Rik <octave@nomad.inbox5.com>
parents: 9209
diff changeset
54 @end ifnottex
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
55
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
56 @noindent
19040
0850b5212619 doc: Add @nospell macro around proper names in documentation.
Rik <rik@octave.org>
parents: 17744
diff changeset
57 using @nospell{Hindmarsh's} ODE solver @sc{lsode}.
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
58
6700
b55d109ffe7e [project @ 2007-06-12 20:51:47 by jwe]
jwe
parents: 5173
diff changeset
59
b55d109ffe7e [project @ 2007-06-12 20:51:47 by jwe]
jwe
parents: 5173
diff changeset
60
3373
36405da8e173 [project @ 1999-11-23 20:54:17 by jwe]
jwe
parents: 3294
diff changeset
61 @DOCSTRING(lsode)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
62
4115
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3373
diff changeset
63 @DOCSTRING(lsode_options)
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3373
diff changeset
64
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
65 Here is an example of solving a set of three differential equations using
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
66 @code{lsode}. Given the function
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
67
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
68 @cindex oregonator
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
69
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
70 @example
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
71 @group
16868
b028df1b1e81 doc: Mention oregonator.m in examples dir in documentation.
Rik <rik@octave.org>
parents: 14856
diff changeset
72 ## oregonator differential equation
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
73 function xdot = f (x, t)
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
74
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
75 xdot = zeros (3,1);
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
76
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
77 xdot(1) = 77.27 * (x(2) - x(1)*x(2) + x(1) \
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
78 - 8.375e-06*x(1)^2);
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
79 xdot(2) = (x(3) - x(1)*x(2) - x(2)) / 77.27;
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
80 xdot(3) = 0.161*(x(1) - x(3));
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
81
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
82 endfunction
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
83 @end group
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
84 @end example
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
85
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
86 @noindent
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
87 and the initial condition @code{x0 = [ 4; 1.1; 4 ]}, the set of
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
88 equations can be integrated using the command
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
89
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
90 @example
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
91 @group
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
92 t = linspace (0, 500, 1000);
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
93
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
94 y = lsode ("f", x0, t);
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
95 @end group
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
96 @end example
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
97
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
98 If you try this, you will see that the value of the result changes
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
99 dramatically between @var{t} = 0 and 5, and again around @var{t} = 305.
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
100 A more efficient set of output points might be
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
101
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
102 @example
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
103 @group
14856
c3fd61c59e9c maint: Use Octave coding conventions for cuddling parentheses in doc directory
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
104 t = [0, logspace(-1, log10(303), 150), \
c3fd61c59e9c maint: Use Octave coding conventions for cuddling parentheses in doc directory
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
105 logspace(log10(304), log10(500), 150)];
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
106 @end group
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
107 @end example
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
108
19040
0850b5212619 doc: Add @nospell macro around proper names in documentation.
Rik <rik@octave.org>
parents: 17744
diff changeset
109 See @nospell{Alan C. Hindmarsh},
0850b5212619 doc: Add @nospell macro around proper names in documentation.
Rik <rik@octave.org>
parents: 17744
diff changeset
110 @cite{ODEPACK, A Systematized Collection of ODE Solvers},
0850b5212619 doc: Add @nospell macro around proper names in documentation.
Rik <rik@octave.org>
parents: 17744
diff changeset
111 in Scientific Computing, @nospell{R. S. Stepleman}, editor, (1983)
0850b5212619 doc: Add @nospell macro around proper names in documentation.
Rik <rik@octave.org>
parents: 17744
diff changeset
112 for more information about the inner workings of @code{lsode}.
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
113
16868
b028df1b1e81 doc: Mention oregonator.m in examples dir in documentation.
Rik <rik@octave.org>
parents: 14856
diff changeset
114 An m-file for the differential equation used above is included with the
b028df1b1e81 doc: Mention oregonator.m in examples dir in documentation.
Rik <rik@octave.org>
parents: 14856
diff changeset
115 Octave distribution in the examples directory under the name
b028df1b1e81 doc: Mention oregonator.m in examples dir in documentation.
Rik <rik@octave.org>
parents: 14856
diff changeset
116 @file{oregonator.m}.
b028df1b1e81 doc: Mention oregonator.m in examples dir in documentation.
Rik <rik@octave.org>
parents: 14856
diff changeset
117
20533
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
118 @menu
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
119 * Matlab-compatible solvers::
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
120 @end menu
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
121
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
122 @node Matlab-compatible solvers
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
123 @subsection Matlab-compatible solvers
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
124
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
125 Octave also provides a set of solvers for initial value problems for Ordinary
20716
1ecee53513d7 doc: Peridodic grammar check of documentation.
Rik <rik@octave.org>
parents: 20533
diff changeset
126 Differential Equations that have a @sc{matlab}-compatible interface.
20533
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
127 The options for this class of methods are set using the functions.
20716
1ecee53513d7 doc: Peridodic grammar check of documentation.
Rik <rik@octave.org>
parents: 20533
diff changeset
128
20533
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
129 @itemize
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
130 @item @code{odeset}
20716
1ecee53513d7 doc: Peridodic grammar check of documentation.
Rik <rik@octave.org>
parents: 20533
diff changeset
131
20533
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
132 @item @code{odeget}
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
133 @end itemize
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
134
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
135 Currently implemented solvers are:
20716
1ecee53513d7 doc: Peridodic grammar check of documentation.
Rik <rik@octave.org>
parents: 20533
diff changeset
136
20533
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
137 @itemize
20719
d903cccb8de8 doc: Periodic spellcheck of documentation.
Rik <rik@octave.org>
parents: 20716
diff changeset
138 @item @nospell{Runge-Kutta} methods
20716
1ecee53513d7 doc: Peridodic grammar check of documentation.
Rik <rik@octave.org>
parents: 20533
diff changeset
139
20533
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
140 @itemize
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
141 @item @code{ode45} Integrates a system of non--stiff ordinary differential equations
20719
d903cccb8de8 doc: Periodic spellcheck of documentation.
Rik <rik@octave.org>
parents: 20716
diff changeset
142 (non--stiff ODEs and DAEs) using second order @nospell{Dormand-Prince}
d903cccb8de8 doc: Periodic spellcheck of documentation.
Rik <rik@octave.org>
parents: 20716
diff changeset
143 method. This is a fourth--order accurate integrator therefore the local
d903cccb8de8 doc: Periodic spellcheck of documentation.
Rik <rik@octave.org>
parents: 20716
diff changeset
144 error normally expected is @math{O(h^5)}. This solver requires six
d903cccb8de8 doc: Periodic spellcheck of documentation.
Rik <rik@octave.org>
parents: 20716
diff changeset
145 function evaluations per integration step.
20901
afe9c529760d 2015 Code Sprint: move ode23 and runge_kutta_23 from odepkg to core
Stefan Miereis <stefan.miereis@gmx.de>
parents: 20844
diff changeset
146 @item @code{ode23} Integrates a system of non--stiff ordinary differential equations
afe9c529760d 2015 Code Sprint: move ode23 and runge_kutta_23 from odepkg to core
Stefan Miereis <stefan.miereis@gmx.de>
parents: 20844
diff changeset
147 (non-stiff ODEs and DAEs) using second order @nospell{Bogacki-Shampine}
afe9c529760d 2015 Code Sprint: move ode23 and runge_kutta_23 from odepkg to core
Stefan Miereis <stefan.miereis@gmx.de>
parents: 20844
diff changeset
148 method. This is a second-order accurate integrator therefore the local
afe9c529760d 2015 Code Sprint: move ode23 and runge_kutta_23 from odepkg to core
Stefan Miereis <stefan.miereis@gmx.de>
parents: 20844
diff changeset
149 error normally expected is @math{O(h^3)}. This solver requires three
afe9c529760d 2015 Code Sprint: move ode23 and runge_kutta_23 from odepkg to core
Stefan Miereis <stefan.miereis@gmx.de>
parents: 20844
diff changeset
150 function evaluations per integration step.
20533
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
151 @end itemize
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
152 @end itemize
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
153
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
154
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
155 @DOCSTRING(ode45)
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
156
20901
afe9c529760d 2015 Code Sprint: move ode23 and runge_kutta_23 from odepkg to core
Stefan Miereis <stefan.miereis@gmx.de>
parents: 20844
diff changeset
157 @DOCSTRING(ode23)
afe9c529760d 2015 Code Sprint: move ode23 and runge_kutta_23 from odepkg to core
Stefan Miereis <stefan.miereis@gmx.de>
parents: 20844
diff changeset
158
20533
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
159 @DOCSTRING(odeset)
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
160
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
161 @DOCSTRING(odeget)
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
162
20844
75d09edcfc75 codesprint: Move odeplot.m from odepkg to core
Stefan Miereis <stefan.miereis@gmx.de>
parents: 20719
diff changeset
163 @DOCSTRING(odeplot)
20533
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 19697
diff changeset
164
4167
aae05d51353c [project @ 2002-11-12 02:52:50 by jwe]
jwe
parents: 4115
diff changeset
165 @node Differential-Algebraic Equations
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
166 @section Differential-Algebraic Equations
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
167
4115
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3373
diff changeset
168 The function @code{daspk} can be used to solve DAEs of the form
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
169 @tex
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
170 $$
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
171 0 = f (\dot{x}, x, t), \qquad x(t=0) = x_0, \dot{x}(t=0) = \dot{x}_0
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
172 $$
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
173 @end tex
6700
b55d109ffe7e [project @ 2007-06-12 20:51:47 by jwe]
jwe
parents: 5173
diff changeset
174 @ifnottex
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
175
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
176 @example
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
177 0 = f (x-dot, x, t), x(t=0) = x_0, x-dot(t=0) = x-dot_0
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
178 @end example
10828
322f43e0e170 Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents: 10668
diff changeset
179
6700
b55d109ffe7e [project @ 2007-06-12 20:51:47 by jwe]
jwe
parents: 5173
diff changeset
180 @end ifnottex
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
181
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
182 @noindent
6700
b55d109ffe7e [project @ 2007-06-12 20:51:47 by jwe]
jwe
parents: 5173
diff changeset
183 where
b55d109ffe7e [project @ 2007-06-12 20:51:47 by jwe]
jwe
parents: 5173
diff changeset
184 @tex
b55d109ffe7e [project @ 2007-06-12 20:51:47 by jwe]
jwe
parents: 5173
diff changeset
185 $\dot{x} = {dx \over dt}$
b55d109ffe7e [project @ 2007-06-12 20:51:47 by jwe]
jwe
parents: 5173
diff changeset
186 @end tex
b55d109ffe7e [project @ 2007-06-12 20:51:47 by jwe]
jwe
parents: 5173
diff changeset
187 @ifnottex
b55d109ffe7e [project @ 2007-06-12 20:51:47 by jwe]
jwe
parents: 5173
diff changeset
188 @math{x-dot}
b55d109ffe7e [project @ 2007-06-12 20:51:47 by jwe]
jwe
parents: 5173
diff changeset
189 @end ifnottex
19040
0850b5212619 doc: Add @nospell macro around proper names in documentation.
Rik <rik@octave.org>
parents: 17744
diff changeset
190 is the derivative of @math{x}. The equation is solved using
0850b5212619 doc: Add @nospell macro around proper names in documentation.
Rik <rik@octave.org>
parents: 17744
diff changeset
191 @nospell{Petzold's} DAE solver @sc{daspk}.
4115
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3373
diff changeset
192
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3373
diff changeset
193 @DOCSTRING(daspk)
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3373
diff changeset
194
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3373
diff changeset
195 @DOCSTRING(daspk_options)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
196
10828
322f43e0e170 Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents: 10668
diff changeset
197 Octave also includes @sc{dassl}, an earlier version of @sc{daspk},
322f43e0e170 Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents: 10668
diff changeset
198 and @sc{dasrt}, which can be used to solve DAEs with constraints
4115
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3373
diff changeset
199 (stopping conditions).
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
200
8286
6f2d95255911 fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents: 7018
diff changeset
201 @DOCSTRING(dassl)
6f2d95255911 fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents: 7018
diff changeset
202
6f2d95255911 fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents: 7018
diff changeset
203 @DOCSTRING(dassl_options)
6f2d95255911 fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents: 7018
diff changeset
204
4115
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3373
diff changeset
205 @DOCSTRING(dasrt)
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3373
diff changeset
206
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3373
diff changeset
207 @DOCSTRING(dasrt_options)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
208
19040
0850b5212619 doc: Add @nospell macro around proper names in documentation.
Rik <rik@octave.org>
parents: 17744
diff changeset
209 See @nospell{K. E. Brenan}, et al., @cite{Numerical Solution of Initial-Value
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
210 Problems in Differential-Algebraic Equations}, North-Holland (1989) for
10828
322f43e0e170 Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents: 10668
diff changeset
211 more information about the implementation of @sc{dassl}.