Introductory examples:
>
|
|
>
|
|
>
|
|
>
|
|
| (4) |
>
|
|
| (5) |
When a name is passed as the fourth argument to Quotient or Remainder, it will be assigned the value of the remainder or quotient, respectively.
>
|
|
>
|
|
>
|
|
The input may contain both radicals and RootOfs, and Quotient and Remainder will embed the coefficients into an algebraic field, if possible:
>
|
|
>
|
|
| (10) |
Nested and mixed radicals are handled as well:
>
|
|
>
|
|
The input must contain univariate polynomials only. Multiple variables are not supported and an error will be returned:
>
|
|
This function does not compute quotients and remainders over the integers. Use iquo and irem for that functionality:
>
|
|
>
|
|
A polynomial will always be exactly divisible by any invertible, non-zero constant, so the remainder in such a case will always be zero:
>
|
|
| (15) |
>
|
|
>
|
|
>
|
|
The input can also be treated as a pair of polynomials in a non-algebraic sub-expression such as , as it will be frozen and temporarily replaced by a new local variable:
>
|
|
Other non-algebraic sub-expressions can only be included if they can be converted to algebraic numbers:
>
|
|
>
|
|
Rational functions are generally not accepted, but polynomials disguised as rational functions are allowed, because they will be simplified by Normal:
>
|
|
>
|
|
The output will always be fully reduced and normalized (see Reduce, Normal):
>
|
|
| (20) |
Non-algebraic sub-expressions in the input may become algebraic after being recursively normalized:
>
|
|
Floats are not accepted.
>
|
|
Algebraic functions such as are not accepted:
>
|
|
When non-indexed RootOfs are given in the input, often the quotient and remainder can still be determined and expressed in terms of them:
>
|
|
| (22) |
>
|
|
| (23) |
However, in the following case, Quotient and Remainder are unable to compute the quotient and remainder because they must know whether represents or when no index is given. In such a case, they will return a "reducible RootOf detected" error:
>
|
|
>
|
|
>
|
|
By using option 'symbolic' = true, Quotient and Remainder can be instructed to automatically select one of the possible substitutions and complete the computation. Here, they pick :
>
|
|
An error will also be returned if the second argument contains a zero divisor. Again, option 'symbolic' = true will force Quotient and Remainder to select one of the possibilities:
>
|
|
>
|
|
Using option 'characteristic', quotients and remainders can be computed over finite fields:
>
|
|
>
|
|
>
|
|
In composite characteristic, quotients and remainders cannot always be computed. Quotient and Remainder will return errors if they encounter a zero divisor:
>
|
|
>
|
|
With option 'makeindependent'=true, the input will be checked for algebraic dependencies even if there are more than algebraic objects in the input:
>
|
|
| (32) |
>
|
|
| (33) |
>
|
|
| (34) |
>
|
|
| (35) |
>
|
|
| (36) |
>
|
|
| (37) |
>
|
|
| (38) |
>
|
|
With option 'makeindependent'=false, the input will never be checked for algebraic dependencies:
>
|
|
>
|
|
| (41) |