Given the partition $\{0,\frac{\pi}{2},\,\pi\}$, $\bar{x}_1=0$, and $\bar{x}_2=\frac{\pi}{2}$, find the Riemann sum $R(P)$ for the integral $\int_0^{\pi}\cos(x)\,dx$.

Problem: 

Given the partition $\{0,\frac{\pi}{2},\,\pi\}$, $\bar{x}_1=0$, and $\bar{x}_2=\frac{\pi}{2}$, find the Riemann sum $R(P)$ for the integral $\int_0^{\pi}\cos(x)\,dx$.

Answer: 

$R(P)=\frac{\pi}{2}$