In class, I was given the following definition for the different $D_{L/K}$ where $L$ is a finite extension of $K$, number fields:
It is the inverse of the fractional ideal of $L$ given by $\omega_{L/K}=\{x \in L \mid \operatorname{Tr}(xO_L) \subset O_K\}$
where $O_L$, $O_K$ are the rings of integers of $L,K$, respectively (and $\operatorname{Tr} = \operatorname{Tr}_{L/K}$)
So if I understand correctly, $D_{L/K}=\{ y \in L \mid y\omega_{L/K} \subset O_L\}$
but I find this completely intractable, and would like to know what efficient methods are used to achieve its computation.
To provide a concrete example, let $L = \mathbb{Q}(\alpha)$ with $\alpha^3-5\alpha+5=0$, $K = \mathbb{Q}$, $O_L=\mathbb{Z}[\alpha]$ and $O_K=\mathbb{Z}$
Apparently, in this case, $D_{L/K}=(3\alpha^2-5)\mathbb{Z}[\alpha]$, but no further explanations are given.
When I try to compute $D_{L/K}$, I quickly run into problems, for instance if I try to compute $\omega_{L/K}$:
$\omega_{L/K}=\{x \in \mathbb{Q}(\alpha) \mid \operatorname{Tr}(x\mathbb{Z}[\alpha]) \subset \mathbb{Z}\}$
If I take $x=a\alpha^2+b\alpha+c$ with $a,b,c \in \mathbb{Q}$, then $\operatorname{Tr}(x)=a\operatorname{Tr}(\alpha^2)+b\operatorname{Tr}(\alpha)+c$
with $\operatorname{Tr}(\alpha)=\operatorname{Tr} \begin{bmatrix} 0 & 0 & -5 \\ 1 & 0 & 5 \\ 0 & 1 & 0 \end{bmatrix}=0$
and $\operatorname{Tr}(\alpha^2)=\operatorname{Tr} \begin{bmatrix} 0 & -5 & 0 \\ 0 & 5 & -5 \\ 1 & 0 & 5 \end{bmatrix}=10$
So $\operatorname{Tr}(x)=10a+c$
Now if $x=(a\alpha^2+b\alpha+c)(n+m\alpha+p\alpha^2)$
Then, up to calculation mistakes, $x=a'\alpha^2+b'\alpha+c'$, with $a'=an+mb+5pa+pc$ and $c'=cn-5ma-5pb$
So I am looking for the $a,b,c \in \mathbb{Q}$ such that $10a'+c' \in \mathbb{Z}$ for all $m,n,p \in \mathbb{Z}$
and I want to give up now, because not only does this look difficult but I also have to invert the ideal after that. This is probably not impossible, but it looks extremely inefficient at best, especially when the answer provided did not contain additional information, as if it were obvious
Hence my question, how does one compute efficiently the different? If it is not possible in general, are there special cases when it is easy?
First, one can compute the trace form of $L/K$; in your example its matrix is given in the basis $1,\alpha,\alpha^2$ by $$ T = \begin{pmatrix} 3 & 0 & 10\\ 0 & 10 & -15\\ 10 & -15 & 50 \end{pmatrix} $$ Its determinant is the discriminant $\Delta$ of the number field; in your example $\Delta = -175$.
Now, the different ideal $\delta_{L/K}$ has the following two properties:
Thus, in your example one can take $\zeta=\alpha$; then its minimal polynomial is $f(x) = x^3 -5x+5$, and $f'(\alpha) = 3\alpha^2-5$. So, we are done if we see that $(3\alpha^2-5)O_L$ has index $175$ in $O_L$. The multiplication matrix by $3\alpha^2-5$ is given by $$ \begin{pmatrix} -5 & 0 & 3\\ -15 & 10 & 0\\ 0 & -15 & 10 \end{pmatrix} $$ whose determinant is $175$, so we're done. In general it could happen that one element is not enough, then one has to take another integer and comute its different (but of course, in the end one only has to check finitely many).