5
$\begingroup$

Obviously,the equation $x^2-3 y^2=2 z^2$ doesn't have positive integer solutions.

I tried

Exists[{x, y, z}, x > 0 && y > 0 && z > 0 && x^2 - 3 y^2 == 2 z^2]
Resolve[%, Integers]

and

Exists[{x, y, z}, Element[{x, y, z}, Integers], 
 x > 0 && y > 0 && z > 0 && x^2 - 3 y^2 == 2 z^2]
Resolve[%]

but I don't get any useful result. Am I using these functions incorrectly?

$\endgroup$

1 Answer 1

3
$\begingroup$

Why obviously? In principle, if you want to solve diophantine equations, FindInstance with option Integers is what you need but (as the warning message below says) it can be insufficient in proving such solutions don't exist which seems to be what you want.

FindInstance[x^2 - 3 y^2 == 2 z^2 && z > 0, {x, y, z}, Integers]
$\endgroup$
5
  • 4
    $\begingroup$ The lack of any solution might not be "obvious," but Fermat's method of descent works well here. If we start with a primitive solution $(x,y,z)$ and reduce it mod $3$, we see easily that $x$ and $z$ are multiples of $3$: Solve[x^2 - 3 y^2 == 2 z^2, {x, y, z}, Modulus -> 3]. Dividing out by $3$ and reducing the new equation mod $3$ shows that $y$ also is a multiple of $3$: Solve[3 xp^2 - y^2 == 6 zp^2, {xp, y, zp}, Modulus -> 3]. This contradicts the assumption that we had a primitive solution, whence there can be no solutions. $\endgroup$
    – whuber
    Commented Mar 4, 2013 at 17:20
  • $\begingroup$ Thanks! I think your comment makes for a perfectly credible answer then. $\endgroup$
    – gpap
    Commented Mar 4, 2013 at 17:54
  • 1
    $\begingroup$ I don't believe my comment answers the question stated, which is whether Exists and Resolve have been "incorrectly" used. The question does explicitly presume the lack of all solutions, and your answer does challenge the basis of that presumption--which I think is a valid thing to do--so I commented only in order to address that tangential issue. $\endgroup$
    – whuber
    Commented Mar 4, 2013 at 17:58
  • $\begingroup$ @whuber The problem is how to state a "primitive" solution in such a way Mma can use it $\endgroup$ Commented Mar 4, 2013 at 22:20
  • $\begingroup$ @belisarius I'm afraid I don't understand what you mean by "state" a solution. The question I read here is "Am I using these functions incorrectly?" (BTW, if by the use of quotations you mean to suggest our use of "primitive" may be unusual or idiosyncratic, please be assured that is not the case: it is a standard, well-known term.) $\endgroup$
    – whuber
    Commented Mar 4, 2013 at 22:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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