aboutsummaryrefslogtreecommitdiff
path: root/src/hyper/pages/ODPOL.ht
blob: 855a40b96d2dc3cd5dd947367ad15ef2c339de35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
% Copyright The Numerical Algorithms Group Limited 1992-94. All rights reserved.
% !! DO NOT MODIFY THIS FILE BY HAND !! Created by ht.awk.
\newcommand{\OrderlyDifferentialPolynomialXmpTitle}{OrderlyDifferentialPolynomial}
\newcommand{\OrderlyDifferentialPolynomialXmpNumber}{9.60}
%
% =====================================================================
\begin{page}{OrderlyDifferentialPolynomialXmpPage}{9.60 OrderlyDifferentialPolynomial}
% =====================================================================
\beginscroll

Many systems of differential equations may be transformed to equivalent
%-% \HDindex{differential equation}{OrderlyDifferentialPolynomialXmpPage}{9.60}{OrderlyDifferentialPolynomial}
systems of ordinary differential equations where the equations are
%-% \HDindex{equation!differential}{OrderlyDifferentialPolynomialXmpPage}{9.60}{OrderlyDifferentialPolynomial}
expressed polynomially in terms of the unknown functions.
%-% \HDindex{polynomial!differential polynomial}{OrderlyDifferentialPolynomialXmpPage}{9.60}{OrderlyDifferentialPolynomial}
In \Language{}, the domain constructors
\spadtype{OrderlyDifferentialPolynomial}
%-% \HDindex{differential polynomial}{OrderlyDifferentialPolynomialXmpPage}{9.60}{OrderlyDifferentialPolynomial}
(abbreviated \spadtype{ODPOL}) and
\spadtype{SequentialDifferentialPolynomial} (abbreviation
\spadtype{SDPOL}) implement two domains of ordinary differential
polynomials over any differential ring.
In the simplest case, this differential ring is usually either the ring of
integers, or the field of rational numbers.
However, \Language{} can handle ordinary differential polynomials over a
field of rational functions in a single indeterminate.
%-% \HDexptypeindex{OrderlyDifferentialPolynomial}{OrderlyDifferentialPolynomialXmpPage}{9.60}{OrderlyDifferentialPolynomial}
%-% \HDexptypeindex{SequentialDifferentialPolynomial}{OrderlyDifferentialPolynomialXmpPage}{9.60}{OrderlyDifferentialPolynomial}

The two domains \spadtype{ODPOL} and \spadtype{SDPOL} are almost
identical, the only difference being the choice of a different ranking,
which is an ordering of the derivatives of the indeterminates.
The first domain uses an orderly ranking, that is, derivatives of higher
order are ranked higher, and derivatives of the same order are ranked
alphabetically.
The second domain uses a sequential ranking, where derivatives are ordered
first alphabetically by the differential indeterminates, and then by
order.
A more general domain constructor,
\spadtype{DifferentialSparseMultivariatePolynomial} (abbreviation
\spadtype{DSMP}) allows both a user-provided list of differential
indeterminates as well as a user-defined ranking.
We shall illustrate \spadtype{ODPOL(FRAC INT)}, which constructs a domain
of ordinary differential polynomials in an arbitrary number of
differential indeterminates with rational numbers as coefficients.
\xtc{
}{
\spadpaste{dpol:= ODPOL(FRAC INT) \bound{dpol}}
}

