 quorem - Maple Help

MTM

 quorem
 polynomial quotient and remainder Calling Sequence q, r := quorem(A, B) q, r := quorem(A, B, x) Parameters

 A - expression or array B - expression or array q - variable r - variable x - (optional) variable Description

 • The quorem(A,B,x) function computes the element-wise quotient and remainder of A and B. Each expression in A and B is interpreted as a polynomial of x.
 • If the optional argument x is omitted, then x is equal to findsym(A,1) if findsym(A,1) is not empty. Otherwise, x is equal to findsym(B,1) if findsym(B,1) is not empty. Otherwise, each expression in A and B must evaluate to an integer.  In this last case, the quorem(A,B) function computes the element-wise integer quotient and remainder of A and B.
 • If A is a scalar, then A is divided by each element of B.
 • If B is a scalar, then each element of A is divided by B.
 • When both and A and B are non-scalar, they must be the same size. Examples

 > $\mathrm{with}\left(\mathrm{MTM}\right):$
 > $A≔\mathrm{Matrix}\left(2,3,'\mathrm{fill}'=108xy{z}^{2}+{y}^{3}\right):$
 > $B≔\mathrm{Matrix}\left(2,3,'\mathrm{fill}'=27xy\right):$
 > $\mathrm{quorem}\left(A,B\right)$
 $\left[\begin{array}{ccc}{4}{}{{z}}^{{2}}& {4}{}{{z}}^{{2}}& {4}{}{{z}}^{{2}}\\ {4}{}{{z}}^{{2}}& {4}{}{{z}}^{{2}}& {4}{}{{z}}^{{2}}\end{array}\right]$ (1)
 > $q,r≔\mathrm{quorem}\left(⟨{x}^{3}-10{x}^{2}+31x-30,{x}^{2}-1⟩,⟨{x}^{3}-12{x}^{2}+41x-42,{x}^{2}+2x+1⟩\right):$
 > $q$
 $\left[\begin{array}{c}{1}\\ {1}\end{array}\right]$ (2)
 > $r$
 $\left[\begin{array}{c}{2}{}{{x}}^{{2}}{-}{10}{}{x}{+}{12}\\ {-}{2}{}{x}{-}{2}\end{array}\right]$ (3)
 > $q,r≔\mathrm{quorem}\left(⟨⟨56,23⟩|⟨45,24⟩⟩,⟨⟨2,7⟩|⟨5,0⟩⟩\right)$
 ${q}{,}{r}{≔}\left[\begin{array}{cc}{28}& {9}\\ {3}& {\mathrm{\infty }}\end{array}\right]{,}\left[\begin{array}{cc}{0}& {0}\\ {2}& {\mathrm{undefined}}\end{array}\right]$ (4)
 > $q$
 $\left[\begin{array}{cc}{28}& {9}\\ {3}& {\mathrm{\infty }}\end{array}\right]$ (5)
 > $r$
 $\left[\begin{array}{cc}{0}& {0}\\ {2}& {\mathrm{undefined}}\end{array}\right]$ (6)
 > $q,r≔\mathrm{quorem}\left({x}^{2}+y,{y}^{2}+x,x\right):$
 > $q$
 ${-}{{y}}^{{2}}{+}{x}$ (7)
 > $r$
 ${{y}}^{{4}}{+}{y}$ (8)
 > $q,r≔\mathrm{quorem}\left({x}^{2}+y,{y}^{2}+x,y\right):$
 > $q$
 ${0}$ (9)
 > $r$
 ${{x}}^{{2}}{+}{y}$ (10)