Let $f:[r,s]→ \mathbb{R}^{+}$ be a continuous function, and let
$A=\{(x,y,z)∈ \mathbb{R}^{3} \hspace{0,3 cm}|\hspace{0,3 cm} z ∈[r, s), x^{2}+y^{2}<f^{2}(z)\}$.
Show that $\text{vol}_3(A)=π \int_{r}^{s} f^2(z) \,dz $
I know how to calculate $\text{vol}_3(A)$ when we have $x^2+y^2+z^2 \leq 1$ but having $x^2+y^2\le f^2(z)$ is completely new to me unfortunately.
I tried expressing $f^2(z)$ as a boundary since we know that $f$ is defined over the interval $[r,s)$ but I don't even know if I am in the correct way. I also tried to express them in polar coordinates but I don't get the same result in the end probably because I'm computing the polar coordinates wrong. Please can somebody help me how to tackle this exercise?
Using cylindrical coordinates $x=\rho \cos \phi, y = \cos \phi, z=z$ with Jacobian $J=\rho$ we can write given set as $A_{\rho \phi z}=\{(\rho, \phi, z) : z\in [r,s), \phi\in [0,2\pi), 0<\rho \leqslant f(z)\}$, so volume will be $$\int\limits_{r}^{s}\int\limits_{0}^{2\pi}\int\limits_{0}^{f(z)}\rho dzd\phi d\rho = \int\limits_{r}^{s}2\pi\cdot \frac{\rho^2}{2}\Big|_{0}^{f(z)}dz=\pi\int\limits_{r}^{s}f^2(z)dz$$