# Why do we only consider quadratic domains as Euclidean domains with squarefree integers?

I have been reading "Introductory algebraic number theory" by Alaca and Williams, and in the opening chapters they use the quadratic domains $\mathbb{Z}+\mathbb{z}(\sqrt{m})$ for non-square $m$ and $\mathbb{Z}+\mathbb{Z}\Big(\frac{1+\sqrt{m}}{2}\Big)$ where $m\equiv1 \mod{4}$ and non-square.

In the chapter on Euclidean domains, it defines and proves a number of results about the norms $\phi_m$ where for $x,y \in \mathbb{Q}, \phi_m(x+y\sqrt{m})=|x^2-my^2|$ where $m$ is now a squarefree integer, and go into much detail about conditions under which e.g. $\mathbb{Z}+\mathbb{Z}(\sqrt{m})$ is a Euclidean domain with respect to this function, but only for for squarefree $m$.

My question is: Why do we make this distinction? As far as I can tell, there is no reason to exclude, for example, $\mathbb{Z}+\mathbb{Z}(\sqrt{8})$. $\phi_8$ appears to behave in all the ways we want it to and seems to be a candidate for a euclidean function on the domain. I know that this is a subdomain of $\mathbb{Z}+\mathbb{Z}(\sqrt{2})$, but the book itself has exercises where it is shown that certain subdomains of norm-euclidean domains are not euclidean with respect to any function, so we can't always make observations about subdomains from our knowledge of larger ones.

The reason they do this is because $\mathbb{Z}+\mathbb{Z}(\sqrt{8})$ or more generally $R=\mathbb{Z}+\mathbb{Z}(k\sqrt{m})$, for $m$ squarefree and $k>1$ is not integrally closed. This means that there are elements $x$ of the fraction field Frac$R=K=\mathbb{Q}(\sqrt{m})$ that are not in $R$ which satisfy an equation of the form $$x^n +a_{n-1}x^{n-1}+\ldots+a_0=0.$$ for $a_i\in\mathbb{Z}$. In our case $x=\sqrt{m}$ is such an element satisfying $x^2-m=0$. However all euclidean domains are integrally closed as they are unique factorisation domains.
Added proof of the above fact: If $x\in K$ we have a prime decomposition $x=\prod_i p_i^{e_i}$ where the $e_i$ can also be negative. Suppose $e_1,\ldots,e_k$ are negative. If $x$ is integral over $R$ then $$x^n = -a_{n-1}x^{n-1}+\ldots+a_0.$$ After multiplying both sides by $(p_1^{e_1}\cdot\ldots\cdot p_k^{e_k})^n$ the left hand side is in $R$ and not divisible by $p_1$ while the right hand side is in $R$ and divisible by $p_1$, so we have a contradiction. So $x\in R$.
First, $\mathbb Q(\sqrt{8})$ is really just the same as $\mathbb Q(\sqrt{2})$, since $$\mathbb Q(\sqrt{8})=\{a+b\sqrt{8}\mid a,b\in\mathbb Q\}=\{a+b\cdot 2\sqrt{2}\mid a,b\in\mathbb Q\}=\{a+b'\sqrt{2}\mid a,b'\in\mathbb Q\}=\mathbb Q(\sqrt{2})$$ So, the fraction field of $\mathbb Z[\sqrt{8}]$ is just $\mathbb Q(\sqrt{8}) = \mathbb Q(\sqrt{2})$, whose ring of integers is $\mathbb Z[\sqrt{2}]\neq \mathbb Z[\sqrt{8}]$.
Hence, $\mathbb Z[\sqrt{8}]$ is not even integrally closed, let alone Euclidean, a PID or a UFD. Same goes for all non-squarefree integers.