({{, (RefLink[FindIntegerNullVector, paclet:ref/FindIntegerNullVector])[{(Subscript[x, 1]),(Subscript[x, 2]),…,(Subscript[x, n])}] 
finds a list of integers (Subscript[a, i]) such that (Subscript[a, 1]) (Subscript[x, 1])+(Subscript[a, 2]) (Subscript[x, 2])+⋯+(Subscript[a, n]) (Subscript[x, n])==0. }, {, (RefLink[FindIntegerNullVector, paclet:ref/FindIntegerNullVector])[{(Subscript[x, 1]),(Subscript[x, 2]),…,(Subscript[x, n])},d]
finds a list of integers (Subscript[a, i]) with (Norm[{(Subscript[a, 1]),…,(Subscript[a, n])}])≤d such that (Subscript[a, 1]) (Subscript[x, 1])+(Subscript[a, 2]) (Subscript[x, 2])+⋯+(Subscript[a, n]) (Subscript[x, n])==0. }})

OpenersNotesSection(Spacer1)Details and Options

Not all (Subscript[a, i]) are zero. The numbers (Subscript[x, i]) can be real or complex. For complex numbers (Subscript[x, i]) the numbers (Subscript[a, i]) are Gaussian integers.

In (RefLink[FindIntegerNullVector, paclet:ref/FindIntegerNullVector])[{(Subscript[x, 1]),(Subscript[x, 2]),…},d] no integer null vector may exist with the given norm bound. The input is then returned unevaluated.

The following options can be given:

The setting (RefLink[ZeroTest, paclet:ref/ZeroTest])->(RefLink[Automatic, paclet:ref/Automatic]) automatically determines the method to test the integer relation (Subscript[a, 1]) (Subscript[x, 1])+(Subscript[a, 2]) (Subscript[x, 2])+⋯+(Subscript[a, n]) (Subscript[x, n])==0.

For inexact numbers (Subscript[x, i]), the relation found holds up to the precision of the input. For exact numbers (Subscript[x, i]), the relation found is validated using (RefLink[PossibleZeroQ, paclet:ref/PossibleZeroQ]).

For inexact numbers (Subscript[x, i]) and (RefLink[WorkingPrecision, paclet:ref/WorkingPrecision])->(RefLink[Automatic, paclet:ref/Automatic]) the precision is taken to be the precision of the input.

For exact numbers (Subscript[x, i]) and (RefLink[WorkingPrecision, paclet:ref/WorkingPrecision])->(RefLink[Automatic, paclet:ref/Automatic]) the precision is taken to start with (RefLink[MachinePrecision, paclet:ref/MachinePrecision]) and use up to (RefLink[$MaxExtraPrecision, paclet:ref/$MaxExtraPrecision]) extra precision when searching for an integer null vector when no norm bound d is specified. In the case of a norm bound d, enough precision is used to either find a null vector or prove that none exist.

OpenersPrimaryExamplesSection(Spacer1)Examples  (18)

OpenersExampleSection0(Spacer1)Basic Examples  (3)

Exact input:

FindIntegerNullVector[{Log[2],Log[4]}]

{Log[2],Log[4]}.%//Simplify

Inexact input:

FindIntegerNullVector[N@{Log[2],Log[4]}]

Exact input with norm bound:

FindIntegerNullVector[{Log[2],Log[4]},3]

There is no null vector with norm less than or equal to 2:

FindIntegerNullVector[{Log[2],Log[4]},2]

OpenersExampleSection1(Spacer1)Scope  (6)

This finds an integer null vector for a vector of exact real numbers:

v=Sin[Pi/8]^Range[0,4]

rel=FindIntegerNullVector[v]

Simplify[rel.v]

This proves that there is no null vector with norm less than or equal to 8:

FindIntegerNullVector[v,8]

For a bound close to the norm of a null vector you may not get proof that no null vector exists:

FindIntegerNullVector[v,9]

The returned null vector does not satisfy the norm bound:

Norm[%]//N

(RefLink[FindIntegerNullVector, paclet:ref/FindIntegerNullVector]) cannot prove that numbers are linearly independent over the integers:

FindIntegerNullVector[{E,Pi}]

It can prove that there is no integer null vector with norm less than or equal to a given bound:

FindIntegerNullVector[{E,Pi},1000000]

For inexact input, the relation is true up to the precision of the input:

FindIntegerNullVector[N[{E,Pi},20]]

N[{E,Pi},20].%

No null vector exists for the given norm bound:

FindIntegerNullVector[N[{E,Pi},20],10]

Here no null vector is found, but nonexistence of a null vector is proven only for a smaller norm bound:

FindIntegerNullVector[N[{E,Pi},20],10^9]

This finds a null vector for a 20-digit approximation of v:

v={Log[2^12345 3^67890],Log[2^9876543],Log[3^6543210]};
r20=FindIntegerNullVector[N[v,20]]

N[v,20].r20

The result is not a null vector for the exact vector v:

N[r20.v,50]

A null vector found for a higher-precision approximation of v is also a null vector for v:

