I have a random variable $X \sim \operatorname{Gamma}(\alpha, \beta)$.


How can I compute or approximate $\mathbb{E} \sin(X)$ very quickly? Iterative quadrature would be too slow, I need some closed form expression.


One idea I considered was to use the Gamma moments and Tyler approximation, but it would take too many terms, since $X$ has large standard deviation (in the order of 10–50) and so the mass is not tightly concentrated.



Expected value of sin(X) for Gamma r.v. X in closed form (approximation is fine)
You can use the characteristic function. From [Wikipedia](https://en.wikipedia.org/wiki/Gamma_distribution), we have $$E[e^{itX}] = 
\left(1 - \frac{it}{\beta} \right)^{-\alpha}.$$


You have to be a bit careful when $\alpha$ isn't an integer, as you have a branch cut.


This means that $E[\sin(X)] = \operatorname{Im}\left[ \left(1 - \beta^{-1} i \right)^{-\alpha} \right]$. Writing $1 - \beta^{-1}i = r e^{i \theta}$ with $r = (1 + \beta^{-2})^{1/2}$ and $\theta = -\arctan(\beta^{-1})$ gives \begin{align}
\operatorname E[ \sin(X)] & = r^{-\alpha} \operatorname{Im}(e^{-i\theta \alpha}) \\[8pt]
& = (1 + \beta^{-2})^{-\alpha/2} \sin\left(\alpha \arctan(\beta^{-1}) \right).
\end{align}


