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
|
% Copyright The Numerical Algorithms Group Limited 1992-94. All rights reserved.
% !! DO NOT MODIFY THIS FILE BY HAND !! Created by ht.awk.
\newcommand{\LinearOrdinaryDifferentialOperatorOneXmpTitle}{LinearOrdinaryDifferentialOperator1}
\newcommand{\LinearOrdinaryDifferentialOperatorOneXmpNumber}{9.45}
%
% =====================================================================
\begin{page}{LinearOrdinaryDifferentialOperatorOneXmpPage}{9.45 LinearOrdinaryDifferentialOperator1}
% =====================================================================
\beginscroll
\spadtype{LinearOrdinaryDifferentialOperator1(A)} is the domain of linear
%-% \HDindex{operator!linear ordinary differential}{LinearOrdinaryDifferentialOperatorOneXmpPage}{9.45}{LinearOrdinaryDifferentialOperator1}
ordinary differential operators with coefficients in the differential ring
\spad{A}.
%This includes the cases of operators which are polynomials in \spad{D}
%acting upon scalar or vector expressions of a single variable.
%The coefficients of the operator polynomials can be integers, rational
%functions, matrices or elements of other domains.
\showBlurb{LinearOrdinaryDifferentialOperator1}
\beginmenu
\menudownlink{{9.45.1. Differential Operators with Rational Function Coefficients}}{ugxLinearOrdinaryDifferentialOperatorOneRatPage}
\endmenu
\endscroll
\autobuttons
\end{page}
%
%
\newcommand{\ugxLinearOrdinaryDifferentialOperatorOneRatTitle}{Differential Operators with Rational Function Coefficients}
\newcommand{\ugxLinearOrdinaryDifferentialOperatorOneRatNumber}{9.45.1.}
%
% =====================================================================
\begin{page}{ugxLinearOrdinaryDifferentialOperatorOneRatPage}{9.45.1. Differential Operators with Rational Function Coefficients}
% =====================================================================
\beginscroll
This example shows differential operators with rational function
coefficients. In this case operator multiplication is non-commutative and,
since the coefficients form a field, an operator division algorithm exists.
\labelSpace{2pc}
\xtc{
We begin by defining \spad{RFZ} to be the rational functions in
\spad{x} with integer coefficients and \spad{Dx} to be the differential
operator for \spad{d/dx}.
}{
\spadpaste{RFZ := Fraction UnivariatePolynomial('x, Integer) \bound{RFZ0}}
}
\xtc{
}{
\spadpaste{x : RFZ := 'x \free{RFZ0}\bound{RFZ}}
}
\xtc{
}{
\spadpaste{Dx : LODO1 RFZ := D()\bound{Dx}\free{RFZ}}
}
\xtc{
Operators are created using the usual arithmetic operations.
}{
\spadpaste{b : LODO1 RFZ := 3*x**2*Dx**2 + 2*Dx + 1/x \free{Dx}\bound{b}}
}
\xtc{
}{
\spadpaste{a : LODO1 RFZ := b*(5*x*Dx + 7) \free{b Dx}\bound{a}}
}
\xtc{
Operator multiplication corresponds to functional composition.
}{
\spadpaste{p := x**2 + 1/x**2 \bound{p}\free{RFZ}}
}
\xtc{
Since operator coefficients depend on \spad{x}, the multiplication is
not commutative.
}{
\spadpaste{(a*b - b*a) p \free{a b p}}
}
When the coefficients of operator polynomials come from a field, as in this
case, it is possible to define operator division.
Division on the left and division on the right yield different results when
the multiplication is non-commutative.
The results of \spadfunFrom{leftDivide}{LinearOrdinaryDifferentialOperator1} and
\spadfunFrom{rightDivide}{LinearOrdinaryDifferentialOperator1} are
quotient-remainder pairs satisfying: \newline
%
\spad{leftDivide(a,b) = [q, r]} such that \spad{a = b*q + r} \newline
\spad{rightDivide(a,b) = [q, r]} such that \spad{a = q*b + r} \newline
%
\xtc{
In both cases, the \spadfunFrom{degree}{LinearOrdinaryDifferentialOperator1}
of the remainder, \spad{r}, is less than
the degree of \spad{b}.
}{
\spadpaste{ld := leftDivide(a,b) \bound{ld}\free{a b}}
}
\xtc{
}{
\spadpaste{a = b * ld.quotient + ld.remainder \free{a b ld}}
}
\xtc{
The operations of left and right division
are so-called because the quotient is obtained by dividing
\spad{a} on that side by \spad{b}.
}{
\spadpaste{rd := rightDivide(a,b) \bound{rd}\free{a b}}
}
\xtc{
}{
\spadpaste{a = rd.quotient * b + rd.remainder \free{a b rd}}
}
\xtc{
Operations \spadfunFrom{rightQuotient}{LinearOrdinaryDifferentialOperator1}
and \spadfunFrom{rightRemainder}{LinearOrdinaryDifferentialOperator1}
are available if only one of the quotient or remainder are of
interest to you.
This is the quotient from right division.
}{
\spadpaste{rightQuotient(a,b) \free{a b}}
}
\xtc{
This is the remainder from right division.
The corresponding ``left'' functions
\spadfunFrom{leftQuotient}{LinearOrdinaryDifferentialOperator1} and
\spadfunFrom{leftRemainder}{LinearOrdinaryDifferentialOperator1}
are also available.
}{
\spadpaste{rightRemainder(a,b) \free{a b}}
}
\xtc{
For exact division, the operations
\spadfunFrom{leftExactQuotient}{LinearOrdinaryDifferentialOperator1} and
\spadfunFrom{rightExactQuotient}{LinearOrdinaryDifferentialOperator1} are supplied.
These return the quotient but only if the remainder is zero.
The call \spad{rightExactQuotient(a,b)} would yield an error.
}{
\spadpaste{leftExactQuotient(a,b) \free{a b}}
}
\xtc{
The division operations allow the computation of left and right greatest
common divisors (\spadfunFrom{leftGcd}{LinearOrdinaryDifferentialOperator1} and
\spadfunFrom{rightGcd}{LinearOrdinaryDifferentialOperator1}) via remainder
sequences, and consequently the computation of left and right least common
multiples (\spadfunFrom{rightLcm}{LinearOrdinaryDifferentialOperator1} and
\spadfunFrom{leftLcm}{LinearOrdinaryDifferentialOperator1}).
}{
\spadpaste{e := leftGcd(a,b) \bound{e}\free{a b}}
}
\xtc{
Note that a greatest common divisor doesn't necessarily divide \spad{a} and
%-% \HDindex{greatest common divisor}{ugxLinearOrdinaryDifferentialOperatorOneRatPage}{9.45.1.}{Differential Operators with Rational Function Coefficients}
\spad{b} on both sides.
Here the left greatest common divisor does not divide \spad{a} on the right.
}{
\spadpaste{leftRemainder(a, e) \free{a e}}
}
\xtc{
}{
\spadpaste{rightRemainder(a, e) \free{a e}}
}
\xtc{
Similarly, a least common multiple
%-% \HDindex{least common multiple}{ugxLinearOrdinaryDifferentialOperatorOneRatPage}{9.45.1.}{Differential Operators with Rational Function Coefficients}
is not necessarily divisible from both sides.
}{
\spadpaste{f := rightLcm(a,b) \bound{f}\free{a b}}
}
\xtc{
}{
\spadpaste{rightRemainder(f, b) \free{f b}}
}
\xtc{
}{
\spadpaste{leftRemainder(f, b) \free{f b}}
}
\endscroll
\autobuttons
\end{page}
%
|