 NumberTheory - Maple Programming Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Mathematics : Number Theory : NumberTheory/InhomogeneousDiophantine

NumberTheory

 InhomogeneousDiophantine
 inhomogeneous Diophantine approximation

 Calling Sequence InhomogeneousDiophantine(ineqs, xvars, yvars) InhomogeneousDiophantine(cfs, alpha, real_errors) InhomogeneousDiophantine(cfs, alpha, adicities, padic_errors)

Parameters

 ineqs - inequality or set of inequalities with abs or valuep xvars - name or set of names yvars - name or set of names cfs - convertible to a Matrix of real numbers alpha - convertible to a Vector of real numbers adicities - convertible to a Vector of prime numbers real_errors - convertible to a Vector of real numbers padic_errors - convertible to a Vector of positive integers

Description

 • The InhomogeneousDiophantine function finds a solution ${x}_{1},\dots ,{x}_{n},{y}_{1},\dots ,{y}_{m}$ over the integers to a set of inequalities of the form

$\left|{a}_{1,1}{x}_{1}+{a}_{1,n}{x}_{n}+\mathrm{...}-{\mathrm{\alpha }}_{1}-{y}_{1}\right|\le {\mathrm{err}}_{1}$

$\mathrm{...}$

$\left|{a}_{m,1}{x}_{1}+{a}_{m,n}{x}_{n}+\mathrm{...}-{\mathrm{\alpha }}_{m}-{y}_{m}\right|\le {\mathrm{err}}_{m}$

 or

$\mathrm{padic}:-\mathrm{valuep}\left({a}_{1,1}{x}_{1}+{a}_{1,n}{x}_{n}+\mathrm{...}-{\mathrm{\alpha }}_{1}-{y}_{1},{p}_{1}\right)\le {p}_{1}^{-{\mathrm{err}}_{1}}$

$\mathrm{...}$

$\mathrm{padic}:-\mathrm{valuep}\left({a}_{m,1}{x}_{1}+{a}_{m,n}{x}_{n}+\mathrm{...}-{\mathrm{\alpha }}_{m}-{y}_{m},{p}_{m}\right)\le {p}_{m}^{-{\mathrm{err}}_{m}}$

 where $\mathrm{padic}:-\mathrm{valuep}$ is the p-adic valuation.
 • The inequalities can be described explicitly, corresponding to the first calling sequence, or implicitly, corresponding to the other calling sequences.
 • If the first calling sequence is used, then the return value is of the form

$\left[{x}_{1}={s}_{1},\mathrm{...},{x}_{n}={s}_{n},{y}_{1}={t}_{1},\mathrm{...},{y}_{m}={t}_{m}\right]$

 • If the other calling sequences are used, then the return value is a two-element list corresponding to the x values and the y values,

$\left[\left[{s}_{1},\mathrm{...},{s}_{n}\right],\left[{t}_{1},\mathrm{...},{t}_{m}\right]\right]$

Examples

 > $\mathrm{with}\left(\mathrm{NumberTheory}\right):$
 > $\mathrm{with}\left(\mathrm{padic}\right):$
 > $\mathrm{InhomogeneousDiophantine}\left(\left\{\mathrm{abs}\left(-3.7\mathrm{exp}\left(2\right)x+y+{3}^{\frac{1}{3}}z-{5}^{\frac{1}{3}}-v\right)\le {10}^{-3},\mathrm{abs}\left(0.01\mathrm{log}\left(2\right)x+24\mathrm{log}\left(5\right)y-8{3}^{\frac{1}{2}}z-\mathrm{exp}\left(2.5\right)-u\right)\le {10}^{-7}\right\},\left\{x,y,z\right\},\left\{u,v\right\}\right)$
 $\left[{x}{=}{-5616}{,}{y}{=}{-3657}{,}{z}{=}{4034}{,}{v}{=}{155698}{,}{u}{=}{-197205}\right]$ (1)

An equivalent Matrix form calling sequence is:

 > $\mathrm{InhomogeneousDiophantine}\left(\left[\left[0.01\mathrm{log}\left(2\right),24\mathrm{log}\left(5\right),-8{3}^{\frac{1}{2}}\right],\left[-3.7\mathrm{exp}\left(2\right),1,{3}^{\frac{1}{3}}\right]\right],\left[\mathrm{exp}\left(2.5\right),{5}^{\frac{1}{3}}\right],\left[{10}^{-7},{10}^{-3}\right]\right)$
 $\left[\left[{6333}{,}{-8617}{,}{3579}\right]{,}\left[{-382405}{,}{-176598}\right]\right]$ (2)

The solutions may be different but both are valid.

 > $\mathrm{InhomogeneousDiophantine}\left(\left\{\mathrm{valuep}\left(\frac{1}{\mathrm{log}\left(7\right)}x+\mathrm{log}\left(11\right)y-\mathrm{log}\left(7\right)-v,5\right)\le {5}^{-15},\mathrm{valuep}\left(\mathrm{log}\left(3\right)x+\mathrm{exp}\left(7\right)y-\mathrm{log}\left(3\right)-w,7\right)\le {7}^{-12},\mathrm{valuep}\left(\mathrm{log}\left(5\right)x+\mathrm{log}\left(7\right)y-\mathrm{log}\left(5\right)-u,3\right)\le {3}^{-20}\right\},\left\{x,y\right\},\left\{u,v,w\right\}\right)$
 $\left[{x}{=}{-15516275}{,}{y}{=}{6404775}{,}{w}{=}{-9747866955}{,}{u}{=}{-1192024656}{,}{v}{=}{-27148890349}\right]$ (3)

The error list for the p-adic cases are negatives of the exponents on the adicities.

 > $\mathrm{InhomogeneousDiophantine}\left(\left[\left[\mathrm{log}\left(5\right),\mathrm{log}\left(7\right)\right],\left[\frac{1}{\mathrm{log}\left(7\right)},\mathrm{log}\left(11\right)\right],\left[\mathrm{log}\left(3\right),\mathrm{exp}\left(7\right)\right]\right],\left[\mathrm{log}\left(5\right),\mathrm{log}\left(7\right),\mathrm{log}\left(3\right)\right],\left[3,5,7\right],\left[20,15,12\right]\right)$
 $\left[\left[{-328700}{,}{-11704900}\right]{,}\left[{-1192426818}{,}{-27149007027}{,}{-9747320216}\right]\right]$ (4)

Compatibility

 • The NumberTheory[InhomogeneousDiophantine] command was introduced in Maple 2016.
 • For more information on Maple 2016 changes, see Updates in Maple 2016.

 See Also