I've just learned what the integral closure is.
I would like to find what is the intergral closure of $\mathbb{Z}$ in $\mathbb{Q}[i]$.
Let $\mathcal{R}$ the integral closure of $\mathbb{Z}$ in $\mathbb{Q}[i]$. To determine $\mathcal{R}$ I started to note that $$\mathbb{Z}[i]\subset \mathcal{R}.$$ Indeed if $\alpha = x+iy\in \mathbb{Z}[i]$, $\alpha$ is a root of the monic polynomial $$f(X)=X^2-2xX+x^2+y^2\in\mathbb{Z}[X].$$
And we know that since $\mathbb{Z}$ and $\mathbb{Q}[i]$ are rings so is $\mathcal{R}$.
From there I'm not sure, is it true that there exist no ring $A$ such that $$\mathbb{Z}[i] \subsetneq A \subsetneq \mathbb{Q}[i] \text{ ?}$$ I've assumed that and show that $1/2\notin \mathcal{R}$ for example, otherwise it exists a monic polynomial $f\in \mathbb{Z}[X]$ such that
$$f\left(\frac{1}{2}\right) =\frac{1}{2^n}+a_{n-1}\frac{1}{2^{n-1}}+\cdots+a_1\frac{1}{2}+a_0 =0$$
So
$$2^n f\left(\frac{1}{2}\right) =0 \iff -1=2\underbrace{(a_{n-1}+\cdots +2^{n-2}a_1+2^{n-1}a_0)}_{\in \mathbb{Z}}$$
which is impossible.
In conclusion $\mathbb{Q}[i]\not\subset\mathcal{R}$ so $\mathcal{R}=\mathbb{Z}[i]$.
Is my proof correct ? Is there an other (easier) way to prove that ? And the most important, is there exist a general method to find the integral closure please ?
Thank you for your help.
$X = a+ib \in \mathbb Q[i]$ is integral iff it is a solution of a monic polynomial in $\mathbb Z[X]$ of degree 1 or 2. Calculating $X^2$ we get
$X^2 -2aX +a^2 + b^2=0$.
Thus $-2a$ and $a^2 + b^2$ must be integers. So if $a$ is an integer, $b$ is an integer, giving us $\mathbb Z[i]$. If $a=\frac k 2$ with $k$ odd integer, we get $k^2/4 + b^2 \in \mathbb Z$ and so $4b^2 + k^2 \equiv 0 \pmod 4$, absurd.
There are a lots of methods to find a ring integers, but as far as I know there is not a standard method, unfortunately. For example the ring of integers of $\mathbb Q[\zeta_n]$, with $\zeta_n$ the $n$-th root of unit, is hard to compute (even if it's the expected $\mathbb Z[\zeta_n]$).