SolveTools - Maple Programming Help

Home : Support : Online Help : Mathematics : Factorization and Solving Equations : SolveTools : SolveTools/SemiAlgebraic

SolveTools

 SemiAlgebraic
 compute the solutions of a set of equations, inequations, and inequalities

 Calling Sequence SemiAlgebraic(sys) SemiAlgebraic(sys, vars) SemiAlgebraic(sys, vars, parameters=parms)

Parameters

 sys - list or set of equations, inequations, or inequalities with rational real coefficients vars - (optional) list or set of variables parms - (optional) a list of parameters

Description

 • The command SolveTools[SemiAlgebraic] computes the solutions of a rational polynomial system consisting of a combination of equations, inequations, and inequalities over the real numbers.
 • If vars is not specified, the command determines the list of unknowns to be solved.
 • SemiAlgebraic will solve for all the unknown symbols in the input system. If vars is specified, but does not include all symbols in the system then the omitted symbols will be treated as parameters and the output will be a piecewise expression. The parameters option can be used to specify an ordered list of parameters.
 • The order of equations and inequalities in the solutions is determined by the order of the variables given in vars.  If vars is not specified, the order that was used to solve the polynomial system is used.
 • This command is part of the SolveTools package, and can be used in the form SemiAlgebraic(..) only after executing the command with(SolveTools).  However, it can always be accessed through the long form of the command using SolveTools[SemiAlgebraic](..).

Examples

 > $\mathrm{with}\left(\mathrm{SolveTools}\right):$

A set of inequations defines a region in the plane.

 > $\mathrm{ineqs}≔\left\{{x}^{2}-y<0,{x}^{2}+{y}^{2}<9,0<3y-x-2\right\}$
 ${\mathrm{ineqs}}{:=}\left\{{0}{<}{3}{}{y}{-}{x}{-}{2}{,}{{x}}^{{2}}{-}{y}{<}{0}{,}{{x}}^{{2}}{+}{{y}}^{{2}}{<}{9}\right\}$ (1)
 > $\mathrm{plots}:-\mathrm{inequal}\left(\mathrm{ineqs},x=-2..2,y=0..3,\mathrm{color}="Nautical Dark Gray"\right)$

A semi-algebraic solution defines a decomposition of that region into strips.  The variable order $\left[x,y\right]$ gives vertical strips.

 > $\mathrm{sasolxy}≔\mathrm{SolveTools}:-\mathrm{SemiAlgebraic}\left(\mathrm{ineqs},\left[x,y\right]\right)$
 ${\mathrm{sasolxy}}{:=}\left[\left[{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{4}}{+}{{\mathrm{_Z}}}^{{2}}{-}{9}{,}{-}{1.625}{..}{-}{1.562}\right){<}{x}{,}{x}{<}{-}\frac{{2}}{{3}}{,}{{x}}^{{2}}{<}{y}{,}{y}{<}\sqrt{{-}{{x}}^{{2}}{+}{9}}\right]{,}\left[{x}{=}{-}\frac{{2}}{{3}}{,}\frac{{4}}{{9}}{<}{y}{,}{y}{<}\frac{{1}}{{3}}{}\sqrt{{77}}\right]{,}\left[{-}\frac{{2}}{{3}}{<}{x}{,}{x}{<}{1}{,}\frac{{1}}{{3}}{}{x}{+}\frac{{2}}{{3}}{<}{y}{,}{y}{<}\sqrt{{-}{{x}}^{{2}}{+}{9}}\right]{,}\left[{x}{=}{1}{,}{1}{<}{y}{,}{y}{<}{2}{}\sqrt{{2}}\right]{,}\left[{1}{<}{x}{,}{x}{<}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{4}}{+}{{\mathrm{_Z}}}^{{2}}{-}{9}{,}{1.562}{..}{1.625}\right){,}{{x}}^{{2}}{<}{y}{,}{y}{<}\sqrt{{-}{{x}}^{{2}}{+}{9}}\right]\right]$ (2)
 > $\mathrm{plots}:-\mathrm{inequal}\left(\mathrm{sasolxy},x=-2..2,y=0..3,\mathrm{optionsfeasible}=\left[\mathrm{seq}\left(\left[\mathrm{color}=\mathrm{cat}\left("Nautical",\mathrm{floor}\left(\frac{i+1}{2}\right)\right)\right],i=1..\mathrm{nops}\left(\mathrm{sasolxy}\right)\right)\right]\right)$

