I have some quadratics, and I am trying to find out whether there exist solutions in the integers. The following tells me that the first does, wheraeas the second doesn't:
Solve[2 + 4 x + 6 x^2 == 4 - 7 y + 3 y^2 && x < 0 && y < 0, x, Integers]
Solve[12 + 15 x + 9 x^2 == 4 - 7 y + 3 y^2 && x < 0 && y < 0, x, Integers]
This is fine. However, I am not particularly interested in what the solutions are, just whether a solution exists. I have a lot of these, and it is taking a long time to calculate, since it is trying to find a solution for each one.
Generally, if there isn't a solution, it spits out {} quite quickly (which is all I really want to know). Is it possible to find out whether such equations have integer solutions, without having to evaluate each one, and hence speed up calculation times?
FindInstance? Can't guarantee that it's faster, though. Don't know too much about it. – march Jan 04 '16 at 18:14FindInstancegives a cleaner answer - noConditionalExpression,Reduceis slightly faster then either for the example above when no solution exists. – bbgodfrey Jan 04 '16 at 19:12