Continuo da qui, copio dal Reference Manual, PDF scaricabile da qui, sono a p.276.

`gcdex (f, g)`

`gcdex (f, g, x)`

Returns a list ** [a, b, u]** where

**is the greatest common divisor (gcd) of**

`u`

**and**

`f`

**, and**

`g`

**is equal to a**

`u`

**. The arguments**

`f + b g`

**and**

`f`

**should be univariate polynomials, or else polynomials in**

`g`

**a supplied main variable since we need to be in a principal ideal domain for this to work. The gcd means the**

`x`

**regarding**

`gcd`

**and**

`f`

**as univariate polynomials with coefficients being rational functions in the other variables.**

`g`

** gcdex** implements the Euclidean algorithm, where we have a sequence of

**which are all perpendicular to**

`L[i]: [a[i], b[i], r[i]]`

**and the next one is built as if**

`[f, g, -1]`

**then**

`q = quotient(r[i]/r[i+1])`

**, and it terminates at**

`L[i+2]: L[i] - q L[i+1]`

**when the remainder**

`L[i+1]`

**is zero.**

`r[i+2]`

The arguments ** f** and

**can be integers. For this case the function**

`g`

**is called by**

`igcdex`

**.**

`gcdex`

See also ** ezgcd**,

**,**

`gcd`

**, and**

`gcdivide`

**.**

`poly_gcd`

`(%i1) `**gcdex (x^2 + 1, x^3 + 4);**
2
x + 4 x - 1 x + 4
(%o1)/R/ [- ------------, -----, 1]
17 17
(%i2) **% . [x^2 + 1, x^3 + 4, -1];**
(%o2)/R/ 0

Note that the gcd in the following is ** 1** since we work in

**, not the**

`k(y)[x]`

**we would expect in**

`y+1`

**.**

`k[y, x]`

`(%i3) `**gcdex (x*(y + 1), y^2 - 1, x);**
1
(%o3)/R/ [0, ------, 1]
2
y - 1

`gcfactor (n)`

Factors the Gaussian integer ** n** over the Gaussian integers, i.e., numbers of the form

**where**

`a + b %i`

**and**

`a`

**are rational integers (i.e., ordinary integers). Factors are normalized by making**

`b`

**and**

`a`

**non-negative.**

`b`

`gcfactor (expr)`

Factors the polynomial ** expr** over the Gaussian integers (that is, the integers with the imaginary unit

**adjoined). This is like**

`%i`

**where**

`factor(expr, a^2+1)`

**is**

`a`

**.**

`%i`

`(%i4) `**gfactor (x^4 - 1);**
(%o4) (x - 1) (x + 1) (x - %i) (x + %i)

`gfactorsum (expr)`

is similar to ** factorsum** but applies

**instead of**

`gfactor`

**.**

`factor`

`hipow (expr, x)`

Returns the highest explicit exponent of ** x** in

**.**

`expr`

**may be a variable or a general expression. If**

`x`

**does not appear in**

`x`

**,**

`expr`

**returns**

`hipow`

**.**

`0`

** hipow** does not consider expressions equivalent to

**. In particular,**

`expr`

**does not expand**

`hipow`

**, so**

`expr`

**and**

`hipow(expr, x)`

**may yield different results.**

`hipow(expand(expr, x))`

`(%i5) `**hipow (y^3 * x^2 + x * y^4, x);**
(%o5) 2
(%i6) **hipow ((x + y)^5, x);**
(%o6) 1
(%i7) **hipow (expand ((x + y)^5), x);**
(%o7) 5
(%i8) **hipow (expand ((x + y)^5), x + y);**
(%o8) 0

`intfaclim`

Default value: ** true**.

If ** true**, maxima will give up factorization of integers if no factor is found after trial divisions and Pollard’s rho method and factorization will not be complete.

When ** intfaclim** is

**(this is the case when the user calls**

`false`

**explicitly), complete factorization will be attempted.**

`factor`

**is set to false when factors are computed in**