The variable order $\left[x,y\right]$ gives horizontal strips.

 > $\mathrm{sasolyx}≔\mathrm{SolveTools}:-\mathrm{SemiAlgebraic}\left(\mathrm{ineqs},\left[y,x\right]\right)$
 ${\mathrm{sasolyx}}{:=}\left[\left[\frac{{4}}{{9}}{<}{y}{,}{y}{<}{1}{,}{-}\sqrt{{y}}{<}{x}{,}{x}{<}{3}{}{y}{-}{2}\right]{,}\left[{y}{=}{1}{,}{-}{1}{<}{x}{,}{x}{<}{1}\right]{,}\left[{1}{<}{y}{,}{y}{<}\frac{{3}}{{5}}{+}\frac{{1}}{{10}}{}\sqrt{{86}}{,}{-}\sqrt{{y}}{<}{x}{,}{x}{<}\sqrt{{y}}\right]{,}\left[{y}{=}\frac{{3}}{{5}}{+}\frac{{1}}{{10}}{}\sqrt{{86}}{,}{-}\frac{{1}}{{10}}{}\sqrt{{60}{+}{10}{}\sqrt{{86}}}{<}{x}{,}{x}{<}\frac{{1}}{{10}}{}\sqrt{{60}{+}{10}{}\sqrt{{86}}}\right]{,}\left[\frac{{3}}{{5}}{+}\frac{{1}}{{10}}{}\sqrt{{86}}{<}{y}{,}{y}{<}{-}\frac{{1}}{{2}}{+}\frac{{1}}{{2}}{}\sqrt{{37}}{,}{-}\sqrt{{y}}{<}{x}{,}{x}{<}\sqrt{{y}}\right]{,}\left[{y}{=}{-}\frac{{1}}{{2}}{+}\frac{{1}}{{2}}{}\sqrt{{37}}{,}{-}\frac{{1}}{{2}}{}\sqrt{{-}{2}{+}{2}{}\sqrt{{37}}}{<}{x}{,}{x}{<}\frac{{1}}{{2}}{}\sqrt{{-}{2}{+}{2}{}\sqrt{{37}}}\right]{,}\left[{-}\frac{{1}}{{2}}{+}\frac{{1}}{{2}}{}\sqrt{{37}}{<}{y}{,}{y}{<}{3}{,}{-}\sqrt{{-}{{y}}^{{2}}{+}{9}}{<}{x}{,}{x}{<}\sqrt{{-}{{y}}^{{2}}{+}{9}}\right]\right]$ (3)
 > $\mathrm{plots}:-\mathrm{inequal}\left(\mathrm{sasolyx},x=-2..2,y=0..3,\mathrm{optionsfeasible}=\left[\mathrm{seq}\left(\left[\mathrm{color}=\mathrm{cat}\left("Nautical",\mathrm{floor}\left(\frac{i+1}{2}\right)\right)\right],i=1..\mathrm{nops}\left(\mathrm{sasolyx}\right)\right)\right]\right)$

