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

Online Help

All Products    Maple    MapleSim


PolynomialTools[Approximate]

  

Divide

  

compute approximate multivariate Divide

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

Divide(F, G, vars)

Divide(F, G, vars, options)

Parameters

F

-

: polynom({numeric,complex(numeric)})

G

-

: polynom({numeric,complex(numeric)})

vars

-

: a set or list of variables

Options

• 

noexact

  

if given then no exact division will be attempted before trying approximation methods

• 

optimize

  

if given then a post-processing step is done on the output, using Optimization:-NLPSolve to return an approximate quotient with smaller backward error. This option is generally more useful when the total option (below) is being used. Optionally, it can be given as optimize=list with a list of extra options to be passed to optimization.

• 

total

  

if given then the division is computed as a total least squares problem using a low rank approximation of a SylvesterMatrix with the degree parameter set to degreeG,vars. Divide then returns both the quotient and the new value for g as a sequence q,gnew

Description

• 

After some basic preprocessing to handle exact cases, the numerical quotient of F and G is computed using LinearAlgebra:-LeastSquares on the ConvolutionMatrix of F. This treats F as approximate and G as exact.

• 

The total option can be used to compute the division as a total least squares problem instead. That computation treats both F and G as approximate and returns sequence of the approximate quotient and the new G.

• 

If the total degree of F is not strictly greater than the total degree of G, then an approximate division is not possible and and error will be given.

• 

This command will work on univariate polynomials, but the Quotient and Remainder commands in the SNAP package may sometimes be a better choice.

Examples

withPolynomialTools:-Approximate:

infolevelPolynomialTools1

infolevelPolynomialTools1

(1)

dsqrt2.0x2+y21

d1.414213562x2+1.414213562y21.414213562

(2)

Gsortx2y3+1,x,y;FsortexpanddG,x,y

Gy3+x2+1

F1.414213562x2y31.414213562y5+1.414213562x4+1.414213562x2y2+1.414213562y3+1.414213562y21.414213562

(3)

ad_8DivideexpandF+108xy,expandG+108x2y,x,y

Divide:   computed approximate quotient has backward error 2.291288e-08
Divide:   computed approximate quotient has backward error 2.291288e-08

ad_81.41421356376777+1.72890601399040×10−16x+4.71404493218586×10−9y+1.41421356730330x2+3.33333340088403×10−9xy+1.41421356200000y2

(4)

ad_8sorttcoeffdfnormalexpandad_8tcoeffad_8,x,y

ad_81.414213566x2+1.414213560y21.414213562

(5)

ilog10normexpanddad_8,2normd,2

−9

(6)

ad_4DivideexpandF+105randpolyx,y,degree=2,expandG+105randpolyx,y,degree=2,x,y

Divide:   computed approximate quotient has backward error 4.429297e-03
Divide:   computed approximate quotient has backward error 4.429297e-03

ad_41.41434511367100+0.0000543862479197577x0.000574711926059124y+1.41394268380192x2+0.000290375854595681xy+1.41436980349329y2

(7)

ad_4sorttcoeffdfnormalexpandad_4tcoeffad_4,x,y

ad_41.413811170x2+0.0002903488460xy+1.414238250y2+0.00005438118932x0.0005746584707y1.414213562

(8)

ilog10normexpanddad_4,2normd,2

−4

(9)

ilog10normexpandFGad_4,2normF,2

−4

(10)

ad_4t,g_4tDivideexpandF+105randpolyx,y,degree=2,expandG+105randpolyx,y,degree=2,x,y,total

Divide:   computed approximate quotient has backward error 2.944201e+00
Divide:   computed approximate quotient has backward error 7.641890e-04

ad_4t,g_4t2.506818093299710.0000321578835647818x+0.000133334153707270y2.50748278515560x2+0.000259709005629062xy2.50751288549775y2,0.564186321542632+0.000153844663562707x0.000129322053759674y0.564015199549086x20.0000199719037823165xy+6.73994336533553×10−6y2+0.0000267357725492679x30.0000380064168235786x2y+0.0000530108409072412xy2+0.564029568713338y3

(11)

ilog10normexpandFad_4tg_4t,2normF,2

−4

(12)

Compatibility

• 

The PolynomialTools:-Approximate:-Divide command was introduced in Maple 2021.

• 

For more information on Maple 2021 changes, see Updates in Maple 2021.

See Also

ConvolutionMatrix

divide

LinearAlgebra:-LeastSquares

SNAP