# Can mathematica resolve this equation?

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?

-

## 1 Answer

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]
````
-

4
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. – whuber Mar 4 at 17:20
Thanks! I think your comment makes for a perfectly credible answer then. – gpap Mar 4 at 17:54

1
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. – whuber Mar 4 at 17:58
@whuber The problem is how to state a "primitive" solution in such a way Mma can use it – belisarius Mar 4 at 22:20
– whuber Mar 4 at 22:43
lang-mma
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 10, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.914339542388916, "perplexity_flag": "middle"}