<s>[INST] Finding $\int_0^7 g(r)~dr$ from $ g(r)=\begin{cases} \sqrt{9-(r-3)^2}, & 0\le r<3 \\ r+2, & 3\le r<5 \\ \sqrt{4-(r-5)^2}, & 5 \le r \le 7\end{cases} $ I have some piece-wise integration that I for some reason am not getting.
$$
g(r) = 
\begin{cases}
\sqrt{9-(r-3)^2} && 0 \le r \lt 3 \\
r+2 && 3 \le r \lt 5 \\
\sqrt{4-(r-5)^2} && 5 \le r \le 7
\end{cases}
$$
I must find the area of $\int_0^7g(r) \ dr$.
I know that this must be equivalent to:
$$
\int_0^2\sqrt{9-(r-3)^2} \ dr \ + \ \int_3^4(r+2) \ dr \ + \ \int_5^7\sqrt{4-(r-5)^2} \ dr
$$
But my solution of $4.125 + 5.5 + \pi$ yields an incorrect answer?
 [/INST] Note: I just add this as a complement to @projectilemotion's answer.
We can still the integral into three parts as 
$$\int_0^7 g(r)\; dr=\int_0^3 g(r)\; dr+\int_3^5 g(r)\; dr+\int_5^7 g(r)\; dr$$


*

*For the first one, we have $y=g(r)=\sqrt{9-(r-3)^2}$, so $y^2+(r-3)^2=9$. So the region bounded by the graph of the function, the $x$-axis and the vertical lines $x=0$ and $x=3$ is a quarter of circle of center $(3,0)$ and radius. Therefore,  


$$\int_0^3 g(r)\; dr=\frac{1}{4}\pi \times 3^2=\frac{9\pi}{4}$$ 


*Similarly, the third integral is the area of a quarter of circle of radius $2$, so 


$$\int_5^7 g(r)\; dr=\frac{1}{4}\pi \times 2^2=\pi$$ 


*On $[3,5]$, the function is linear, so the region is a right trapezoid of bases $g(3)=5$ and $g(5)=7$ and height $5-3=2$, so 


$$\int_3^5 g(r)\; dr=\frac{5+7}{2}\times 3=12$$
As a consequence,  
$$\int_0^7 g(r)\; dr=\frac{9\pi}{4} + 12 + \pi = \frac{13\pi}{4} + 12$$ 
</s>