6
$\begingroup$

Evaluating

FindInstance[a/(b + c) + b/(a + c) + c/(a + b) == 4, {a, b, c}, Integers]

does what I'd expect it to do: find a solution to the equation in integers.

{a -> 11, b -> 9, c -> -5}.

However, if I ask for two solutions, I get the following error:

FindInstance::fwsol: Warning: FindInstance found only 1 instance(s), but it was not able to prove 2 instances do not exist.

This is returned alongside the solution it's found. The strange thing is that the solution it finds if asked for two solutions is not the one it finds if asked for one, and it seems unable to find the original solution.

{a -> -39, b -> 156, c -> 429}

Can anyone with some knowledge of how the FindInstance function works comment on how this sort of behaviour can be avoided?

$\endgroup$
5
$\begingroup$

I don't know why FindInstance behaves the way you demonstrate; however, a work-around to generate more solutions is as follows. Use the RandomSeed option for FindInstance.

Union[Flatten[
   Select[Table[
      Quiet[
          FindInstance[a/(b + c) + b/(a + c) + c/(a + b) == 4, {a, b, c}, 
                       Integers, 3, RandomSeed -> k]],
      {k, 1, 10}], Head[#] =!= FindInstance &], 1]]

{{a -> -1480, b -> 2664, c -> 3256}, {a -> -815, b -> 1467, c -> 1793}, {a -> -9, b -> 5, c -> -11}, {a -> 1, b -> -11, c -> -4}, {a -> 1035, b -> -575, c -> 1265}}

$\endgroup$
2
$\begingroup$

More Indeed, if I block the first solution and ask again for two it works,

Consider,

FindInstance[{c/(a + b) + b/(a + c) + a/(b + c) == 4}, {a, b, c}, Integers, 1]
{{a -> 11, b -> 9, c -> -5}}
FindInstance[
  {c/(a + b) + b/(a + c) + a/(b + c) == 4, a + b + c != 15}, 
  {a, b, c}, Integers, 2]
{{a -> -18, b -> 10, c -> -22}, {a -> -8, b -> 2, c -> -22}}

I will try to look for more solutions.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.