Compute expected value of xsinx

362 Views Asked by At

Can someone shed some light on how to compute the expected value of $x \sin (x)$ and $\cos^2(x)$,as $x\sim U(-\pi/2,\pi/2)$?

Thanks

2

There are 2 best solutions below

14
On BEST ANSWER

Sure, you can compute expected value of a quantity by integrating over all possible states with the probability of being in that state times the value of the quantity of interest in that state: \begin{equation} E[y] = \int_{\mathbb{R}} y(a) P(a) da \end{equation}

In this case $P(a)$ is the pdf of $U(-\pi/2,\pi/2)$ and $y(x) = x \sin(x)$ for the first part, $y(x) = \cos^2(x)$ for the second.

Always happy to help :)

1
On

Note $E[g(X)] = \int_{\mathbb{R}} g(x) f(x) dx$ where $X \sim f$.

So, if $X \sim U(-\pi/2,\pi/2)$, then $E[g(X)] = \int_{-\pi/2}^{\pi/2} g(x) \frac{1}{\pi} dx$.

Now, take $g(x) = x \sin x$ and $g(x) = \cos^2 x$ and do the integrals.