Aloha :)
Hier bietet sich partielle Integraion an:$$\langle X\rangle=\frac{1}{\pi}\int\limits_0^\pi x\cdot\frac{1}{2}\sin(x)\,dx=\frac{1}{2\pi}\int\limits_0^\pi \underbrace{x}_{=u}\cdot\underbrace{\sin(x)}_{=v'}\,dx$$$$\phantom{\langle X\rangle}=\frac{1}{2\pi}\left(\left[\underbrace{x}_{=u}\cdot\underbrace{(-\cos(x))}_{=v}\right]_0^\pi-\int\limits_0^\pi \underbrace{1}_{=u'}\cdot\underbrace{(-\cos(x))}_{=v}\,dx\right)$$$$\phantom{\langle X\rangle}=\frac{1}{2\pi}\left(\pi-0+\int\limits_0^\pi\cos(x)\,dx\right)=\frac{1}{2\pi}\left(\pi+\left[\sin(x)\right]_0^\pi\right)=\frac{1}{2\pi}\left(\pi+0-0\right)=\frac{1}{2}$$
$$\langle X^2\rangle=\frac{1}{\pi}\int\limits_0^\pi x^2\cdot\frac{1}{2}\sin(x)\,dx=\frac{1}{2\pi}\int\limits_0^\pi \underbrace{x^2}_{=u}\cdot\underbrace{\sin(x)}_{=v'}\,dx$$$$\phantom{\langle X^2\rangle}=\frac{1}{2\pi}\left(\left[\underbrace{x^2}_{=u}\cdot\underbrace{(-\cos(x))}_{=v}\right]_0^\pi-\int\limits_0^\pi \underbrace{2x}_{=u'}\cdot\underbrace{(-\cos(x))}_{=v}\,dx\right)$$$$\phantom{\langle X^2\rangle}=\frac{1}{2\pi}\left(\pi^2-0+\int\limits_0^\pi 2x\cdot\cos(x)\,dx\right)=\frac{\pi}{2}+\frac{1}{\pi}\int\limits_0^\pi \underbrace{x}_{=u}\cdot\underbrace{\cos(x)}_{=v'}\,dx$$$$\phantom{\langle X^2\rangle}=\frac{\pi}{2}+\frac{1}{\pi}\left(\left[\underbrace{x}_{=u}\cdot\underbrace{\sin(x)}_{=v}\right]_0^\pi-\int\limits_0^\pi \underbrace{1}_{=u}\cdot\underbrace{\sin(x)}_{=v}\,dx\right)$$$$\phantom{\langle X^2\rangle}=\frac{\pi}{2}+\frac{1}{\pi}\left(0-0-\left[-\cos(x)\right]_0^\pi\right)=\frac{\pi}{2}+\frac{1}{\pi}\left(\cos(\pi)-\cos(0)\right)=\frac{\pi}{2}-\frac{2}{\pi}$$
Daher gilt für die Varianz:$$V(X)=\langle X^2\rangle-\langle X\rangle^2=\frac{\pi}{2}-\frac{2}{\pi}-\frac{1}{4}$$