# Why FindInstance does not find this solution?

Do you think FindInstance should have found this solution?

ClearAll[n, d, m, a];
n = 90; d = 3;
eq = n/d^m == a;
FindInstance[ eq, {m, a}, PositiveIntegers]


V 14 gives

Solve::nsmet: This system cannot be solved with the methods available to Solve. Try Reduce or FindInstance instead.

But we see that there is obvious solution:

eq /. {m -> 2, a -> 10}

(*True *)


I know I can find m,a in other ways, but wanted to know if there is a problem here and that FindInstance should have been able to find the solution. Btw, Reduce and Solve also can't find this solution.

• Include constraints, e.g., FindInstance[{eq, 0 < m < 100, 0 < a < 100}, {m, a}, PositiveIntegers, 5] Commented Mar 17 at 20:33
• Order matters, I guess: FindInstance[eq, {a, m}, PositiveIntegers] Commented Mar 17 at 20:37
• @Goofy wow. This makes no sense at all! But good find. Do you think this is a bug then? You can post this as answer if you want. Commented Mar 17 at 20:42
• @BobHanlon thanks, Yes constraints helps. But I think in this case it should not needed it? Commented Mar 17 at 20:43
• Constraints are often useful and also work with Solve or Reduce for this problem. Commented Mar 17 at 21:23

We only have to constraint the range of parameter a

FindInstance[eq && a <= 50, {m, a}, PositiveIntegers, 5 ]
(*{{m -> 1, a -> 30}, {m -> 2, a -> 10}}*)