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

Online Help

All Products    Maple    MapleSim


RootFinding[Parametric]

  

NumberOfSolutions

  

compute the number of real solutions for each open cell

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

NumberOfSolutions(m, l)

Parameters

m

-

solution record, as returned by CellDecomposition

l

-

(optional) list of ranges for the parameters, of the form parameter=u..v, where u is a rational number or  and v is a rational number or

Description

• 

The NumberOfSolutionsm calling sequence computes the number of real solutions of the system

f=0,g>0fm:Equations,gm:Inequalities

  

and returns it as a list of lists of the form i,ni, where i is the index of the open cell and ni is the number of real solutions of the non-parametric system resulting from substituting parameter values from this cell.

• 

If l is given, only those open cells whose sample points lie inside the box specified by l are considered.

• 

This command is part of the RootFinding[Parametric] package, so it can be used in the form NumberOfSolutions(..) only after executing the command with(RootFinding[Parametric]). However, it can always be accessed through the long form of the command by using RootFinding[Parametric][NumberOfSolutions](..).

Examples

withRootFindingParametric:

sysx2+y2=a&comma;xy=b&comma;0<a

sysx2+y2=a&comma;xy=b&comma;0<a

(1)

mCellDecompositionsys&comma;x&comma;y

mEquations&equals;x2+y2a&comma;xybInequalities&equals;aFilter&equals;01Variables&equals;x&comma;yParameters&equals;a&comma;bDiscriminantVariety&equals;a&comma;b2+2aProjectionPolynomials&equals;b&comma;a&comma;b2+2aSamplePoints&equals;a=3022314549036572936765311208925819614629174706176&comma;b=−1&comma;a=1&comma;b=−1&comma;a=3022314549036572936765311208925819614629174706176&comma;b=1&comma;a=1&comma;b=1

(2)

CellPlotm&comma;samplepoints

NumberOfSolutionsm

1&comma;0&comma;2&comma;2&comma;3&comma;0&comma;4&comma;2

(3)

Thus, the number of solution pairs x&comma;y of the system sys is 2 if the parameters a and b are chosen from the blue or green cells, to the right of the parabola, and 0 otherwise.

You can restrict the cells for which you want the number of solutions.

NumberOfSolutionsm&comma;b=0..1

3&comma;0&comma;4&comma;2

(4)

NumberOfSolutionsm&comma;a=0..12&comma;b=0..1

3&comma;0

(5)

NumberOfSolutionsm&comma;a=0..12&comma;b=2..3

(6)

In fact, the system sys has exactly one solution, of multiplicity 2, on the parabola itself. This cannot be inferred from the previous data. However, you can add the equation for the discriminant variety to the system and make b an indeterminate as well.

m:-DiscriminantVariety

a&comma;b2+2a

(7)

eqsopm:-Equations&comma;op2&comma;1&comma;

eqsx2+y2a&comma;xyb&comma;b2+2a

(8)

CellDecompositioneqs&comma;m:-Inequalities&comma;x&comma;y&comma;b

Error, (in RootFinding:-Parametric:-CellDecomposition) cannot solve the system: either there are infinitely many complex solutions, or there are solutions of multiplicity > 1, for almost all parameter values

In order to proceed, you must remove multiplicities by computing the radical.

withPolynomialIdeals&comma;PolynomialIdeal&comma;Generators&comma;Simplify&comma;Radical&colon;

JPolynomialIdealeqs&comma;variables=x&comma;y&comma;b&colon;

RGeneratorsSimplifyRadicalJ

R2xb&comma;2y+b&comma;b22a

(9)

m2CellDecompositionopR&comma;m:-Inequalities&comma;x&comma;y&comma;b

m2Equations&equals;2xb&comma;2y+b&comma;b22aInequalities&equals;aFilter&equals;01Variables&equals;x&comma;y&comma;bParameters&equals;aDiscriminantVariety&equals;aProjectionPolynomials&equals;aSamplePoints&equals;a=1

(10)

NumberOfSolutionsm2

1&comma;2

(11)

Notice that there is only one cell, and that the equations eqs have two solutions, independent of the value of the parameter a. The following command computes these solutions for a=1:

SampleSolutionsm2&comma;a=1

x=−0.7071067812&comma;y=0.7071067812&comma;b=−1.414213562&comma;x=0.7071067812&comma;y=−0.7071067812&comma;b=1.414213562

(12)

Since the values of b are different for each of those two solutions, you can conclude that the original system sys has exactly one solution x&comma;y for parameter values a and b on the parabola specified by the equation for the discriminant variety.

See Also

CellDecomposition

CellPlot

Parametric

PolynomialIdeals

RootFinding