9.46.1 Differential Operators with Constant Coefficients
This example shows differential operators with rational
number coefficients operating on univariate polynomials.
We begin by making type assignments so we can conveniently refer
to univariate polynomials in x over the rationals.
Type: Domain
PQ := UnivariatePolynomial('x, Q)
|
Type: Domain
Type: UnivariatePolynomial(x,Fraction Integer)
Now we assign Dx to be the differential operator
DDLinearOrdinaryDifferentialOperator2
corresponding to d/dx.
Type:
LinearOrdinaryDifferentialOperator2(
Fraction Integer,
UnivariatePolynomial(x,Fraction Integer))
New operators are created as polynomials in D().
Type:
LinearOrdinaryDifferentialOperator2(
Fraction Integer,
UnivariatePolynomial(x,Fraction Integer))
Type:
LinearOrdinaryDifferentialOperator2(
Fraction Integer,
UnivariatePolynomial(x,Fraction Integer))
To apply the operator a to the value p the usual function
call syntax is used.
Type: UnivariatePolynomial(x,Fraction Integer)
Type: UnivariatePolynomial(x,Fraction Integer)
Operator multiplication is defined by the identity (a*b) p = a(b(p))
Type: Equation UnivariatePolynomial(x,Fraction Integer)
Exponentiation follows from multiplication.
|
Type:
LinearOrdinaryDifferentialOperator2(
Fraction Integer,
UnivariatePolynomial(x,Fraction Integer))
Finally, note that operator expressions may be applied directly.
(a**2 - 3/4*b + c) (p + 1)
Type: UnivariatePolynomial(x,Fraction Integer)
9.46.2 Differential Operators with Matrix Coefficients Operating on Vectors
This is another example of linear ordinary differential operators with
non-commutative multiplication. Unlike the rational function case,
the differential ring of square matrices (of a given dimension) with
univariate polynomial entries does not form a field. Thus the number
of operations available is more limited.
In this section, the operators have three by three
matrix coefficients with polynomial entries.
PZ := UnivariatePolynomial(x,Integer)
|
Type: Domain
Type: UnivariatePolynomial(x,Integer)
Mat := SquareMatrix(3,PZ)
|
Type: Domain
The operators act on the vectors considered as a Mat-module.
Vect := DPMM(3, PZ, Mat, PZ)
|
Type: Domain
|
Type: Domain
The matrix m is used as a coefficient and the vectors p
and q are operated upon.
m:Mat := matrix [ [x**2,1,0],[1,x**4,0],[0,0,4*x**2] ]
Type: SquareMatrix(3,UnivariatePolynomial(x,Integer))
p:Vect := directProduct [3*x**2+1,2*x,7*x**3+2*x]
Type:
DirectProductMatrixModule(3,
UnivariatePolynomial(x,Integer),
SquareMatrix(3,UnivariatePolynomial(x,Integer)),
UnivariatePolynomial(x,Integer))
|
Type:
DirectProductMatrixModule(3,
UnivariatePolynomial(x,Integer),
SquareMatrix(3,UnivariatePolynomial(x,Integer)),
UnivariatePolynomial(x,Integer))
Now form a few operators.
Type:
LinearOrdinaryDifferentialOperator2(
SquareMatrix(3,UnivariatePolynomial(x,Integer)),
DirectProductMatrixModule(3,
UnivariatePolynomial(x,Integer),
SquareMatrix(3,UnivariatePolynomial(x,Integer)),
UnivariatePolynomial(x,Integer)))
Type:
LinearOrdinaryDifferentialOperator2(
SquareMatrix(3,UnivariatePolynomial(x,Integer)),
DirectProductMatrixModule(3,
UnivariatePolynomial(x,Integer),
SquareMatrix(3,
UnivariatePolynomial(x,Integer)),
UnivariatePolynomial(x,Integer)))
|
Type:
LinearOrdinaryDifferentialOperator2(
SquareMatrix(3,
UnivariatePolynomial(x,Integer)),
DirectProductMatrixModule(3,
UnivariatePolynomial(x,Integer),
SquareMatrix(3,
UnivariatePolynomial(x,Integer)),
UnivariatePolynomial(x,Integer)))
|
Type:
LinearOrdinaryDifferentialOperator2(
SquareMatrix(3,
UnivariatePolynomial(x,Integer)),
DirectProductMatrixModule(3,
UnivariatePolynomial(x,Integer),
SquareMatrix(3,
UnivariatePolynomial(x,Integer)),
UnivariatePolynomial(x,Integer)))
These operators can be applied to vector values.
|
Type:
DirectProductMatrixModule(3,
UnivariatePolynomial(x,Integer),
SquareMatrix(3,
UnivariatePolynomial(x,Integer)),
UnivariatePolynomial(x,Integer))
|
Type:
DirectProductMatrixModule(3,
UnivariatePolynomial(x,Integer),
SquareMatrix(3,
UnivariatePolynomial(x,Integer)),
UnivariatePolynomial(x,Integer))
|
Type:
DirectProductMatrixModule(3,
UnivariatePolynomial(x,Integer),
SquareMatrix(3,
UnivariatePolynomial(x,Integer)),
UnivariatePolynomial(x,Integer))