# Hilbert series for invariant ring

I would like to compute the Hilbert series of the ring of invariants of certain irreducible representations of some groups (namely $SO(5)$ to begin with).

To put it in some broader context, let $G$ be a simple complex Lie group with compact form $K$ and $V$ an irreducible representation of $G$. Choose $T \simeq (\mathbb{C}^*)^l$ a maximal torus of $G$, with $l$ being the rank of $G$.

The (excellent) book Computational invariant theory by H. Derksen and G. Kemper suggests the following strategy:

Let $((\mu_i, m_i)_{i \in I}$ be the list of weights/multiplicities of $V^*$, with $\mu_i: T \to \mathbb{C}^*$.

Define $$\chi_0(t) = \sum_{k=0}^\infty t^k \chi^{\mathrm{Sym}_k(V^*)}$$ with $\mathrm{Sym}_k(V^*)$ the $k$-th symmetric tensor power of $V^*$, i.e. the space of homogeneous polynomials of degree $k$ on $V$. Then it is not complicated to see that $$\chi_0(t, z) = \prod_{i \in I} \frac{1}{\left(1 - t z^{\mu_i}\right)^{m_i}},$$ where $z^\mu_i = \mu_i(z)$.

Let $D = \prod_{\alpha \in \Phi^+} (1 - z^{-\alpha})$ be the Weyl denominator. Then (Corollary 4.6.9) the Hilbert series $H(\mathbb{C}[V]^{G}, t)$ of $\mathbb{C}[V]^{G}$ (the subring of invariant polynomials) is given by the constant coefficient in $$\chi_0(t, z) D = \frac{\prod_{\alpha \in \Phi^+} (1 - z^{-\alpha})}{\prod_{i \in I} \left(1 - t z^{\mu_i}\right)^{m_i}}$$ seen as an element in $\mathbb{C}(t)[z_1, z_1^{-1}, \ldots, z_l, z_l^{-1}]$. It follows from the residue formula that we have $$H(\mathbb{C}[V]^{G}, t) = \frac{1}{(2\pi i)^l}\int_{\mathbb{U}^l} \chi_0(t, z) D \frac{dz_1}{z_1} \ldots \frac{dz_l}{z_l},$$ where $\mathbb{U} = \{z \in \mathbb{C}, |z|=1\}$.

The reasoning is clear to me but, when I put it on a computer and try to do explicit calculations for rank $2$ Lie groups things get nasty. Calculations work for $SO(4)$ (because of the isomorphism $\widetilde{SO}(4) = SU(2) \times SU(2)$) but already for $SO(5)$ the calculation is intractable (I have been using Sage). The representation I would be interested in is the one with highest weight $2 \overline{\omega}_2$, namely, the Cartan product of $$\Lambda_2 \mathbb{C}^5$$ with itself.

Is there any known modification to this formula and/or fast algorithm to compute the integral above?

In particular, is there any known mean to take advantage of the Weyl group of $G$? The integrand above is not invariant under the Weyl group but we could imagine computing $$\int_K \chi_0(t, g) d\mu(g)$$ where $\mu$ is the Haar measure of $K$ but means of the Weyl integration formula.

Any help would be invaluable.