divide - Maple Programming Help

divide

exact polynomial division

 Calling Sequence divide(a, b, 'q')

Parameters

 a, b - polynomials with rational number coefficients q - (optional) unevaluated name

Description

 • divide checks if the polynomial b divides a over the rationals. If so, true is returned; otherwise false is returned.
 • If the division is successful and there is a third argument 'q', then the value of the quotient is assigned to q. In the case of an unsuccessful division the name q will not be affected.

Examples

 > $\mathrm{divide}\left({x}^{3}+5x-1,x+1,'q'\right)$
 ${\mathrm{false}}$ (1)
 > $q$
 ${q}$ (2)
 > $\mathrm{divide}\left({x}^{3}-{y}^{3},x-y,'q'\right)$
 ${\mathrm{true}}$ (3)
 > $q$
 ${{x}}^{{2}}{+}{y}{}{x}{+}{{y}}^{{2}}$ (4)