The first semi-circle occurs in the interval \([0,2]\text{.}\) Since the region is above the \(x\)-axis, the integral equals to the area.
\begin{equation*}
\int_0^2 f(x)\, dx = \frac{1}{2}\pi(1)^2 = \frac{\pi}{2}
\end{equation*}
Next, there is a triangle in the interval \([2,6]\text{.}\) Observe that this region is below the \(x\)-axis, the integral equals to the negative of the area.
\begin{equation*}
\int_2^6 f(x) = -\frac{1}{2}\cdot 4\cdot 2 = -4
\end{equation*}
Alternatively, you can see that the "height" of the triangle, using the function value, is \(-2\text{.}\)
The last region is another semi-circle in the interval \([6,12]\text{.}\) This region is above the \(x\)-axis so the integral equals to its area.
\begin{equation*}
\int_6^{12} f(x)\, dx = \frac{1}{2}\pi (3)^2 = \frac{9\pi}{2}
\end{equation*}
Putting all these three pieces together, we obtain
\begin{equation*}
\int_0^{12} f(x)\, dx = \frac{\pi}{2} - 4 + \frac{9\pi}{2} \approx 11.7079632679
\end{equation*}