Compute $E(\sin X)$ if $X$ is normally distributed

Let $X\sim \mathcal{N}(\mu,\sigma)$. Then, the characteristic function of $X$ is

$$t\mapsto\phi_{X}(t):=\Bbb E[\exp(itX)]=\exp\left(i\mu-\frac{\sigma^{2}t^{2}}{2}\right)$$

By linearity of the integral, we have, for any integrable complex-valued function $f$:

$$\mathfrak{Im}\int f=\int \mathfrak{Im} f \tag{1}$$

where $\mathfrak{Im}$ denotes the imaginary part of a complex number and is defined pointwise for a complex-valued function. Indeed, let $(\Omega,\mathcal{F},\nu)$ be a measure space and $f:\Omega\to\Bbb C$ a $\nu$-integrable function. Then, for any $\omega\in\Omega$, we can write:

$$f(\omega)=f_{1}(\omega)+if_{2}(\omega)$$

where $f_{1}$ and $f_{2}$ are real-valued function on $\Omega$. It is easy to see that $f_{1}$ and $f_{2}$ are integrable if $f$ is integrable (actually, if and only if). Therefore, we have:

$$\int_{\Omega} f\text{d}\nu=\int_{\Omega}f_{1}+if_{2}\text{d}\nu:=\int_{\Omega}f_{1}\text{d}\nu+i\int_{\Omega}f_{2}\text{d}\nu$$

$(1)$ follows obviously.

Hence, we have:

\begin{align*} \Bbb E[\sin(X)]&=\,\Bbb E[\mathfrak{Im}\exp(iX)]\\ &=\mathfrak{Im}\,\Bbb E[\exp(iX)]\\ &=\mathfrak{Im}\,\Bbb \phi_{X}(1)\\ &=\mathfrak{Im}\exp\left(i\mu-\frac{\sigma^{2}}{2}\right)\\ &=\sin(\mu)\exp\left(-\frac{\sigma^{2}}{2}\right) \end{align*}