2. In the Cartesian coordinate system $x O y$, the graph of the function $f(x)=a \sin a x+\cos a x(a>0)$ over an interval of the smallest positive period length and the graph of the function $g(x)=\sqrt{a^{2}+1}$ enclose a closed figure whose area is $\qquad$ .
2. $\frac{2 \pi}{a} \sqrt{a^{2}+1}$ Detailed explanation: $f(x)=\sqrt{a^{2}+1} \sin (a x+\varphi)$, where $\varphi=\arctan \frac{1}{a}$, its smallest positive period is $\frac{2 \pi}{a}$, and the amplitude is $\sqrt{a^{2}+1}$. By the symmetry of the closed figure formed by the graphs of $f(x)$ and $g(x)$, this figure can be divided and complemented into a rectangle with length $\frac{2 \pi}{a}$ and width $\sqrt{a^{2}+1}$, so its area is $\frac{2 \pi}{a} \sqrt{a^{2}+1}$.