simplify/siderels - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Algebra : Expression Manipulation : Simplifying : simplify/siderels

simplify/siderels

simplify with respect to side relations

 

Calling Sequence

Parameters

Description

Examples

References

Calling Sequence

simplify(expr, eqns)

simplify(expr, eqns, vars)

simplify(expr, eqns, tord)

simplify(expr, eqns, 'mindeg')

Parameters

expr

-

expression

eqns

-

set or list of equations (an expression e is understood as the equation e=0)

vars

-

(optional) set or list of variables appearing in eqns

tord

-

(optional) a monomial order in the variables appearing in eqns

Description

• 

Simplification of expr with respect to the side relations eqns is performed. The result is an expression which is mathematically equivalent to expr but which is in normal form with respect to the specified side relations.

• 

In all cases simplify computes a Groebner basis for the set of side relations. This basis contains all the algebraic consequences of eqns, so that if an expression can be rewritten in terms of the relations simplify will reduce it to zero.  Otherwise, simplify returns a remainder in which none of the terms are reducible.

• 

To ensure a finite division process simplify imposes a total order on terms which can appear. This order, called a monomial order, is used for both the Groebner basis computation and the division.  The monomial order can be specified by an optional third argument, and different orders can drastically affect a non-zero result:

  

If a list of variables vars is specified then pure lexicographic (plex) order is used and the leftmost variables are eliminated first.

  

If a set of variables vars is given then a total degree (tdeg) order is used and terms with the highest degree in all the variables are eliminated first.  Terms with the same total degree are ordered heuristically.

  

If no third argument was specified then lexicographic order is used and variables appearing on the left hand side of any equation in eqns are eliminated first.

  

If a monomial order tord is specified then that order is used for all computations. See Groebner[MonomialOrders] for a list of the available monomial orders.

• 

If expr is a rational expression then one of three algorithms can be used. If a list or set of variables vars is specified or if the third argument is omitted then simplification is applied to the numerator and denominator separately. This method is very fast, however no attempt is made to simplify the ratio of the numerator and denominator so simpler representations of the fraction may be missed.

• 

If a monomial order tord is specified then the largest monomial appearing in the numerator and denominator is minimized with respect to tord. The result is a simplified canonical form with respect to the monomial order. Note that in some cases a common factor may be introduced to satisfy this requirement, as in example 2 below.  If the denominator is invertible or if it divides the numerator modulo the side relations then a quotient is computed and it is returned instead.

• 

The optional argument 'mindeg' minimizes the sum of the degrees of the resulting fraction. It uses a global search to find an equivalent fraction ab with dega+degb minimal. The result is not canonical, but in some cases the output may be preferable to a canonical form, as in example 3 below.  In general the search is exponential time in dega+degb.

• 

If the expression is neither a polynomial nor a rational function in the variables, simplify will recurse on the input expr and apply the normalization to any subexpressions which are rational functions in the variables.

Examples

Example 1: trigonometric polynomials

eqnssinx2+cosx2=1:

esinx311sinx2cosx+3cosx3sinxcosx+2

e:=sinx311sinx2cosx+3cosx3sinxcosx+2

(1)

simplifye,eqns

14cosx3cosx2sinxsinxcosx11cosx+sinx+2

(2)

simplifye,eqns,sinx,cosx

14cosx3cosx2sinxsinxcosx11cosx+sinx+2

(3)

simplifye,eqns,cosx,sinx

14sinx2cosx+sinx3sinxcosx+3cosx+2

(4)

f8sinx4cosx+15sinx2cosx315sinx2cosx+7cosx514cosx3+7cosx

f:=8sinx4cosx+15sinx2cosx315sinx2cosx+7cosx514cosx3+7cosx

(5)

simplifyf,eqns

0

(6)

r1cosx2+sinxcosxsinxcosx+cosx2

r:=1cosx2+sinxcosxsinxcosx+cosx2

(7)

simplifyr,eqns

cosx2sinxcosx1cosxsinx+cosx

(8)

simplifyr,eqns,'mindeg'

sinxcosx

(9)

Example 2: reducing fractions to a canonical form

eqns2xy5xy

eqns2:=xy5xy

(10)

ry5+x+yxy

r:=y5+x+yxy

(11)

simplifyr,eqns2,tdegx,y

x2+xy+x+yx2xy

(12)

simplifyr,eqns2,plexx,y

y9+y5y4y5+2

(13)

simplifyr,eqns2,'mindeg'

x2xyxyx2+xy

(14)

r2x3yx2x4yx3+2xy4+2y4+y5+x+yyx3x4+2xy44+xy

r2:=2xy4+y5x4x3y+2y4x3x2y+x+y2xy4x4+x3y+xy4

(15)

simplifyr2,eqns2

2xy4y5+x4+x3y2y4+x3+x2yxy2xy4+x4x3yx+y+4

(16)

simplifyr2,eqns2,tdegx,y

x2+xy+x+yx2xy

(17)

Example 3: the canonical form algorithm may increase total degree

eqns3x5+xy1

eqns3:=x5+xy1

(18)

rx3y3x4+x1x2y2+1

r:=x3y3x4+x1x2y2+1

(19)

simplifyr,eqns3,tdegx,y

xy4x3x2yy3+x2+xx4+x2y2x2

(20)

simplifyr,eqns3,'mindeg'

x3y3x4+x1x2y2+1

(21)

Example 4: the side relations define a field

eqns4z3z2zy+2y2=1,z3+y2=1,z2+zyy2=0,x+y=z

eqns4:=x+y=z,z3+y2=1,y2+yz+z2=0,z3+2y2yzz2=1

(22)

h136z4y2+36zy436zy21z22+zy1y22+1xz21xy2+2z43+4z3y32z2y234zy33+2y43

h1:=36z4y2+36zy436zy212z2+zy12y2+12xz12xy+23z4+43z3y23z2y243zy3+23y4

(23)

simplifyh1,eqns4

0

(24)

h2zy2+z3y33z2y+233+5z26+7zy311y26+1xz21xy2+2z43+4z3y32z2y234zy33+2y43

h2:=zy2+z3y33z2y+233+56z2+73zy116y2+12xz12xy+23z4+43z3y23z2y243zy3+23y4

(25)

simplifyh2,eqns4,x,y,z

34334z2y+14zy+16z2+13y+8z

(26)

simplifyh2,eqns4,lexdegx,z,y

293y52y2

(27)

h2invsimplify1h2,eqns4,tdegx,z,y

h2inv:=447375252342772565971+25254843342772565971y3+81538416042772565971y2+3688153242772565971zy+32140550742772565971y+23618399442772565971z

(28)

simplifyh2h2inv,eqns4

1

(29)

Example 5: a difficult example that can not be handled by other methods

eqns5y2x3+xy1

eqns5:=x3+xy+y21

(30)

algcurves[parametrization]opeqns5,x,y,t

Error, (in `algcurves/ratpar`) genus is not zero

ry3+12yx2x2y52xy2y6xy7+y6y32y2+1

r:=x2y5xy6y7+y62x2y2xy2y3+1y32y2+1

(31)

simplifyr,eqns5,tdegx,y

y5+x+yxy

(32)

References

  

Cox, D.; Little, J.; and O'Shea, D. Ideals, Varieties, and Algorithms. 2nd ed. Springer-Verlag, 1997.

  

Monagan, M., and Pearce, R. "Rational Simplification Modulo a Polynomial Ideal." ISSAC 2006 proceedings.

See Also

algcurves[parametrization]

Groebner[Basis]

Groebner[MonomialOrders]

Groebner[NormalForm]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam