Given the partition $\{0,\frac{\pi}{2},\,\pi\}$, find $L(P)$ and $U(P)$ for the integral $\int_0^{\pi}\cos(x)\,dx$.

Problem: 

Given the partition $\{0,\frac{\pi}{2},\,\pi\}$, find $L(P)$ and $U(P)$ for the integral $\int_0^{\pi}\cos(x)\,dx$.

Answer: 

$L(P)=-\frac{\pi}{2}$ and $U(P)=\frac{\pi}{2}$