9.60 OrderlyDifferentialPolynomialΒΆ

Many systems of differential equations may be transformed to equivalent systems of ordinary differential equations where the equations are expressed polynomially in terms of the unknown functions. In FriCAS, the domain constructors OrderlyDifferentialPolynomial (abbreviated ODPOL) and SequentialDifferentialPolynomial (abbreviation 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, FriCAS can handle ordinary differential polynomials over a field of rational functions in a single indeterminate.

The two domains ODPOL and 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, DifferentialSparseMultivariatePolynomial (abbreviation DSMP) allows both a user-provided list of differential indeterminates as well as a user-defined ranking. We shall illustrate ODPOL(FRAC INT), which constructs a domain of ordinary differential polynomials in an arbitrary number of differential indeterminates with rational numbers as coefficients.

dpol:= ODPOL(FRAC INT)
\[\]
OrderlyDifferentialPolynomialFractionInteger

Type: Domain

A differential indeterminate w may be viewed as an infinite sequence of algebraic indeterminates, which are the derivatives of w. To facilitate referencing these, FriCAS provides the operation makeVariablemakeVariableOrderlyDifferentialPolynomial to convert an element of type Symbol to a map from the natural numbers to the differential polynomial ring.

w := makeVariable('w)$dpol
\[\]
theMap(...)

Type: (NonNegativeInteger -> OrderlyDifferentialPolynomial Fraction Integer)

z := makeVariable('z)$dpol
\[\]
theMap(...)

Type: (NonNegativeInteger -> OrderlyDifferentialPolynomial Fraction Integer)

The fifth derivative of w can be obtained by applying the map w to the number 5. Note that the order of differentiation is given as a subscript (except when the order is 0).

w.5
\[\]
w5

Type: OrderlyDifferentialPolynomial Fraction Integer

w 0
\[\]
w

Type: OrderlyDifferentialPolynomial Fraction Integer

The first five derivatives of z can be generated by a list.

[z.i for i in 1..5]
\[\]
[z1,z2,z3,z4,z5]

Type: List OrderlyDifferentialPolynomial Fraction Integer

The usual arithmetic can be used to form a differential polynomial from the derivatives.

f:= w.4 - w.1 * w.1 * z.3
\[\]
w4-w12z3

Type: OrderlyDifferentialPolynomial Fraction Integer

g:=(z.1)^3 * (z.2)^2 - w.2
\[\]
z13z22-w2

Type: OrderlyDifferentialPolynomial Fraction Integer

The operation DDOrderlyDifferentialPolynomial computes the derivative of any differential polynomial.

D(f)
\[\]
w5-w12z4-2w1w2z3

Type: OrderlyDifferentialPolynomial Fraction Integer

The same operation can compute higher derivatives, like the fourth derivative.

D(f,4)
\[\]
w8-w12z7-8w1w2z6+(-12w1w3-12w22)z5-2w1z3w5+(-8w1w4-24w2w3)z4-8w2z3w4-6w32z3

Type: OrderlyDifferentialPolynomial Fraction Integer

The operation makeVariablemakeVariableOrderlyDifferentialPolynomial creates a map to facilitate referencing the derivatives of f, similar to the map w.

df:=makeVariable(f)$dpol
\[\]
theMap(...)

Type: (NonNegativeInteger -> OrderlyDifferentialPolynomial Fraction Integer)

The fourth derivative of f may be referenced easily.

df.4
\[\]
w8-w12z7-8w1w2z6+(-12w1w3-12w22)z5-2w1z3w5+(-8w1w4-24w2w3)z4-8w2z3w4-6w32z3

Type: OrderlyDifferentialPolynomial Fraction Integer

The operation orderorderOrderlyDifferentialPolynomial returns the order of a differential polynomial, or the order in a specified differential indeterminate.

order(g)
\[\]
2

Type: PositiveInteger

order(g, 'w)
\[\]
2

Type: PositiveInteger

The operation differentialVariablesdifferentialVariablesOrderlyDifferentialPolynomial returns a list of differential indeterminates occurring in a differential polynomial.

differentialVariables(g)
\[\]
[z,w]

Type: List Symbol

The operation degreedegreeOrderlyDifferentialPolynomial returns the degree, or the degree in the differential indeterminate specified.

degree(g)
\[\]
z22z13

Type: IndexedExponents OrderlyDifferentialVariable Symbol

degree(g, 'w)
\[\]
1

Type: PositiveInteger

The operation weightsweightsOrderlyDifferentialPolynomial returns a list of weights of differential monomials appearing in differential polynomial, or a list of weights in a specified differential indeterminate.

weights(g)
\[\]
[7,2]

Type: List NonNegativeInteger

weights(g,'w)
\[\]
[2]

Type: List NonNegativeInteger

The operation weightweightOrderlyDifferentialPolynomial returns the maximum weight of all differential monomials appearing in the differential polynomial.

weight(g)
\[\]
7

Type: PositiveInteger

A differential polynomial is isobaric if the weights of all differential monomials appearing in it are equal.

isobaric?(g)
\[\]
false

Type: Boolean

To substitute differentially, use evalevalOrderlyDifferentialPolynomial. Note that we must coerce ‘w to Symbol, since in ODPOL, differential indeterminates belong to the domain Symbol. Compare this result to the next, which substitutes algebraically (no substitution is done since w.0 does not appear in g).

eval(g,['w::Symbol],[f])
\[\]
-w6+w12z5+4w1w2z4+(2w1w3+2w22)z3+z13z22

Type: OrderlyDifferentialPolynomial Fraction Integer

eval(g,variables(w.0),[f])
\[\]
z13z22-w2

Type: OrderlyDifferentialPolynomial Fraction Integer

Since OrderlyDifferentialPolynomial belongs to PolynomialCategory, all the operations defined in the latter category, or in packages for the latter category, are available.

monomials(g)
\[\]
[z13z22,-w2]

Type: List OrderlyDifferentialPolynomial Fraction Integer

variables(g)
\[\]
[z2,w2,z1]

Type: List OrderlyDifferentialVariable Symbol

gcd(f,g)
\[\]
1

Type: OrderlyDifferentialPolynomial Fraction Integer

groebner([f,g])
\[\]
[w4-w12z3,z13z22-w2]

Type: List OrderlyDifferentialPolynomial Fraction Integer

The next three operations are essential for elimination procedures in differential polynomial rings. The operation leaderleaderOrderlyDifferentialPolynomial returns the leader of a differential polynomial, which is the highest ranked derivative of the differential indeterminates that occurs.

lg:=leader(g)
\[\]
z2

Type: OrderlyDifferentialVariable Symbol

The operation separantseparantOrderlyDifferentialPolynomial returns the separant of a differential polynomial, which is the partial derivative with respect to the leader.

sg:=separant(g)
\[\]
2z13z2

Type: OrderlyDifferentialPolynomial Fraction Integer

The operation initialinitialOrderlyDifferentialPolynomial returns the initial, which is the leading coefficient when the given differential polynomial is expressed as a polynomial in the leader.

ig:=initial(g)
\[\]
z13

Type: OrderlyDifferentialPolynomial Fraction Integer

Using these three operations, it is possible to reduce f modulo the differential ideal generated by g. The general scheme is to first reduce the order, then reduce the degree in the leader. First, eliminate z.3 using the derivative of g.

g1 := D g
\[\]
2z13z2z3-w3+3z12z23

Type: OrderlyDifferentialPolynomial Fraction Integer

Find its leader.

lg1:= leader g1
\[\]
z3

Type: OrderlyDifferentialVariable Symbol

Differentiate f partially with respect to this leader.

pdf:=D(f, lg1)
\[\]
-w12

Type: OrderlyDifferentialPolynomial Fraction Integer

Compute the partial remainder of f with respect to g.

prf:=sg * f- pdf * g1
\[\]
2z13z2w4-w12w3+3w12z12z23

Type: OrderlyDifferentialPolynomial Fraction Integer

Note that high powers of lg still appear in prf. Compute the leading coefficient of prf as a polynomial in the leader of g.

lcf:=leadingCoefficient univariate(prf, lg)
\[\]
3w12z12

Type: OrderlyDifferentialPolynomial Fraction Integer

Finally, continue eliminating the high powers of lg appearing in prf to obtain the (pseudo) remainder of f modulo g and its derivatives.

ig * prf - lcf * g * lg
\[\]
2z16z2w4-w12z13w3+3w12z12w2z2

Type: OrderlyDifferentialPolynomial Fraction Integer