Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
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?"

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.