Solved – Expected Value of $X \sin(X)$ with $X$ normally distributed

expected valuenormal distributionprobability

I want to solve the following expected value problem. Let's say $X$ is normally distributed so that $X \sim N(m,s^2)$. I want to find the expected value,

$$E[X\sin(X)]$$

that is equal to

$$\frac{1}{\sqrt{2\pi s^2}} \int_{-\infty}^\infty \exp(\frac{_{-(x-m)^2}}{^{2s^2}})\, x\,\sin(x)\, dx$$

Does anyone have an idea how to simplify this?

EDIT: thanks guys for helping me out!

Best Answer

Like many exercises involving trigonometric functions, the trick is to use complex numbers, i.e., $\int(\sin(x))\mathrm{d}x = \int Im(e^{ix})\mathrm{d}x = Im(\int e^{ix} \mathrm{d}x)$ here.

Knowing, the sum becomes \begin{align} I \triangleq \mathbb{E}[X\sin(X)] = Im \left( \int_{\mathbb{R}} x e^{ix} e^{-\frac{1}{2\sigma^2} (x-\mu)^2} \mathrm{d}x \right) . \end{align}

To compute this sum, we have to factorise the two exponential terms. A rule of thumb for such calculation is that a gaussian stays gaussian when multiplied by an exponential term of the form $e^{ax}$. I let you do the math, but one can write \begin{equation} -\frac{1}{2\sigma^2} (x-\mu)^2 + ix = -\frac{1}{2 \sigma^2}\big( x- (\mu+i\sigma^2) \big)^2 + i\mu - \frac{\sigma^2}{2} . \end{equation}

Then, by recognising the expectation of a new gaussian distribution \begin{align} I =& Im \left( e^{-\frac{\sigma^2}{2} + i\mu} \int_{\mathbb{R}} \frac{1}{\sqrt{2\pi \sigma^2}} x e^{-\frac{1}{2\sigma^2}(x - \mu - i\sigma^2)^2} \mathrm{d}x \right) \\ =& Im \left( e^{-\frac{\sigma^2}{2} + i\mu} \times (\mu + i \sigma^2) \right) \\ =&e^{-\frac{\sigma^2}{2}} \times \left( \sigma^2 \cos(\mu) + \mu \sin(\mu) \right), \end{align}

which corresponds to wolfies's answer.

Related Question