Solution (source code)

= Solution

The <sine> is nonnegative on $[0,\pi]$, so the geometric <area> equals the <definite integral>, without cancellation:
$$
\boxed{\int_0^\pi\sin x\,dx=[-\cos x]_0^\pi=2.}
$$