Suppose I have some random variable $W$ along with its expectation $\mathbb{E}[W]$. My goal it to compute the integral
\begin{equation} \mathbb{E}\left[\int_{0}^{W}f(t)dt\right] = \int_{0}^{\mathbb{E}[W]}f(t)dt \end{equation}
Is the equality correct? If not, then what would be the correct result? Or is there any known theorem for this? Appreciate if anyone can provide such references.