Skip to main content
2 of 3
added 146 characters in body
stevenvh
  • 7k
  • 5
  • 42
  • 64

Why don't I get numeric values from this Solve?

Solve[a^2 + b^2 == c^2 && a < 100 && b < 100 && c < 100, {a, b, c}, Integers]

gives me this result

{{c -> ConditionalExpression[-Sqrt[
a^2 + b^2], ((a | b | c) [Element] Integers &&
Sqrt[10000 - a^2] - b > 0 && -99 <=
a <= -1) || ((a | b | c) [Element] Integers &&
Sqrt[10000 - a^2] - b > 0 &&
1 <= a <= 99) || ((a | b | c) [Element] Integers &&
Sqrt[10000 - a^2] + b <= 0 && -99 <=
a <= -1) || ((a | b | c) [Element] Integers &&
Sqrt[10000 - a^2] + b <= 0 &&
[etc.]

where I would expect something like

{{x $\rightarrow$ 3, y $\rightarrow$ 4, z $\rightarrow$ 5}, {x $\rightarrow$ 4, y $\rightarrow$ 3, z $\rightarrow$ 5}, {x $\rightarrow$ 5, y $\rightarrow$ 12, z $\rightarrow$ 13}...}

What am I doing wrong?

stevenvh
  • 7k
  • 5
  • 42
  • 64