I will very briefly explain the computation. Note that $\phi(31) = 2\cdot 3\cdot 5$ and in $(\Bbb Z/31\Bbb Z)^\times$, one could compute the order of subgroups $\left|\left<5\right>\right|=3$ ad $\left|\left<2\right>\right|=5$. Their corresponding intermediate fields are given by $$\operatorname{Fix}\left<\sigma_5\right> = \Bbb Q[\zeta+\zeta^5+\zeta^{25}]$$ $$\operatorname{Fix}\left<\sigma_2\right> = \Bbb Q[\zeta+\zeta^2+\zeta^{4}+\zeta^8+\zeta^{16}]$$
But I have trouble computing $\operatorname{Fix}\left<\sigma_2,\sigma_5\right>$, which corresponds to the (internel) direct sum of the two subgroups $\left<\sigma_2\right>\oplus\left<\sigma_5\right>$.
I know that $$\operatorname{Fix}\left<\sigma_2,\sigma_5\right>=\Bbb Q[\zeta+\zeta^5+\zeta^{25}]\cap \Bbb Q[\zeta+\zeta^2+\zeta^{4}+\zeta^8+\zeta^{16}]$$ but how could I compute the right hand side to get a single primitive element? I am looking for a general approach that could be applied to all cyclotomic extension of $\Bbb Q$.
Some attempts: $(\Bbb Z/31\Bbb Z)^\times=\left<3\right>$ while $5 = 3^{20}\pmod {31}$ and $2=3^{24}\pmod{31}$. Rewrite above intersection as $$\Bbb Q[\alpha] = \Bbb Q[\zeta+\zeta^{3^{20}}+\zeta^{3^{9}}]\cap \Bbb Q[\zeta+\zeta^{3^{24}}+\zeta^{3^{18}}+\zeta^{3^{6}}+\zeta^{3^{12}}]$$ for some $\alpha\in\Bbb Q[\zeta]$. We need $\operatorname{Gal}(\Bbb Q[\zeta]/\Bbb Q[\alpha]) = \left<\sigma_2,\sigma_5\right>=\left<\sigma_{3^{24}},\sigma_{3^{20}}\right>=\left<\sigma_3^3\right>=\left<\sigma_{9}\right>.$ But then this means we could just take $\alpha = \zeta+\zeta^{12}+\zeta^{12^2}+...$. We have used the generator here. In the general case, what if we do not have primitive roots?
For example, let $\zeta$ be the $63^{th}$ root of unity. There is no element of order $9$ in this case. How do we find the intermediate field corresponding to the subgroup of order $9$ in $\Bbb Q[\zeta]/\Bbb Q$?
Update: For this non-cyclic case above, i.e. subgroup of order $9$ in $\Bbb Q[\zeta_{63}]/\Bbb Q$ I have asked a new question here.