If no variables are given then they are deduced.

 > $\mathrm{SemiAlgebraic}\left(\left\{{x}^{2}+x-1=0,x+{y}^{2}<0\right\}\right)$
 $\left[\left[{x}{=}{-}\frac{{1}}{{2}}{-}\frac{{1}}{{2}}{}\sqrt{{5}}{,}{-}\frac{{1}}{{2}}{}\sqrt{{2}{+}{2}{}\sqrt{{5}}}{<}{y}{,}{y}{<}\frac{{1}}{{2}}{}\sqrt{{2}{+}{2}{}\sqrt{{5}}}\right]\right]$ (4)
 > $\mathrm{SemiAlgebraic}\left(\left\{{x}^{2}+x-1=0,x+{y}^{2}<0\right\},\left[y,x\right]\right)$
 $\left[\left[{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{4}}{-}{{\mathrm{_Z}}}^{{2}}{-}{1}{,}{-}{1.312}{..}{-}{1.25}\right){<}{y}{,}{y}{<}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{4}}{-}{{\mathrm{_Z}}}^{{2}}{-}{1}{,}{1.25}{..}{1.312}\right){,}{x}{=}{-}\frac{{1}}{{2}}{-}\frac{{1}}{{2}}{}\sqrt{{5}}\right]\right]$ (5)

