Skip to main content
edited tags
Link
Mr.Wizard
  • 273.1k
  • 34
  • 595
  • 1.4k
added 152 characters in body
Source Link
Dr. belisarius
  • 116.2k
  • 13
  • 205
  • 456

When I compute the following expression to find integer solutions of the equation (x^2 + y^2 + z^2 == 14^2)

Solve[x^2 + y^2 + z^2 == 14^2 && x > 0 && y > 0 && z > 0, {x, y, z}, Integers]

Mathematica returns

{{x -> 4, y -> 6, z -> 12}, {x -> 4, y -> 12, z -> 6}, {x -> 6, y -> 4, z -> 12}, 
 {x -> 6, y -> 12, z -> 4}, {x -> 12, y -> 4, z -> 6}, {x -> 12, y -> 6, z -> 4}}

which are permutations of the only solution: x=4, y=6, z=12.

How can I remove other "solutions" by somehow merging the permutations? For me, x, y, and z are equivalent.


I don't want to do the following:

First[Solve[x^2 + y^2 + z^2 == 14^2 && x > 0 && y > 0 && z > 0, {x, y, z}, Integers]]

Because I will also solve:

Solve[x^2 + y^2 + z^2 == 14^3 && x > 0 && y > 0 && z > 0, {x, y, z}, Integers]

which has more than one solution.


Edit (by belisarius)

Is there a way to specify the equivalency to Solve[] or Reduce[] so to spare the results post-processing stage?

When I compute the following expression to find integer solutions of the equation (x^2 + y^2 + z^2 == 14^2)

Solve[x^2 + y^2 + z^2 == 14^2 && x > 0 && y > 0 && z > 0, {x, y, z}, Integers]

Mathematica returns

{{x -> 4, y -> 6, z -> 12}, {x -> 4, y -> 12, z -> 6}, {x -> 6, y -> 4, z -> 12}, 
 {x -> 6, y -> 12, z -> 4}, {x -> 12, y -> 4, z -> 6}, {x -> 12, y -> 6, z -> 4}}

which are permutations of the only solution: x=4, y=6, z=12.

How can I remove other "solutions" by somehow merging the permutations? For me, x, y, and z are equivalent.


I don't want to do the following:

First[Solve[x^2 + y^2 + z^2 == 14^2 && x > 0 && y > 0 && z > 0, {x, y, z}, Integers]]

Because I will also solve:

Solve[x^2 + y^2 + z^2 == 14^3 && x > 0 && y > 0 && z > 0, {x, y, z}, Integers]

which has more than one solution.

When I compute the following expression to find integer solutions of the equation (x^2 + y^2 + z^2 == 14^2)

Solve[x^2 + y^2 + z^2 == 14^2 && x > 0 && y > 0 && z > 0, {x, y, z}, Integers]

Mathematica returns

{{x -> 4, y -> 6, z -> 12}, {x -> 4, y -> 12, z -> 6}, {x -> 6, y -> 4, z -> 12}, 
 {x -> 6, y -> 12, z -> 4}, {x -> 12, y -> 4, z -> 6}, {x -> 12, y -> 6, z -> 4}}

which are permutations of the only solution: x=4, y=6, z=12.

How can I remove other "solutions" by somehow merging the permutations? For me, x, y, and z are equivalent.


I don't want to do the following:

First[Solve[x^2 + y^2 + z^2 == 14^2 && x > 0 && y > 0 && z > 0, {x, y, z}, Integers]]

Because I will also solve:

Solve[x^2 + y^2 + z^2 == 14^3 && x > 0 && y > 0 && z > 0, {x, y, z}, Integers]

which has more than one solution.


Edit (by belisarius)

Is there a way to specify the equivalency to Solve[] or Reduce[] so to spare the results post-processing stage?

reformatted equations
Source Link
bbgodfrey
  • 62.1k
  • 18
  • 92
  • 160

When I compute the following expression to find integer solutions of the equation (x^2 + y^2 + z^2 == 14^2)(x^2 + y^2 + z^2 == 14^2)

Solve[x^2 + y^2 + z^2 == 14^2 && x > 0 && y > 0 && z > 0, {x, y, z}, Integers]

Mathematica returns

{{x -> 4, y -> 6, z -> 12}, {x -> 4, y -> 12, z -> 6}, {x -> 6, y -> 4, z -> 12}, 
 {x -> 6, y -> 12, z -> 4}, {x -> 12, y -> 4, z -> 6}, {x -> 12, y -> 6, z -> 4}}

which are permutations of the only solution: x=4, y=6, z=12.

How can I remove other "solutions" by somehow merging the permutations? For me, x, y, and z are equivalent.


I don't want to do the following:

First[Solve[x^2 + y^2 + z^2 == 14^2 && x > 0 && y > 0 && z > 0, {x, y, z}, Integers]]

Because I will also solve:

Solve[x^2 + y^2 + z^2 == 14^3 && x > 0 && y > 0 && z > 0, {x, y, z}, Integers]

which has more than one solution.

When I compute the following expression to find integer solutions of the equation (x^2 + y^2 + z^2 == 14^2)

Solve[x^2 + y^2 + z^2 == 14^2 && x > 0 && y > 0 && z > 0, {x, y, z}, Integers]

Mathematica returns

{{x -> 4, y -> 6, z -> 12}, {x -> 4, y -> 12, z -> 6}, {x -> 6, y -> 4, z -> 12}, {x -> 6, y -> 12, z -> 4}, {x -> 12, y -> 4, z -> 6}, {x -> 12, y -> 6, z -> 4}}

which are permutations of the only solution: x=4, y=6, z=12.

How can I remove other "solutions" by somehow merging the permutations? For me, x, y, and z are equivalent.


I don't want to do the following:

First[Solve[x^2 + y^2 + z^2 == 14^2 && x > 0 && y > 0 && z > 0, {x, y, z}, Integers]]

Because I will also solve:

Solve[x^2 + y^2 + z^2 == 14^3 && x > 0 && y > 0 && z > 0, {x, y, z}, Integers]

which has more than one solution.

When I compute the following expression to find integer solutions of the equation (x^2 + y^2 + z^2 == 14^2)

Solve[x^2 + y^2 + z^2 == 14^2 && x > 0 && y > 0 && z > 0, {x, y, z}, Integers]

Mathematica returns

{{x -> 4, y -> 6, z -> 12}, {x -> 4, y -> 12, z -> 6}, {x -> 6, y -> 4, z -> 12}, 
 {x -> 6, y -> 12, z -> 4}, {x -> 12, y -> 4, z -> 6}, {x -> 12, y -> 6, z -> 4}}

which are permutations of the only solution: x=4, y=6, z=12.

How can I remove other "solutions" by somehow merging the permutations? For me, x, y, and z are equivalent.


I don't want to do the following:

First[Solve[x^2 + y^2 + z^2 == 14^2 && x > 0 && y > 0 && z > 0, {x, y, z}, Integers]]

Because I will also solve:

Solve[x^2 + y^2 + z^2 == 14^3 && x > 0 && y > 0 && z > 0, {x, y, z}, Integers]

which has more than one solution.

Source Link
Loading