# MMA

- author: Dmytro Karabash
- categories: [MMA, diophantine equations]
- permalink: /temp/

<h1>Table of Contents<span class="tocSkip"></span></h1>
<div class="toc"><ul class="toc-item"><li><span><a href="#Problem-1.-Does-equation-$x^{2}+y^{2}+z^{2}=2-x-y-z-\tag{1}$-have-any-non-zero-integer-solutions?" data-toc-modified-id="Problem-1.-Does-equation-$x^{2}+y^{2}+z^{2}=2-x-y-z-\tag{1}$-have-any-non-zero-integer-solutions?-1"><span class="toc-item-num">1&nbsp;&nbsp;</span>Problem 1. Does equation $x^{2}+y^{2}+z^{2}=2 x y z \tag{1}$ have any non-zero integer solutions?</a></span><ul class="toc-item"><li><span><a href="#Problem-1-Solution-1" data-toc-modified-id="Problem-1-Solution-1-1.1"><span class="toc-item-num">1.1&nbsp;&nbsp;</span>Problem 1 Solution 1</a></span><ul class="toc-item"><li><span><a href="#Insight-1:-consider-mod-2" data-toc-modified-id="Insight-1:-consider-mod-2-1.1.1"><span class="toc-item-num">1.1.1&nbsp;&nbsp;</span>Insight 1: consider mod 2</a></span></li></ul></li><li><span><a href="#Problem-1-Solution-2" data-toc-modified-id="Problem-1-Solution-2-1.2"><span class="toc-item-num">1.2&nbsp;&nbsp;</span>Problem 1 Solution 2</a></span><ul class="toc-item"><li><span><a href="#Insight-1:-Vieta" data-toc-modified-id="Insight-1:-Vieta-1.2.1"><span class="toc-item-num">1.2.1&nbsp;&nbsp;</span>Insight 1: Vieta</a></span></li></ul></li></ul></li><li><span><a href="#Insight-2:-Substitue" data-toc-modified-id="Insight-2:-Substitue-2"><span class="toc-item-num">2&nbsp;&nbsp;</span>Insight 2: Substitue</a></span></li></ul></div>

## Problem 1. Does equation $x^{2}+y^{2}+z^{2}=2 x y z \tag{1}$ have any non-zero integer solutions?

#collapse

### Problem 1 Solution 1

#### Insight 1: consider mod 2

Right hand side is even so there are two cases x,y,z are all even or one of them is even.

Case 1: If one of them is even then LHS(1) is 2 (mod 4) and RHS(1) is 0 (mod 4). Contradiction.

Case 2:If all of them are even divide the equation by the highest power of two that divides all of them, i.e. $$x=2^k x_0,y=2^k y_0,z=2^k z_0$$ and at least one of $x_0,y_0,z_0$ is odd, but then dividing equation by $2^{2k}$ we get
$$x_0^{2}+y_0^{2}+z_0^{2}=2^{k+1} x y z $$
and you can apply the argument from case 1 obtaining contradiction.

#collapse

> Note: when writting a proof you can skip extra circle of logic and go straight to case 2, hence the proof would just be:
> Let $k$ be highest power of 2 dividing $x$,$y$ and $z$, i.e $x=2^k x_0,y=2^k y_0,z=2^k z_0$  and at least one of $x_0,y_0,z_0$ is odd.  Dividing equation by $2^{2k}$ we obtain
$x_0^{2}+y_0^{2}+z_0^{2}=2^{k+1} x y z \tag{2}$ and since at least one of $x_0,y_0,z_0$ is odd, and RHS(2) is even exactly two of $x_0,y_0,z_0$ must be odd but then LHS(2) is 2 mod 4 and RHS(2) is 0 mod 4. Contradiction. 

#collapse

### Problem 1 Solution 2

#### Insight 1: Vieta
\begin{align}
\mathbb 0  &= x^{2}-(2 y z) x +y^{2}+z^{2} \\
x_1+x_2& = 2yz\\
x_1x_2& = y^2+z^2
\end{align}



```python

```

#collapse

## Insight 2: Substitue
\begin{align}
x_1+x_2 & = 2yz  \\
x_1x_2  & = y^2 + z^2
\end{align}
which gives us
\begin{align}
x_2 & = 2yz - x_1 \\
x_2 & = \frac{y^{2}+z^{2}}{x_1} \\
\end{align}


```python

```

ipynb
e28e470887b6fbf19d6791afec0954a71e53aed9
Jupyter Notebook
8bc31ec83974658b10d3d1a185df7545cc089347
Apache-2.0
h17/temp
_notebooks/2021-07-25-MMA.ipynb
8bc31ec83974658b10d3d1a185df7545cc089347
2022-02-26T07:42:41.000Z
2022-02-26T07:42:41.000Z
Apache-2.0
h17/mma
_notebooks/2021-07-25-MMA.ipynb
8bc31ec83974658b10d3d1a185df7545cc089347
Apache-2.0
h17/mma
_notebooks/2021-07-25-MMA.ipynb