r50=FindIntegerNullVector[N[v,50]]

FullSimplify[r50.v]

This gives a Gaussian integer null vector for a vector of exact complex numbers:

v={1,2I +Sqrt[3], (2I+Sqrt[3])^2}

FindIntegerNullVector[v]

Expand[%.v]

This finds a Gaussian integer null vector for a vector of approximate complex numbers:

v=N[{Log[-1024],1234 Pi,Log[4]},20]

FindIntegerNullVector[v]

OpenersExampleSection2(Spacer1)Options  (2)

OpenersExampleSubsection0(Spacer1)WorkingPrecision  (1)

By default, precision of at most (RefLink[$MachinePrecision, paclet:ref/$MachinePrecision])+(RefLink[$MaxExtraPrecision, paclet:ref/$MaxExtraPrecision]) digits is used:

v=Table[(2^(1/6)+3^(1/5))^i,{i,0,30}];

FindIntegerNullVector[v]

Using a higher (RefLink[WorkingPrecision, paclet:ref/WorkingPrecision]) allows you to find a null vector:

FindIntegerNullVector[v,WorkingPrecision->300]

OpenersExampleSubsection1(Spacer1)ZeroTest  (1)

By default, (RefLink[PossibleZeroQ, paclet:ref/PossibleZeroQ]) with (RefLink[Method, paclet:ref/Method])->"ExactAlgebraics" is used to prove relations:

a=Root[#^7+5#-7&,1];
b=Root[#^7-12#+82&,1];
c=RootReduce[12345a-67890b];

This uses exact methods to prove the relation:

FindIntegerNullVector[{a,b,c}]//Timing

This uses a high-precision numeric test instead:

FindIntegerNullVector[{a,b,c},ZeroTest->(Quiet[N[#,2000]]==0&)]//Timing

OpenersExampleSection3(Spacer1)Applications  (2)

Find coefficients of the minimal polynomial of an algebraic number:

a=Sqrt[2]+3^(1/3);
FindIntegerNullVector[Table[a^i,{i,0,6}]]

This finds the minimal polynomial using symbolic methods:

CoefficientList[MinimalPolynomial[a,x],x]

Find a relation between transcendental numbers:

FindIntegerNullVector[{Sin[1]^3,Sin[1],Sin[3]}]

OpenersExampleSection4(Spacer1)Properties & Relations  (3)

(RefLink[FindIntegerNullVector, paclet:ref/FindIntegerNullVector]) returns an integer null vector for the given vector:

FindIntegerNullVector[{Log[2],Log[3],Log[72]}]

%.{Log[2],Log[3],Log[72]}//Simplify

An integer null vector is a nontrivial integer solution of a homogeneous linear equation:

coeffs={Cos[4],Cos[1]^4,Cos[1]^2, 1};
vars={x,y,z,t};
eqn=coeffs.vars==0

FindIntegerNullVector[coeffs]

eqn/.Thread[vars->%]//Simplify

Use (RefLink[FindInstance, paclet:ref/FindInstance]) to find solutions of equations:

FindInstance[eqn&&x≠0,vars,Integers]

Find coefficients of the minimal polynomial of an algebraic number using its approximation:

a=N[Sqrt[2]+Sqrt[3],20]

FindIntegerNullVector[a^Range[0,4]]

Use (RefLink[RootApproximant, paclet:ref/RootApproximant]) to find an algebraic number using its approximation:

RootApproximant[a]

OpenersExampleSection5(Spacer1)Possible Issues  (2)

The precision of an approximation may not be sufficient to find a relation between numbers:

v=(Sqrt[2]+Sqrt[3]+Sqrt[5])^Range[0,8];

FindIntegerNullVector[N[v]]

N[v.%,20]

Using a higher-precision approximation, you get a true relation:

FindIntegerNullVector[N[v,50]]

Expand[v.%]

Numeric zero testing used for nonalgebraic numbers may allow results that are not null vectors:

FindIntegerNullVector[{Pi, Rationalize[N[Pi,100],0]}]

This gives the precision used in zero testing when no symbolic zero-testing method applies:

ztprec=SystemOptions["ZeroTestNumericalPrecision"]

With a higher zero-testing precision, (RefLink[FindIntegerNullVector, paclet:ref/FindIntegerNullVector]) correctly rejects the vector:

SetSystemOptions["ZeroTestNumericalPrecision"->200];

FindIntegerNullVector[{Pi, Rationalize[N[Pi,100],0]}]

Reset the system option to the original value:

SetSystemOptions["ZeroTestNumericalPrecision"->ztprec];

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Rationalize, paclet:ref/Rationalize])  ▪  (RefLink[RootApproximant, paclet:ref/RootApproximant])  ▪  (RefLink[LatticeReduce, paclet:ref/LatticeReduce])  ▪  (RefLink[FindSequenceFunction, paclet:ref/FindSequenceFunction])  ▪  (RefLink[FindInstance, paclet:ref/FindInstance])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Number Recognition, paclet:guide/NumberRecognition])}})}})