SampleSolutions - Maple Help

RootFinding[Parametric]

 SampleSolutions
 solve a system for given parameter values

 Calling Sequence SampleSolutions(m, s, options) SampleSolutions(m, p, options) SampleSolutions(m, k, options)

Parameters

 m - solution record, as returned by CellDecomposition s - list of equations of the form parameter=rational number representing a point in parameter space p - list of rational numbers representing a point in parameter space k - positive integer; the index of a cell options - (optional) solver options, see RootFinding[Isolate]

Description

 • The SampleSolutions command computes all real solutions of the system

${\left[f=0,g>0\right]}_{f\in m:-\mathrm{Equations},g\in m:-\mathrm{Inequalities}}$

 when the parameters are evaluated at the given point.
 • Solutions are returned as a list of lists of equations of the form variable=number, or variable=[number,number] when the output=interval option is specified.
 • The point can be specified in three different formats:
 – as a list s of equations of the form parameter=rational number,
 – as a list p of rational numbers, in which case the $i$th parameter in m:-Parameters gets replaced by ${p}_{i}$ for all $i$, or
 – as a cell index k, in which case the point is taken to be the $k$th sample point in m:-SamplePoints.
 • Any optional arguments are passed directly to RootFinding[Isolate].
 • This command is part of the RootFinding[Parametric] package, so it can be used in the form SampleSolutions(..) 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][SampleSolutions](..).

Examples

 > $\mathrm{with}\left(\mathrm{RootFinding}\left[\mathrm{Parametric}\right]\right):$
 > $m≔\mathrm{CellDecomposition}\left(\left[{x}^{2}+{y}^{2}=a,x-y=b,0
 > $m:-\mathrm{SamplePoints}$
 $\left[\left[{a}{=}\frac{{302231454903657293676531}}{{1208925819614629174706176}}{,}{b}{=}{-1}\right]{,}\left[{a}{=}{1}{,}{b}{=}{-1}\right]{,}\left[{a}{=}\frac{{302231454903657293676531}}{{1208925819614629174706176}}{,}{b}{=}{1}\right]{,}\left[{a}{=}{1}{,}{b}{=}{1}\right]\right]$ (1)

The following three calling sequences are equivalent:

 > $\mathrm{SampleSolutions}\left(m,\left[a=1,b=-1\right]\right)$
 $\left[\left[{x}{=}{-1.}{,}{y}{=}{0.}\right]{,}\left[{x}{=}{0.}{,}{y}{=}{1.}\right]\right]$ (2)
 > $\mathrm{SampleSolutions}\left(m,\left[1,-1\right]\right)$
 $\left[\left[{x}{=}{-1.}{,}{y}{=}{0.}\right]{,}\left[{x}{=}{0.}{,}{y}{=}{1.}\right]\right]$ (3)
 > $\mathrm{SampleSolutions}\left(m,2\right)$
 $\left[\left[{x}{=}{-1.}{,}{y}{=}{0.}\right]{,}\left[{x}{=}{0.}{,}{y}{=}{1.}\right]\right]$ (4)

You can request the output in the form of isolating intervals instead of floating-point approximations using the option output=interval recognized by RootFinding[Isolate].

 > $\mathrm{SampleSolutions}\left(m,\left[a=1,b=-1\right],\mathrm{output}=\mathrm{interval}\right)$
 $\left[\left[{x}{=}\left[{-1}{,}{-1}\right]{,}{y}{=}\left[{0}{,}{0}\right]\right]{,}\left[{x}{=}\left[{0}{,}{0}\right]{,}{y}{=}\left[{1}{,}{1}\right]\right]\right]$ (5)

Solve the non-parametric system by substituting parameter values not corresponding to a sample point, and by requesting $15$ digits of precision instead of the default of $10$.

 > $\mathrm{SampleSolutions}\left(m,\left[1,\frac{1}{2}\right],\mathrm{digits}=15\right)$
 $\left[\left[{x}{=}{-0.411437827766148}{,}{y}{=}{-0.911437827766148}\right]{,}\left[{x}{=}{0.911437827766148}{,}{y}{=}{0.411437827766148}\right]\right]$ (6)