# discriminants in ring of integers

I've been trying to solve the following problem:

Find the ring of integer of $$\mathbb{Q}(\theta)$$ when $$\theta^3 + \theta + 1 = 0$$.

I started by computing the discriminant, which is $$-31$$. Then I said since the discriminant is square free and $$\theta$$ is clearly integral over $$\mathbb{Q}$$, then the ring of integers of $$\mathbb{Q}(\theta)$$ is $$\mathbb{Z}[\theta]$$. Am I right?

I will write $$t$$ instead of $$\theta$$. So we work in the field $$K=\Bbb Q[T]/(T^3+T+1)=\Bbb Q[t]$$, where $$t$$ is the image of $$T$$ modulo the ideal $$(T^3+T+1)$$. Consider the basis as a $$\Bbb Q$$ vector space of $$K$$ given by the algebraic integers $$1,\ t,\ t^2\ .$$ We fix an embedding of $$K$$ into $$\Bbb C$$, let $$t_1$$ be the image of $$t$$. The polynomial $$X^3+X+1\in K[X]$$ has three roots in $$\Bbb C$$, one is $$t_1$$, and let $$t_2,t_3$$ be the other two. There are thus three embeddings $$\sigma_k:K \to \Bbb C$$, given by $$\sigma_k:t\to t_k$$. The discriminant of the basis $$1,t,t^2$$ is now (in my very ad-hoc computation): \begin{aligned} \Delta[1,t,t^2] &=\det{}^2(\ (\sigma_k(t_j))_{1\le j,k\le 3}\ )\\ &= \begin{vmatrix} 1&1&1\\ t_1&t_2&t_3\\ t_1^2&t_2^2&t_3^2 \end{vmatrix}^2 \\ &=(\ (t_1-t_2)(t_1-t_3)(t_2-t_3)\ )^2\text{ (Vandermonde)} \\ &=-(t_1-t_2)(t_1-t_3) \cdot (t_2-t_1)(t_2-t_3)\cdot(t_3-t_1)(t_3-t_2) \\ &=-\prod(t_1-t_2)(t_1-t_3)=-\prod(t_1^2-(t_2+t_3)t_1+t_2t_3) \\ &=-\prod(2t_1^2-(t_1+t_2+t_3)t_1+t_2t_3)=-\prod(2t_1^2+t_2t_3) \\ &=-\prod\frac 1{t_1}(2t_1^3+t_1t_2t_3) =-\frac 1{t_1t_2t_3}\prod(2t_1^3-1) \\ &=-\frac 1{-1}\prod(-2t_1-2-1)=-(2t_1+3)(2t_2+3)(2t_3+3) \\ &=-(27+18\sum t_1+12\sum t_1t_2+8t_1t_2t_3) \\ &=-(27+0+12-8)=-31\ . \\[3mm] &\text{Alternatively one can comuute the resultant} \\ \Delta[1,t,t^2] &=\pm\operatorname{Resultant}(\ X^3+X+1\ ,\ (X^3+X+1)'\ ) \\ &= \pm \begin{vmatrix} 1 & 0 & 1 & 1 & \\ & 1 & 0 & 1 & 1\\ 3 & 0 & 1 & & \\ & 3 & 0 & 1 & \\ & & 3 & 0 & 1 \end{vmatrix} \end{aligned} (The sign factor above is $$(-1)$$ to the power $$3(3-1)/2$$, so it is $$-1$$.)
Now we come to your question. We have the discriminant computed for the integral basis $$1,t,t^2$$, it is $$-31$$ and it is squarefree. Well, in this case the base is integral. In the hypothetical case of an integral system $$(v_1,v_2,v_3)$$ with a discriminant $$\Delta[v_1,v_2,v_3]\in\Bbb Z$$ where there is a prime factor $$p$$ that appears to the power $$\ge$$ two in the discriminant, then we may search for an integral linear combination of the shape $$\frac 1p(n_1 v_1+n_2v_2+n_3v_3)$$, which is guaranteed to exist.