# Volume of the rotation of the area between two curves

Suppose I have two function $f(x)$ and $g(x)$ such that for $x \in (\alpha, \beta )$ we have $f(x) \ge g(x)$.

I found an "exercise solution" that state that the volume given by the rotation of the area between $f$ and $g$ is:

$$\pi\int_\alpha^\beta (f(x) - g(x))^2 dx$$

but i think it's wrong and that it should be:

$$\pi\int_\alpha^\beta f(x)^2 - g(x)^2 dx$$

Who is right?

-

I'll assume that one of the candidates is the correct solution. Now, what is the volume of a cylindrical shell of radii $R>r$ and height $1$? It is the difference $$\pi R^2 - \pi r^2 = \pi \left(R^2-r^2 \right).$$ This does not coincide with $\pi \left( R-r \right)^2$.