If some variables are not given, a piecewise case discussion is returned.

 > $\mathrm{SemiAlgebraic}\left(\left\{ax
 ${{}\begin{array}{cc}\left[\left[{x}{=}{x}\right]\right]& {\mathrm{And}}{}\left({a}{=}{0}{,}{0}{<}{b}\right)\\ \left[\left[{x}{<}\frac{{b}}{{a}}\right]\right]& {0}{<}{a}\\ \left[\left[\frac{{b}}{{a}}{<}{x}\right]\right]& {a}{<}{0}\\ \left[{}\right]& {\mathrm{otherwise}}\end{array}$ (6)
 > $\mathrm{SemiAlgebraic}\left(\left\{ax
 ${{}\begin{array}{cc}\left[\left[{x}{<}{0}\right]\right]& {\mathrm{And}}{}\left({b}{=}{0}{,}{0}{<}{a}\right)\\ \left[\left[{0}{<}{x}\right]\right]& {\mathrm{And}}{}\left({b}{=}{0}{,}{a}{<}{0}\right)\\ \left[\left[{x}{=}{x}\right]\right]& {\mathrm{And}}{}\left({0}{<}{b}{,}{a}{=}{0}\right)\\ \left[\left[{x}{<}\frac{{b}}{{a}}\right]\right]& {\mathrm{And}}{}\left({0}{<}{b}{,}{0}{<}{a}\right)\\ \left[\left[\frac{{b}}{{a}}{<}{x}\right]\right]& {\mathrm{And}}{}\left({0}{<}{b}{,}{a}{<}{0}\right)\\ \left[\left[{x}{<}\frac{{b}}{{a}}\right]\right]& {\mathrm{And}}{}\left({b}{<}{0}{,}{0}{<}{a}\right)\\ \left[\left[\frac{{b}}{{a}}{<}{x}\right]\right]& {\mathrm{And}}{}\left({b}{<}{0}{,}{a}{<}{0}\right)\\ \left[{}\right]& {\mathrm{otherwise}}\end{array}$ (7)
 > $\mathrm{SemiAlgebraic}\left(\left\{{x}^{2}+x-1=0,x+{y}^{2}
 ${{}\begin{array}{cc}\left[{}\right]& {a}{\le }{-}\frac{{1}}{{2}}{-}\frac{{1}}{{2}}{}\sqrt{{5}}\\ \left[\left[{x}{=}{-}\frac{{1}}{{2}}{-}\frac{{1}}{{2}}{}\sqrt{{5}}{,}{-}\frac{{1}}{{2}}{}\sqrt{{2}{+}{2}{}\sqrt{{5}}{+}{4}{}{a}}{<}{y}{,}{y}{<}\frac{{1}}{{2}}{}\sqrt{{2}{+}{2}{}\sqrt{{5}}{+}{4}{}{a}}\right]\right]& {a}{<}\frac{{1}}{{2}}{}\sqrt{{5}}{-}\frac{{1}}{{2}}\\ \left[\left[{x}{=}{-}\frac{{1}}{{2}}{-}\frac{{1}}{{2}}{}\sqrt{{5}}{,}{-}{{5}}^{{1}{/}{4}}{<}{y}{,}{y}{<}{{5}}^{{1}{/}{4}}\right]\right]& {a}{=}\frac{{1}}{{2}}{}\sqrt{{5}}{-}\frac{{1}}{{2}}\\ \left[\left[{x}{=}{-}\frac{{1}}{{2}}{-}\frac{{1}}{{2}}{}\sqrt{{5}}{,}{-}\frac{{1}}{{2}}{}\sqrt{{2}{+}{2}{}\sqrt{{5}}{+}{4}{}{a}}{<}{y}{,}{y}{<}\frac{{1}}{{2}}{}\sqrt{{2}{+}{2}{}\sqrt{{5}}{+}{4}{}{a}}\right]{,}\left[{x}{=}\frac{{1}}{{2}}{}\sqrt{{5}}{-}\frac{{1}}{{2}}{,}{-}\frac{{1}}{{2}}{}\sqrt{{-}{2}{}\sqrt{{5}}{+}{2}{+}{4}{}{a}}{<}{y}{,}{y}{<}\frac{{1}}{{2}}{}\sqrt{{-}{2}{}\sqrt{{5}}{+}{2}{+}{4}{}{a}}\right]\right]& \frac{{1}}{{2}}{}\sqrt{{5}}{-}\frac{{1}}{{2}}{<}{a}\end{array}$ (8)
 > $\mathrm{SemiAlgebraic}\left(\left\{{x}^{2}+x-1=0,0
 $\left[\left[{x}{=}{-}\frac{{1}}{{2}}{-}\frac{{1}}{{2}}{}\sqrt{{5}}{,}{y}{<}{-}\frac{{1}}{{2}}{}\sqrt{{2}{+}{2}{}\sqrt{{5}}}\right]{,}\left[{x}{=}{-}\frac{{1}}{{2}}{-}\frac{{1}}{{2}}{}\sqrt{{5}}{,}\frac{{1}}{{2}}{}\sqrt{{2}{+}{2}{}\sqrt{{5}}}{<}{y}\right]{,}\left[{x}{=}\frac{{1}}{{2}}{}\sqrt{{5}}{-}\frac{{1}}{{2}}{,}{y}{=}{y}\right]\right]$ (9)
 > $\mathrm{SemiAlgebraic}\left(\left\{{x}^{2}+x-1<0,{x}^{2}+{y}^{2}<9\right\},\left\{x,y\right\}\right)$
 $\left[\left[{-}\frac{{1}}{{2}}{-}\frac{{1}}{{2}}{}\sqrt{{5}}{<}{x}{,}{x}{<}\frac{{1}}{{2}}{}\sqrt{{5}}{-}\frac{{1}}{{2}}{,}{-}\sqrt{{-}{{x}}^{{2}}{+}{9}}{<}{y}{,}{y}{<}\sqrt{{-}{{x}}^{{2}}{+}{9}}\right]\right]$ (10)
 > $\mathrm{SemiAlgebraic}\left(\left\{{x}^{2}-y<0,{x}^{2}+{y}^{2}<9\right\},\left\{x,y\right\}\right)$
 $\left[\left[{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{4}}{+}{{\mathrm{_Z}}}^{{2}}{-}{9}{,}{-}{1.625}{..}{-}{1.562}\right){<}{x}{,}{x}{<}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{4}}{+}{{\mathrm{_Z}}}^{{2}}{-}{9}{,}{1.562}{..}{1.625}\right){,}{{x}}^{{2}}{<}{y}{,}{y}{<}\sqrt{{-}{{x}}^{{2}}{+}{9}}\right]\right]$ (11)

Compatibility

 • The SolveTools[SemiAlgebraic] command was introduced in Maple 16.