`intfaclim`

**,**

`divisors`

**and**

`divsum`

**.**

`totient`

Internal calls to ** factor** respect the user-specified value of

**. Setting**

`intfaclim`

**to**

`intfaclim`

**may reduce the time spent factoring large integers.**

`true`

`keepfloat`

Default value: ** false**.

When ** keepfloat** is

**, prevents floating point numbers from being rationalized when expressions which contain them are converted to canonical rational expression (CRE) form.**

`true`

Note that the function ** solve** and those functions calling it (

**, for example) currently ignore this flag, converting floating point numbers anyway.**

`eigenvalues`

`(%i9) `**rat(x/2.0);**
rat: replaced 0.5 by 1/2 = 0.5
x
(%o9)/R/ -
2
(%i10) **rat(x/2.0), keepfloat;**
(%o10)/R/ 0.5 x

** solve** ignores

**:**

`keepfloat`

`(%i11) `**solve(1.0-x,x), keepfloat;**
rat: replaced 1.0 by 1/1 = 1.0
(%o11) [x = 1]

`lopow (expr, x)`

Returns the lowest exponent of ** x** which explicitly appears in

**.**

`expr`

`(%i12) `**lopow ((x+y)^2 + (x+y)^a, x+y);**
(%o12) min(2, a)

`lratsubst (L, expr)`

is analogous to ** subst(L, expr)** except that it uses

**instead of**

`ratsubst`

**.**

`subst`

The first argument of ** lratsubst** is an equation or a list of equations identical in format to that accepted by

**. The substitutions are made in the order given by the list of equations, that is, from left to right.**

`subst`

** load("lrats")** loads

**and**

`fullratsubst`

**.**

`lratsubst`

`(%i13) `**load ("lrats")$**

** subst** can carry out multiple substitutions.

**is analogous to**

`lratsubst`

**.**

`subst`

`(%i14) `**subst ([a = b, c = d], a + c);**
(%o14) d + b
(%i15) **lratsubst ([a^2 = b, c^2 = d], (a + e)*c*(a + c));**
(%o15) (d + a c) e + a d + b c

If only one substitution is desired, then a single equation may be given as first argument.

`(%i16) `**lratsubst (a^2 = b, a^3);**
(%o16) a b

`modulus`

Default value: ** false**.

When ** modulus** is a positive number

**, operations on rational numbers (as returned by**

`p`

**and related functions) are carried out modulo**

`rat`

**, using the so-called “balanced” modulus system in which**

`p`

**modulo p is defined as an integer**

`n`

**in**

`k`

**when**

`[-(p-1)/2, ..., 0, ..., (p-1)/2]`

**is odd, or**

`p`

**when**

`[-(p/2 - 1), ..., 0, ...., p/2]`

**is even, such that**

`p`

**equals**

`a p + k`

**for some integer**

`n`

**.**

`a`

If ** expr** is already in canonical rational expression (CRE) form when modulus is reset, then you may need to re-

**, e.g.,**

`rat expr`

**, in order to get correct results.**

`expr: rat (ratdisrep (expr))`

Typically ** modulus** is set to a prime number. If modulus is set to a positive non-prime integer, this setting is accepted, but a warning message is displayed. Maxima signals an error, when zero or a negative integer is assigned to modulus.

`(%i17) `**modulus:7;**
(%o17) 7
(%i18) **polymod([0,1,2,3,4,5,6,7]);**
(%o18) [0, 1, 2, 3, - 3, - 2, - 1, 0]
(%i19) **modulus:false;**
(%o19) false
(%i20) **poly:x^6+x^2+1;**
6 2
(%o20) x + x + 1
(%i21) **factor(poly);**
6 2
(%o21) x + x + 1
(%i22) **modulus:13;**
(%o22) 13
(%i23) **factor(poly);**
2 4 2
(%o23) (x + 6) (x - 6 x - 2)
(%i24) **polymod(%);**
6 2
(%o24) x + x + 1

⭕