If $l \equiv 1$ mod 3 then $\mathbb{Q}(\zeta\_l)$ has a unique cubic subextension. I've been getting this field with the following magma code 



> 
> F:=CyclotomicField(l);
>  S:=Subfields(F);
>  for i:=1 to #S do
>  if Degree(S[i][1]) eq 3 then
>  return S[i][1];
>  end if;
>  end for;
> 
> 
> 


but this is very slow since it has to search through all the subfields. Does anyone know a faster way to get this cubic subextension?



fast way to get subextensions in magma?
You have a typo there and you want $\ell \equiv 1 \pmod 3$. With that, this has little to do with Magma. Gauss proved that the cubic extension is generated by $g=\sum\_{j=1}^{\ell-1} e^{2\pi i j^3/\ell}$. In pari-gp, if you compute $g$ with sufficient precision and do algdep(g,3) you get the cubic satisfied by $g$ and hence the field. Something similar can probably be done in magma. 


