# Find a solution to a set of equations, within a specified range

Given the following list

myList = {a + 2 g, -2 c d - 3 b f + 2 a g,  d^2 f -  c d g, -2 c^2 - a f,
c d f -  c^2 g}


of five expressions in the variables a,b,c,d,f,g,

I'd like to find a non-zero, integer solution to the set of equations:

myList[[i]] ==0


for i=1,2,...,5.

It's actually enough for me to only look for solutions in which all the variables are integers in the range [-3,3].

FindInstance[
And @@ Thread[myList == 0] &&
And @@ Thread[-3 <= {a, b, c, d, f, g} <= 3] &&
And @@ Thread[ {a, b, c, d, f, g} != 0], {a, b, c, d, f, g}, Integers]

(*{{a -> -2, b -> -2, c -> -1, d -> -1, f -> 1, g -> 1}}*)


If you want to find more solutions, just add , 5 after Integers, for this problem it seems there are only 4 solutions.

myList = {a + 2 g, -2 c d - 3 b f + 2 a g, d^2 f - c d g, -2 c^2 - a f,
c d f - c^2 g};

var = Variables[Level[myList, -1]];

soln = Solve[
{myList == 0, {-3 <= # <= 3, # != 0} & /@ var} // Flatten,
var, Integers]

{{a -> -2, b -> -2, c -> -1, d -> -1, f -> 1, g -> 1}, {a -> -2, b -> -2,
c -> 1, d -> 1, f -> 1, g -> 1}, {a -> 2, b -> 2, c -> -1, d -> -1, f -> -1,
g -> -1}, {a -> 2, b -> 2, c -> 1, d -> 1, f -> -1, g -> -1}}


Verifying solution

(myList /. soln) // Union

{{0, 0, 0, 0, 0}}