quo - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

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=bq+r$  where $\mathrm{degree}\left(r,x\right)<\mathrm{degree}\left(b,x\right)$.
 • 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

 > $\mathrm{divide}\left({x}^{3}+x+1,{x}^{2}+x+1\right)$
 ${\mathrm{false}}$ (1)
 > $\mathrm{quo}\left({x}^{3}+x+1,{x}^{2}+x+1,x\right)$
 ${x}{-}{1}$ (2)
 > $\mathrm{r1}≔\mathrm{rem}\left({x}^{3}+x+1,{x}^{2}+x+1,x,'\mathrm{q1}'\right)$
 ${\mathrm{r1}}{≔}{x}{+}{2}$ (3)
 > $\mathrm{q1}$
 ${x}{-}{1}$ (4)
 > $a≔\left({x}^{2}+x+1\right)\mathrm{q1}+\mathrm{r1}$
 ${a}{≔}\left({{x}}^{{2}}{+}{x}{+}{1}\right){}\left({x}{-}{1}\right){+}{x}{+}{2}$ (5)
 > $\mathrm{simplify}\left(a\right)$
 ${{x}}^{{3}}{+}{x}{+}{1}$ (6)
 > $\mathrm{q2}≔\mathrm{quo}\left({x}^{4}-3x+2,{x}^{2}-x-1,x,'\mathrm{r2}'\right)$
 ${\mathrm{q2}}{≔}{{x}}^{{2}}{+}{x}{+}{2}$ (7)
 > $\mathrm{r2}$
 ${4}$ (8)
 > $\mathrm{q2}+\frac{\mathrm{r2}}{{x}^{2}-x-1}$
 ${{x}}^{{2}}{+}{x}{+}{2}{+}\frac{{4}}{{{x}}^{{2}}{-}{x}{-}{1}}$ (9)
 > $\mathrm{simplify}\left(\right)$
 $\frac{{{x}}^{{4}}{-}{3}{}{x}{+}{2}}{{{x}}^{{2}}{-}{x}{-}{1}}$ (10)