remainder of polynomials - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Numerical Computations : Maple Numerics : Operators : rem

rem - remainder of polynomials

quo - quotient of polynomials

Calling Sequence

rem(a, b, x)

rem(a, b, x, 'q')

quo(a, b, x)

quo(a, b, x, 'r')

Parameters

a, b

-

polynomials in x

x

-

name

'q', 'r'

-

(optional) unevaluated names

Description

• 

The rem function returns the remainder of a divided by b. The quo function returns the quotient of a divided by b. The remainder r and quotient q satisfy: a&equals;bq&plus;r  where degreer&comma;x<degreeb&comma;x.

• 

If a fourth argument is included in the calling sequence for rem or quo, it will be assigned the quotient q or remainder r, respectively.

Examples

dividex3&plus;x&plus;1&comma;x2&plus;x&plus;1

false

(1)

quox3&plus;x&plus;1&comma;x2&plus;x&plus;1&comma;x

x1

(2)

r1:=remx3&plus;x&plus;1&comma;x2&plus;x&plus;1&comma;x&comma;&apos;q1&apos;

r1:=2&plus;x

(3)

q1

x1

(4)

a:=x2&plus;x&plus;1q1&plus;r1

a:=x2&plus;x&plus;1x1&plus;2&plus;x

(5)

simplifya

x3&plus;x&plus;1

(6)

q2:=quox43x&plus;2&comma;x2x1&comma;x&comma;&apos;r2&apos;

q2:=x2&plus;x&plus;2

(7)

r2

4

(8)

q2&plus;r2x2x1

x2&plus;x&plus;2&plus;4x2x1

(9)

simplify

x43x&plus;2x2x1

(10)

See Also

divide, frem, iquo, irem, prem, Quo, Rem, sprem


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