 isolve - Maple Help

isolve

solve Diophantine equations for integer solutions Calling Sequence isolve(eqns, vars) Parameters

 eqns - set of equations or single equation, or inequalities vars - (optional) set of variables or a variable Description

 • The procedure isolve tries to solve the equations in eqns over the integers. It solves for all of the indeterminates occurring in the equations.
 • The optional second argument vars is used to name global variables that have integer values and occur in the solution, and if there is only one argument, then the global names _Z1, _Z2, and so forth, are used. For non-negative solutions, _NN1, _NN2, and so forth, are used. This has been introduced since Release 5.1 which used to use _N1 in order to make the behavior similar to that of solve.
 • It returns the NULL value if either there are no integer solutions or Maple is unable to find the solutions.
 • The isolve command has some limited ability to deal with inequalities.
 • The isolve command can solve systems of linear equations, single polynomial equations, quadratic forms and homogeneous Pythagorean equations of the form a*X^2 + b*Y^2 + c*Z^2 = 0.  In addition, Maple can solve Diophantine equations of the form p( x ) = c*y, for integral constants c, and a rational polynomial p( x ).
 • You can request that isolve display information about the solving processing by setting infolevel[isolve] to a non-zero value. Examples

A solution to a single linear Diophantine equation is returned in terms of _Z1.

 > $\mathrm{isolve}\left(3x-4y=7\right)$
 $\left\{{x}{=}{5}{+}{4}{}{\mathrm{_Z1}}{,}{y}{=}{2}{+}{3}{}{\mathrm{_Z1}}\right\}$ (1)

To change the free parameter, use the optional second argument.

 > $\mathrm{isolve}\left(3x-4y=7,a\right)$
 $\left\{{x}{=}{5}{+}{4}{}{a}{,}{y}{=}{2}{+}{3}{}{a}\right\}$ (2)

A system of linear Diophantine equations.

 > $\mathrm{isolve}\left(\left\{x+y=14,3x-4y=7\right\}\right)$
 $\left\{{x}{=}{9}{,}{y}{=}{5}\right\}$ (3)

NULL is returned if Maple is unable to find any integer solutions.

 > $\mathrm{isolve}\left({x}^{2}=3\right)$

The following example has an unique rational solution, but no integral solutions.

 > $\mathrm{solve}\left(\left\{x+2y=8,4x-y=7\right\}\right)$
 $\left\{{x}{=}\frac{{22}}{{9}}{,}{y}{=}\frac{{25}}{{9}}\right\}$ (4)
 > $\mathrm{isolve}\left(\left\{x+2y=8,4x-y=7\right\}\right)$
 > $\mathrm{isolve}\left(-7{x}^{5}+22{x}^{4}-55{x}^{3}-94{x}^{2}+87x-56=4y\right)$
 $\left\{{x}{=}{-}{4}{}{\mathrm{_Z1}}{,}{y}{=}{1792}{}{{\mathrm{_Z1}}}^{{5}}{+}{1408}{}{{\mathrm{_Z1}}}^{{4}}{+}{880}{}{{\mathrm{_Z1}}}^{{3}}{-}{376}{}{{\mathrm{_Z1}}}^{{2}}{-}{87}{}{\mathrm{_Z1}}{-}{14}\right\}$ (5)
 > $\left\{\mathrm{isolve}\right\}\left({x}^{2}+{y}^{2}-xy-3\right)$
 $\left\{\left\{{x}{=}{-2}{,}{y}{=}{-1}\right\}{,}\left\{{x}{=}{-1}{,}{y}{=}{-2}\right\}{,}\left\{{x}{=}{-1}{,}{y}{=}{1}\right\}{,}\left\{{x}{=}{1}{,}{y}{=}{-1}\right\}{,}\left\{{x}{=}{1}{,}{y}{=}{2}\right\}{,}\left\{{x}{=}{2}{,}{y}{=}{1}\right\}\right\}$ (6)

The following homogeneous polynomial in x, y, z has genus 0.

 > $\mathrm{isolve}\left({y}^{4}-{z}^{2}{y}^{2}-3xz{y}^{2}-{x}^{3}z\right)$
 $\left\{{x}{=}\frac{{\mathrm{_Z3}}{}{{\mathrm{_Z1}}}^{{2}}{}\left({{\mathrm{_Z1}}}^{{2}}{-}{{\mathrm{_Z2}}}^{{2}}\right)}{{\mathrm{igcd}}{}\left({{\mathrm{_Z1}}}^{{2}}{}\left({{\mathrm{_Z1}}}^{{2}}{-}{{\mathrm{_Z2}}}^{{2}}\right){,}{-}{{\mathrm{_Z1}}}^{{3}}{}{\mathrm{_Z2}}{,}{{\mathrm{_Z2}}}^{{4}}\right)}{,}{y}{=}{-}\frac{{\mathrm{_Z3}}{}{{\mathrm{_Z1}}}^{{3}}{}{\mathrm{_Z2}}}{{\mathrm{igcd}}{}\left({{\mathrm{_Z1}}}^{{2}}{}\left({{\mathrm{_Z1}}}^{{2}}{-}{{\mathrm{_Z2}}}^{{2}}\right){,}{-}{{\mathrm{_Z1}}}^{{3}}{}{\mathrm{_Z2}}{,}{{\mathrm{_Z2}}}^{{4}}\right)}{,}{z}{=}\frac{{\mathrm{_Z3}}{}{{\mathrm{_Z2}}}^{{4}}}{{\mathrm{igcd}}{}\left({{\mathrm{_Z1}}}^{{2}}{}\left({{\mathrm{_Z1}}}^{{2}}{-}{{\mathrm{_Z2}}}^{{2}}\right){,}{-}{{\mathrm{_Z1}}}^{{3}}{}{\mathrm{_Z2}}{,}{{\mathrm{_Z2}}}^{{4}}\right)}\right\}$ (7)
 > $\mathrm{isolve}\left({y}^{4}-{z}^{2}{y}^{2}-3xz{y}^{2}-{x}^{3}z,\left\{a,b,c\right\}\right)$
 $\left\{{x}{=}\frac{{c}{}{{a}}^{{2}}{}\left({{a}}^{{2}}{-}{{b}}^{{2}}\right)}{{\mathrm{igcd}}{}\left({{a}}^{{2}}{}\left({{a}}^{{2}}{-}{{b}}^{{2}}\right){,}{-}{{a}}^{{3}}{}{b}{,}{{b}}^{{4}}\right)}{,}{y}{=}{-}\frac{{c}{}{{a}}^{{3}}{}{b}}{{\mathrm{igcd}}{}\left({{a}}^{{2}}{}\left({{a}}^{{2}}{-}{{b}}^{{2}}\right){,}{-}{{a}}^{{3}}{}{b}{,}{{b}}^{{4}}\right)}{,}{z}{=}\frac{{c}{}{{b}}^{{4}}}{{\mathrm{igcd}}{}\left({{a}}^{{2}}{}\left({{a}}^{{2}}{-}{{b}}^{{2}}\right){,}{-}{{a}}^{{3}}{}{b}{,}{{b}}^{{4}}\right)}\right\}$ (8)

An example of a system of inequalities.

 > $\left\{\mathrm{isolve}\right\}\left(\left\{a<1,b\le 1,-a\le 0,-b\le 0,c=d,d=1\right\}\right)$
 $\left\{\left\{{a}{=}{0}{,}{b}{=}{0}{,}{c}{=}{1}{,}{d}{=}{1}\right\}{,}\left\{{a}{=}{0}{,}{b}{=}{1}{,}{c}{=}{1}{,}{d}{=}{1}\right\}\right\}$ (9)