let $X$ be uniformly distributed on $[0,\pi]$
find $E(\sin(X))$ using Proposition 2.1, and then check the result by using the definition of expectation.
Proposition 2.1
If $X$ is a continuous random variable with probability density function $f (x)$, then, for any real-valued function $g$,
my solution using Proposition 2.1
$c=1/\pi$
$E(sin(x)) = integration ( 1 / \pi sin(x) dx ) = 2 / \pi $
how can I check result by results by using the definition of expectation ??

$$ \mathsf{E}\sin(X)=\int_0^\pi\frac{\sin(x)}{\pi}\,dx=\frac{2}{\pi}. $$