 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\{0<3y-x-2,{x}^{2}+{y}^{2}<9,{x}^{2}-y<0\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.602}{..}{-1.593}\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{\sqrt{{77}}}{{3}}\right]{,}\left[{-}\frac{{2}}{{3}}{<}{x}{,}{x}{<}{1}{,}\frac{{x}}{{3}}{+}\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.593}{..}{1.602}\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[y,x\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}{\le }{1}{,}{-}\sqrt{{y}}{<}{x}{,}{x}{<}{3}{}{y}{-}{2}\right]{,}\left[{1}{<}{y}{,}{y}{\le }{-}\frac{{1}}{{2}}{+}\frac{\sqrt{{37}}}{{2}}{,}{-}\sqrt{{y}}{<}{x}{,}{x}{<}\sqrt{{y}}\right]{,}\left[{-}\frac{{1}}{{2}}{+}\frac{\sqrt{{37}}}{{2}}{<}{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+{y}^{2}<0,{x}^{2}+x-1=0\right\}\right)$
 $\left[\left[{x}{=}{-}\frac{\sqrt{{5}}}{{2}}{-}\frac{{1}}{{2}}{,}{-}\frac{\sqrt{{2}{+}{2}{}\sqrt{{5}}}}{{2}}{<}{y}{,}{y}{<}\frac{\sqrt{{2}{+}{2}{}\sqrt{{5}}}}{{2}}\right]\right]$ (4)
 > $\mathrm{SemiAlgebraic}\left(\left\{x+{y}^{2}<0,{x}^{2}+x-1=0\right\},\left[y,x\right]\right)$
 $\left[\left[{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{4}}{-}{{\mathrm{_Z}}}^{{2}}{-}{1}{,}{-1.274}{..}{-1.265}\right){<}{y}{,}{y}{<}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{4}}{-}{{\mathrm{_Z}}}^{{2}}{-}{1}{,}{1.265}{..}{1.274}\right){,}{x}{=}{-}\frac{\sqrt{{5}}}{{2}}{-}\frac{{1}}{{2}}\right]\right]$ (5)

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

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

Compatibility

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