Computer Algebra Commands 4-31
Example: Factorize the following:
x
2
5x 6++
Command: FACTOR(X^2+5*X+6)
Result: (X+2)(X+3)
See also: EXPAN, EXPAND
FACTORMOD
Type: Function
Description: Factorizes a polynomial modulo the current modulus. The modulus must be less than 100,
and a prime number, it can be changed by MODSTO.
Access: Arithmetic, !Þ MODULO
Input: The expression to be factorized.
Output: The factorized expression modulo the current modulus.
Flags: Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag -3 clear).
Radians mode must be set (flag –17 set).
Example: Factorize the following expression modulo 3.
x
2
+2
Command:
FACTORMOD(X^2+2)
Result: (X+1)*(X-1)
See also: MODSTO
FACTORS
Type: Command
Description: For a value or expression, returns a list of prime factors and their multiplicities.
Access: Arithmetic, !Þ
Input: A value or expression.
Output: A list of prime factors of the value or expression, with each factor followed by its multiplicity
expressed as a real number.
Flags: Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag -3 clear).
Radians mode must be set (flag –17 set).
Example 1: Find the prime factors of 100.
Command:
FACTORS(100)
Result: {5 2. 2 2.}
Example 2: Find the irreducible factors of:
x
2
4x 4++
Command:
FACTORS(X^2+4*X+4)
Result: {X+2,2.}
FCOEF
Type: Command
Description: From an array of roots and multiplicities/poles, returns a rational polynomial with a leading
coefficient of 1, with the specified set of roots or poles, and with the specified multiplicities.
Access: Arithmetic, !ÞPOLY L