\xtc{
A differential indeterminate \spad{w} may be viewed as an infinite
sequence of algebraic indeterminates, which are the derivatives of
\spad{w}.
To facilitate referencing these, \Language{} provides the operation
\spadfunFrom{makeVariable}{OrderlyDifferentialPolynomial} to convert an
element of type \spadtype{Symbol} to a map from the natural numbers to the
differential polynomial ring.
}{
\spadpaste{w := makeVariable('w)\$dpol \free{dpol}\bound{w}}
}
\xtc{
}{
\spadpaste{z := makeVariable('z)\$dpol \free{dpol}\bound{z}}
}
\xtc{
The fifth derivative of \spad{w} can be obtained by applying the map
\spad{w} to the number \spad{5.}
Note that the order of differentiation is given as a subscript (except
when the order is 0).
}{
\spadpaste{w.5 \free{w}}
}
\xtc{
}{
\spadpaste{w 0 \free{w}}
}
\xtc{
The first five derivatives of \spad{z} can be generated by a list.
}{
\spadpaste{[z.i for i in 1..5] \free{z}}
}
\xtc{
The usual arithmetic can be used to form a differential polynomial from
the derivatives.
}{
\spadpaste{f:= w.4 - w.1 * w.1 * z.3 \free{w}\free{z}\bound{f}}
}
\xtc{
}{
\spadpaste{g:=(z.1)**3 * (z.2)**2 - w.2 \free{z}\free{w}\bound{g}}
}
\xtc{
The operation \spadfunFrom{D}{OrderlyDifferentialPolynomial}
computes the derivative of any differential polynomial.
}{
\spadpaste{D(f) \free{f}}
}
\xtc{
The same operation can compute higher derivatives, like the
fourth derivative.
}{
\spadpaste{D(f,4) \free{f}}
}
\xtc{
The operation \spadfunFrom{makeVariable}{OrderlyDifferentialPolynomial}
creates a map to facilitate referencing the derivatives of \spad{f},
similar to the map \spad{w}.
}{
\spadpaste{df:=makeVariable(f)\$dpol \free{f}\bound{df}}
}
\xtc{
The fourth derivative of f may be referenced easily.
}{
\spadpaste{df.4 \free{df}}
}
\xtc{
The operation \spadfunFrom{order}{OrderlyDifferentialPolynomial}
returns the order of a differential polynomial, or the order
in a specified differential indeterminate.
}{
\spadpaste{order(g)  \free{g}}
}
\xtc{
}{
\spadpaste{order(g, 'w)  \free{g}}
}
\xtc{
The operation
\spadfunFrom{differentialVariables}{OrderlyDifferentialPolynomial} returns
a list of differential indeterminates occurring in a differential
polynomial.
}{
\spadpaste{differentialVariables(g)  \free{g}}
}
\xtc{
The operation \spadfunFrom{degree}{OrderlyDifferentialPolynomial} returns
the degree, or the degree in the differential indeterminate specified.
}{
\spadpaste{degree(g) \free{g}}
}
\xtc{
}{
\spadpaste{degree(g, 'w)  \free{g}}
}
\xtc{
The operation \spadfunFrom{weights}{OrderlyDifferentialPolynomial} returns
a list of weights of differential monomials appearing in differential
polynomial, or a list of weights in a specified differential
indeterminate.
}{
\spadpaste{weights(g)  \free{g}}
}
\xtc{
}{
\spadpaste{weights(g,'w) \free{g}}
}
\xtc{
The operation \spadfunFrom{weight}{OrderlyDifferentialPolynomial} returns
the maximum weight of all differential monomials appearing in the
differential polynomial.
}{
\spadpaste{weight(g)  \free{g}}
}
\xtc{
A differential polynomial is {\em isobaric} if the weights of all
differential monomials appearing in it are equal.
}{
\spadpaste{isobaric?(g) \free{g}}
}
\xtc{
To substitute {\em differentially}, use
\spadfunFrom{eval}{OrderlyDifferentialPolynomial}.
Note that we must coerce \spad{'w} to \spadtype{Symbol}, since in
\spadtype{ODPOL}, differential indeterminates belong to the domain
\spadtype{Symbol}.
Compare this result to the next, which substitutes {\em algebraically} (no
substitution is done since \spad{w.0} does not appear in \spad{g}).
}{
\spadpaste{eval(g,['w::Symbol],[f]) \free{f}\free{g}}
}
\xtc{
}{
\spadpaste{eval(g,variables(w.0),[f]) \free{f}\free{g}}
}
\xtc{
Since \spadtype{OrderlyDifferentialPolynomial} belongs to
\spadtype{PolynomialCategory}, all the operations defined in the latter
category, or in packages for the latter category, are available.
}{
\spadpaste{monomials(g) \free{g}}
}
\xtc{
}{
\spadpaste{variables(g) \free{g}}
}
\xtc{
}{
\spadpaste{gcd(f,g) \free{f}\free{g}}
}
\xtc{
}{
\spadpaste{groebner([f,g]) \free{f}\free{g}}
}
\xtc{
The next three operations are essential for elimination procedures in
differential polynomial rings.
The operation \spadfunFrom{leader}{OrderlyDifferentialPolynomial} returns
the leader of a differential polynomial, which is the highest ranked
derivative of the differential indeterminates that occurs.
}{
\spadpaste{lg:=leader(g)  \free{g}\bound{lg}}
}
\xtc{
The operation \spadfunFrom{separant}{OrderlyDifferentialPolynomial} returns
the separant of a differential polynomial, which is the partial derivative
with respect to the leader.
}{
\spadpaste{sg:=separant(g)  \free{g}\bound{sg}}
}
\xtc{
The operation \spadfunFrom{initial}{OrderlyDifferentialPolynomial} returns
the initial, which is the leading coefficient when the given differential
polynomial is expressed as a polynomial in the leader.
}{
\spadpaste{ig:=initial(g)  \free{g}\bound{ig}}
}
\xtc{
Using these three operations, it is possible to reduce \spad{f} modulo the
differential ideal generated by \spad{g}.
The general scheme is to first reduce the order, then reduce the degree in
the leader.
First, eliminate \spad{z.3} using the derivative of \spad{g}.
}{
\spadpaste{g1 := D g \free{g}\bound{g1}}
}
\xtc{
Find its leader.
}{
\spadpaste{lg1:= leader g1 \free{g1}\bound{lg1}}
}
\xtc{
Differentiate \spad{f} partially with respect to this leader.
}{
\spadpaste{pdf:=D(f, lg1) \free{f}\free{lg1}\bound{pdf}}
}
\xtc{
Compute the partial remainder of \spad{f} with respect to \spad{g}.
}{
\spadpaste{prf:=sg * f- pdf * g1 \free{f}\free{sg}\free{pdf}\free{g1}\bound{prf}}
}
\xtc{
Note that high powers of \spad{lg} still appear in \spad{prf}.
Compute the leading coefficient of \spad{prf}
as a polynomial in the leader of \spad{g}.
}{
\spadpaste{lcf:=leadingCoefficient univariate(prf, lg) \free{prf}\free{lg}\bound{lcf}}
}
\xtc{
Finally, continue eliminating the high powers of \spad{lg} appearing in
\spad{prf} to obtain the (pseudo) remainder of \spad{f} modulo \spad{g}
and its derivatives.
}{
\spadpaste{ig * prf - lcf * g * lg \free{ig}\free{prf}\free{lcf}\free{g}\free{lg}}
}
\showBlurb{OrderlyDifferentialPolyomial}
\showBlurb{SequentialDifferentialPolynomial}
\endscroll
\autobuttons
\end{page}
%