3
$\begingroup$
Minimize[{t^2, 1 == 3*t + 16*u}, {t, u}, Integers] 
  1. It does not give the solution t = -5 and u = 1.
  2. Am I missing something?

The solution being known and easy, the actual question is not "how can I minimize?"; it is rather "how is it that Mathematica, even version 8 or 9, can't do it?"

$\endgroup$
  • 2
    $\begingroup$ Recall Bézout's identity: ExtendedGCD[3, 16] // Last. $\endgroup$ – J. M. will be back soon Jun 7 '13 at 13:43
  • 1
    $\begingroup$ Interesting, If you put Abs[t] instead of t^2 it gives the result which is obviously the same. $\endgroup$ – george2079 Jun 7 '13 at 17:47
  • $\begingroup$ Interesting.. Minimize[(14*c + 11)^2, c, Integers] gives {9, {c -> -1}} while Minimize[(15*c + 11)^2, c, Integers] returns unevaluated.. $\endgroup$ – Silvia Jun 12 '13 at 19:50

Your Answer

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

Browse other questions tagged or ask your own question.