Ring of integers of $\mathbb{Q}(a)$ I am stuck with this exercise in my home work, could use a hand:
Let $a$ be a root of the irreducible polynomial $f(x)=x^3+x+1$.
Show that the ring of integers of $F:=\mathbb{Q}(a)$ is $\mathbb{Z} + \mathbb{Z}a + \mathbb{Z}a^2$.
Thanks in advance! 
 A: The quicke answer, (the other answer is due to me also, so if you upvote one be sure to downvote the other !)
$\{1,a,a^2\}$ is an integral basis. As seen from calculating the discriminant of the equation $x^3+x+1$ using Cardano's formula
$$\Delta=-27q^2-4p^2=-27-4=-31$$
(Oh lookie here where have I seen $31$ before ?)
Now if $D$ is the discriminant of the field, then 
$$\Delta=\pm k^2D$$ we see this is only possible if
$$\Delta=\pm D$$ and this implies that $\{1,a,a^2\}$ is an integral basis.
A: Here is just an ad hoc solution, there is probably a better one using algebraic number theory. Let 
$$x^3+x+1=(x-a)(x-b)(x-c)$$
and let $$x+ya+za^2$$ be an algebraic integer.
Multiplying by $a$ and then by $a^2$ and simpifying we get that 
$$-z+(x-z)a+ya^2$$
and 
$$-y-(y+z)a+(x-z)a^2$$ 
are also integers.  
Now consider
$$x+ya+za^2$$
$$x+yb+zb^2$$
$$x+yc+zc^2$$
adding then together we have 
$3x-2z$ is an integer. 
Where we use that $a^2+b^2+c^2=(a+b+c)^2-2(ab+bc+ac)=-2$
Applying the same trick to the other integers we get that $-3z-2y$ and $-3y-2x+2z$ are also integers. 
This means that 
$$\begin{pmatrix}3&0&-2\\
0&-2&-3\\
-2&-3&2\\
\end{pmatrix}\begin{pmatrix}x\\y\\z\\
\end{pmatrix}$$  is an integer vector.
Using (integer!) row reduction we have that 
$$\begin{pmatrix}1&0&-11\\
0&1&-14\\
0&0&31\\
\end{pmatrix}\begin{pmatrix}x\\y\\z\\
\end{pmatrix}$$  is an integer vector.
Thus we see that $31z$ is an integer and $x=n+11z$, and $y=m+14z$.
Thus the whole problem reduces to the question of whether 
$$\alpha=\frac{a^2+14a+11}{31}$$ is an integer or not.
It is not an integer, as one sees by calculating $\alpha^3$.
