RootFinding[Parametric] - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Factorization and Solving Equations : Roots : RootFinding : Parametric Subpackage : RootFinding/Parametric/NumberOfSolutions

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

withRootFinding[Parametric]:

sysx2&plus;y2&equals;a&comma;xy&equals;b&comma;0<a

sys:=x2&plus;y2&equals;a&comma;xy&equals;b&comma;0<a

(1)

mCellDecompositionsys&comma;x&comma;y

m:=Equations&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=14&comma;b=−1&comma;a=1&comma;b=−1&comma;a=14&comma;b=1&comma;a=1&comma;b=1

(2)

CellPlotm&comma;&apos;samplepoints&apos;

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&equals;0..1

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

(4)

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

3&comma;0

(5)

NumberOfSolutionsm&comma;a&equals;0..12&comma;b&equals;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&plus;2a

(7)

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

eqs:=x2&plus;y2a&comma;xyb&comma;b2&plus;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&equals;x&comma;y&comma;b&colon;

RGeneratorsSimplifyRadicalJ

R:=b&plus;2y&comma;2xb&comma;b22a

(9)

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

m2:=Equations&equals;b+2y&comma;2xb&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&equals;1:

SampleSolutionsm2&comma;a&equals;1

x&equals;0.7071067812&comma;y&equals;0.7071067812&comma;b&equals;1.414213562&comma;x&equals;0.7071067812&comma;y&equals;0.7071067812&comma;b&equals;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

 


Download Help Document

Was this information helpful?



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