normal -- normalize an
expression
Introductionnormal(f) returns the normal form of the
rational expression f. This is a rational expression with
expanded numerator and denominator whose greatest common divisor is
1.
normal(object) replaces the operands of
object by their normalized form.
Call(s)normal(f)
normal(object)
Parametersf |
- | an arithmetical expression |
object |
- | a polynomial of type
DOM_POLY, a list, a set, a table, an array, an equation, an inequality, or a range
|
Returnsan object of the same type as the input object.
object
Further
DocumentationChapter ``Manipulating Expressions'' of the Tutorial.
Related
Functionscollect, combine, denom, expand, factor, gcd, indets, numer, partfrac, rationalize, rectform, rewrite, simplify
Detailsf contains non-rational subexpressions
such as sin(x), x^(-1/3) etc., then these are
replaced by auxiliary variables before normalization. After
normalization, these variables are replaced by the normalization of the
original subexpressions. Algebraic dependencies of the subexpressions
are not taken into account. The operands of the non-rational
subexpressions are normalized recursively.normal is automatically mapped to
its operands. In particular, if object is a polynomial of
domain type DOM_POLY,
then its coefficients are normalized. Further, if object
is a set, a list, a table or an array, respectively, then
normal is applied to all entries. Further, the left hand
side and the right hand side of equations (type "_equal"),
inequalities (type "_unequal") and relations (type
"_less" or "_leequal") are normalized.
Further, the operands of ranges (type "_range") are
normalized automatically.
Example
1We compute the normal form of some rational expressions:
>> normal(x^2 - (x + 1)*(x - 1))
1
>> normal((x^2 - 1)/(x + 1))
x - 1
>> normal(1/(x + 1) + 1/(y - 1))
x + y
---------------
y - x + x y - 1
The following expression should be regarded as a
rational expression in the ``indeterminates'' y and
sin(x):
>> normal(1/sin(x)^2 + y/sin(x))
y sin(x) + 1
------------
2
sin(x)
Example
2In the following, we give examples of non-rational expressions as argument. First, we normalize the entries of a list:
>> [(x^2 - 1)/(x + 1), x^2 - (x + 1)*(x - 1)]
-- 2 --
| x - 1 2 |
| ------, x - (x - 1) (x + 1) |
-- x + 1 --
>> normal(%)
[x - 1, 1]
The coefficients of polynomials are normalized:
>> poly((x^2-1)/(x+1)*Y^2 + (x^2-(x+1)*(x-1))*Y - 1, [Y])
/ / 2 \ \
| | x - 1 | 2 2 |
poly| | ------ | Y + (x - (x - 1) (x + 1)) Y - 1, [Y] |
\ \ x + 1 / /
>> normal(%)
2
poly((x - 1) Y + Y - 1, [Y])