<s>[INST] Let $x \in \mathbb{N}$. Prove that if $x$ is odd, then $\sqrt{2x}$ is not an integer. I need help verifying my proof the following theorem:
Let $x$ be a natural number. Prove that if $x$ is odd, then $\sqrt{2x}$ is not an integer.
The following are the definitions of even and odd numbers:
Definition 3.1. An integer $x$ is odd if there is an integer $n$ such that $x = 2n+1$
Definition 3.2. An integer $x$ is even if there is an integer $n$ such that $x = 2n$

$Proof.$
The contrapositive of the statement is: If $\sqrt{2x}$ is an integer, then $x$ is even.
Because an integer is odd or even and not both and $x$ is a natural number,
\begin{align*}
\sqrt{2x} &= 2n+1 \qquad &\text{for some positive integer n (Definition 3.1)};\\
\qquad &\text{or}\\
\sqrt{2x} &= 2m \qquad &\text{for some positive integer m (Definition 3.2)};\\
\qquad &\text{and not both.}
\end{align*}
In case $\sqrt{2x}$ is odd:
\begin{align*}
(\sqrt{2x})^{2} &= (2n+1)^{2}\\
2x &= 4n^2 + 4n +1\\
x &= 2n^2 + 2n + \frac{1}{2}\\
x &= 2(n^2 + n) + \frac{1}{2}
\end{align*}
Because $n^2 + n$ is some integer, $2(n^2 + n)$ is even (Definition 3.2).
Since no even number added by $\frac{1}{2}$ is an integer, $\sqrt{2x}$ is not odd.
In case $\sqrt{2x}$ is even:
\begin{align*}
(\sqrt{2x})^{2} &= (2m)^{2}\\
2x &= 4m^2\\
x &= 2m^2
\end{align*}
Because $m^2$ is some integer, $2m^2$ is even (Definition 3.2).
Because each implications and its contrapositive are equivalent, given that $x$ is a natural number, if $x$ is odd, then $\sqrt{2x}$ is not an integer.

The question is from the book:
Daepp, U., & Gorkin, P. (2011). Reading, writing, and proving: A closer look at mathematics. In Reading, writing, and proving: A closer look at mathematics (2nd ed., p. 31). New York: Springer.
 [/INST] Another proof is that if $y=2x$ with $x$ odd, then $2|y$ but $4 \nmid y$.
Hence $\sqrt{y}=k \implies y=k^{2}={p_{1}}^{2}\cdot\cdot\cdot {p_{n}}^{2}$, a contradiction since $p_{i}=2$ for some $i$.
</s>