]>
Book Contents Previous Section 9.44 LinearOrdinaryDifferentialOperator Next Section 9.46 LinearOrdinaryDifferentialOperator2 Book Index

## 9.45 LinearOrdinaryDifferentialOperator1

LinearOrdinaryDifferentialOperator1(A) is the domain of linear ordinary differential operators with coefficients in the differential ring A.

### 9.45.1 Differential Operators with Rational Function Coefficients

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.

We begin by defining RFZ to be the rational functions in x with integer coefficients and Dx to be the differential operator for d/dx.

RFZ := Fraction UnivariatePolynomial('x, Integer)

FractionUnivariatePolynomial(x,Integer)

Type: Domain
x : RFZ := 'x

x

Type: Fraction UnivariatePolynomial(x,Integer)
Dx : LODO1 RFZ := D()

D

Type: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)

Operators are created using the usual arithmetic operations.

b : LODO1 RFZ := 3*x**2*Dx**2 + 2*Dx + 1/x

3 x 2 D 2+2 D+1 x

Type: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)
a : LODO1 RFZ := b*(5*x*Dx + 7)

15 x 3 D 3+(51 x 2+10 x)D 2+29 D+7 x

Type: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)

Operator multiplication corresponds to functional composition.

p := x**2 + 1/x**2

x 4+1 x 2

Type: Fraction UnivariatePolynomial(x,Integer)

Since operator coefficients depend on x, the multiplication is not commutative.

(a*b - b*a) p

-75 x 4+540 x-75 x 4

Type: Fraction UnivariatePolynomial(x,Integer)

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 leftDivide leftDivide LinearOrdinaryDifferentialOperator1 and rightDivide rightDivide LinearOrdinaryDifferentialOperator1 are quotient-remainder pairs satisfying:

leftDivide(a,b) = [q, r] such that a = b*q + r
rightDivide(a,b) = [q, r] such that a = q*b + r

In both cases, the degree degree LinearOrdinaryDifferentialOperator1 of the remainder, r, is less than the degree of b.

ld := leftDivide(a,b)

[quotient=5 x D+7,remainder=0]

Type: Record(quotient: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer), remainder: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer))
a = b * ld.quotient + ld.remainder

15 x 3 D 3+(51 x 2+10 x)D 2+29 D+7 x=15 x 3 D 3+(51 x 2+10 x)D 2+29 D+7 x

Type: Equation LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)

The operations of left and right division are so-called because the quotient is obtained by dividing a on that side by b.

rd := rightDivide(a,b)

[quotient=5 x D+7,remainder=10 D+5 x]

Type: Record(quotient: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer), remainder: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer))
a = rd.quotient * b + rd.remainder

15 x 3 D 3+(51 x 2+10 x)D 2+29 D+7 x=15 x 3 D 3+(51 x 2+10 x)D 2+29 D+7 x

Type: Equation LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)

Operations rightQuotient rightQuotient LinearOrdinaryDifferentialOperator1 and rightRemainder rightRemainder LinearOrdinaryDifferentialOperator1 are available if only one of the quotient or remainder are of interest to you. This is the quotient from right division.

rightQuotient(a,b)

5 x D+7

Type: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)

This is the remainder from right division. The corresponding ``left'' functions leftQuotient leftQuotient LinearOrdinaryDifferentialOperator1 and leftRemainder leftRemainder LinearOrdinaryDifferentialOperator1 are also available.

rightRemainder(a,b)

10 D+5 x

Type: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)

For exact division, the operations leftExactQuotient leftExactQuotient LinearOrdinaryDifferentialOperator1 and rightExactQuotient rightExactQuotient LinearOrdinaryDifferentialOperator1 are supplied. These return the quotient but only if the remainder is zero. The call rightExactQuotient(a,b) would yield an error.

leftExactQuotient(a,b)

5 x D+7

Type: Union(LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer),...)

The division operations allow the computation of left and right greatest common divisors (leftGcd leftGcd LinearOrdinaryDifferentialOperator1 and rightGcd rightGcd LinearOrdinaryDifferentialOperator1) via remainder sequences, and consequently the computation of left and right least common multiples (rightLcm rightLcm LinearOrdinaryDifferentialOperator1 and leftLcm leftLcm LinearOrdinaryDifferentialOperator1).

e := leftGcd(a,b)

3 x 2 D 2+2 D+1 x

Type: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)

Note that a greatest common divisor doesn't necessarily divide a and b on both sides. Here the left greatest common divisor does not divide a on the right.

leftRemainder(a, e)

0

Type: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)
rightRemainder(a, e)

10 D+5 x

Type: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)

Similarly, a least common multiple is not necessarily divisible from both sides.

f := rightLcm(a,b)

15 x 3 D 3+(51 x 2+10 x)D 2+29 D+7 x

Type: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)

rightRemainder(f, b)

10 D+5 x

Type: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)

leftRemainder(f, b)

0

Type: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)
Book Contents Previous Section 9.44 LinearOrdinaryDifferentialOperator Next Section 9.46 LinearOrdinaryDifferentialOperator2 Book Index