$1.$ Let $f(x)\geq 0$ be continuous on the interval $[a, b]$. Consider the solid of revolution by rotating the graph of $f(x)$ around the $x$-axis. Prove that its volume is
$$V=\pi \int_a^b [f(x)]^2 \, dx$$
$2.$ Prove that in the previous exercise it is possible to remove the conditions that $f(x) \geq 0$ and continuity. And that it is sufficient that the set of discontinuity points is finite.
Attempt
For $(1)$, Let $a\leq x\leq b$ and let $P_x$ be a plane perpendicular to $x$-axis at point $x$. We can see that a cross-section of a given solid with the plane $P_x$ is a circle of a radius $r=f(x)$. So, area of that circle is
$$A(x)=\pi r^2=\pi [f(x)]^2$$
By Cavalieri´s Principle we have that volume $V$ of that solid is
$$V=\int_{a}^{b}A(x)\, dx=\int_{a}^{b}\pi [f(x)]^2 \, dx=\pi \int_{a}^{b}[f(x)]^2 \, dx$$
Let each point $x_i$ in the domain of $f$ be a point on a circle of radius $f(x_i)$. The area of each circle is then given by $A_i = \pi f(x_i)^2$. The volume of the revolution is then just the sum of all these areas and given $f(x)$ is continuous, then $$V = \int_a^b{A_idx_i} = \int_a^b{\pi\cdot f(x)^2dx} = \pi\cdot\int_a^b{f(x)^2 dx}$$.
Assume for some $x_j$, $f(x_j) < 0$ then $A_j = \pi (-f(x_j))^2 = \pi f(x_j)^2$. Then define $$ A = \begin{cases} \pi f(x)^2 & f(x) \geq 0 \\ \pi f(x)^2 & f(x) < 0 \end{cases} =\pi f(x)^2 $$ Hence, $$V = \int_a^b{Adx} = \pi\cdot\int_a^b{f(x)^2}$$ Let $J$ be the set of intervals inside $[a,b]$ in which $f$ is continuous. Then $$V = \sum_{[i, j] \in J}\int_i^j\pi f(x)^2 dx$$ As all these intervals in $J$ lie inside $[a,b]$ hence, $i \geq a$ and $j \leq b$ so it can be said, $$V = \sum_{[i, j] \in J}\int_i^j\pi f(x)^2 dx = \int_a^b{\pi f(x)^2 dx}$$ Note that if $|J| = \infty$ then the sum and consequently the integral would diverge, so its important to have $|J| \in \mathbf{N}$