2. Given the functions $y=2 \cos \pi x(0 \leqslant x \leqslant 2)$ and $y=2(x \in$ $R$ ) whose graphs enclose a closed plane figure. Then the area of this figure is $\qquad$ .
2. As shown in the figure, by symmetry, the area of $CDE$ = the area of $AOD$ + the area of $BCF$, which means the shaded area is equal to the area of square $OABF$, so the answer is 4.