SNAP - Maple Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Mathematics : Numerical Computations : SNAP Package : SNAP/Quotient

SNAP

 Quotient
 compute the quotient of polynomial division
 Remainder
 compute the remainder of polynomial division

 Calling Sequence Quotient(a, b, x, 'r') Remainder(a, b, x, 'q')

Parameters

 a, b - univariate numeric polynomials in x x - name; indeterminate for a and b 'r', 'q' - (optional) unevaluated names; assigned remainder and quotient, respectively

Description

 • The Quotient command returns the numeric quotient of a divided by b.
 • The Remainder command returns the numeric remainder of a divided by b.
 • The numeric remainder r and numeric quotient q satisfy: $-bq+a-r$  is small with $\mathrm{degree}\left(r,x\right)<\mathrm{degree}\left(b,x\right)$. Here, small means $\mathrm{O}\left({10}^{-\mathrm{Digits}}\right)$.
 • If a fourth argument is included in the calling sequence for Quotient or Remainder, it is assigned the remainder r or quotient q, respectively.

Examples

 > $\mathrm{with}\left(\mathrm{SNAP}\right):$
 > $a≔-85{x}^{17}-55{x}^{9}-37{x}^{7}-35{x}^{2}+97x+50:$
 > $b≔79{x}^{5}+56{x}^{4}+49{x}^{3}+63{x}^{2}+57x-59:$
 > $r≔\mathrm{Remainder}\left(a,b,x,'q'\right)$
 ${r}{:=}{50.0020132327866}{}{{x}}^{{4}}{-}{19.3198166346740}{}{{x}}^{{3}}{-}{322.237747865981}{}{{x}}^{{2}}{+}{300.078717373004}{}{x}{+}{20.0352085974539}$ (1)
 > $q$
 ${-}{1.07594936708861}{}{{x}}^{{12}}{+}{0.762698285531165}{}{{x}}^{{11}}{+}{0.126714113893626}{}{{x}}^{{10}}{+}{0.295146883006482}{}{{x}}^{{9}}{-}{0.119722722703335}{}{{x}}^{{8}}{-}{1.55310796081941}{}{{x}}^{{7}}{+}{1.41800886004233}{}{{x}}^{{6}}{-}{0.0646951159943636}{}{{x}}^{{5}}{+}{0.0154956351481737}{}{{x}}^{{4}}{-}{0.0704903789877340}{}{{x}}^{{3}}{-}{2.55944186458305}{}{{x}}^{{2}}{+}{2.95135053578343}{}{x}{-}{0.507877820382137}$ (2)
 > $q≔\mathrm{Quotient}\left(a,b,x\right)$
 ${q}{:=}{-}{1.07594936708861}{}{{x}}^{{12}}{+}{0.762698285531165}{}{{x}}^{{11}}{+}{0.126714113893626}{}{{x}}^{{10}}{+}{0.295146883006482}{}{{x}}^{{9}}{-}{0.119722722703335}{}{{x}}^{{8}}{-}{1.55310796081941}{}{{x}}^{{7}}{+}{1.41800886004233}{}{{x}}^{{6}}{-}{0.0646951159943636}{}{{x}}^{{5}}{+}{0.0154956351481737}{}{{x}}^{{4}}{-}{0.0704903789877340}{}{{x}}^{{3}}{-}{2.55944186458305}{}{{x}}^{{2}}{+}{2.95135053578343}{}{x}{-}{0.507877820382137}$ (3)
 > $\mathrm{expand}\left(a-bq-r\right)$
 ${-}{7.10542735760100}{}{{10}}^{{-14}}{}{{x}}^{{16}}{+}{5.32907051820075}{}{{10}}^{{-15}}{}{{x}}^{{15}}{-}{5.68434188608080}{}{{10}}^{{-14}}{}{{x}}^{{14}}{-}{7.63833440942108}{}{{10}}^{{-14}}{}{{x}}^{{13}}{-}{2.84217094304040}{}{{10}}^{{-14}}{}{{x}}^{{12}}{-}{1.42108547152020}{}{{10}}^{{-14}}{}{{x}}^{{11}}{-}{5.86197757002083}{}{{10}}^{{-14}}{}{{x}}^{{10}}{-}{3.01980662698043}{}{{10}}^{{-14}}{}{{x}}^{{8}}{-}{8.52651282912120}{}{{10}}^{{-14}}{}{{x}}^{{6}}{-}{9.94759830064140}{}{{10}}^{{-14}}{}{{x}}^{{5}}{-}{5.68434188608080}{}{{10}}^{{-14}}{}{{x}}^{{17}}{+}{2.84217094304040}{}{{10}}^{{-14}}{}{{x}}^{{7}}{-}{7.81597009336110}{}{{10}}^{{-14}}{}{{x}}^{{9}}{+}{2.84217094304040}{}{{10}}^{{-14}}{}{x}$ (4)

 See Also

## Was this information helpful?

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam