Let $f: \mathbb{R} \rightarrow \mathbb{C}, f=x \mapsto f(x)$ and $M \subset [a,b] \times \mathbb{R}^2$ be a surface of revolution (https://en.wikipedia.org/wiki/Solid_of_revolution) around the $x$ axis. We want to calculate \begin{equation} \label{equation1} \int_M f(x) ds. \end{equation}
Ok let's assume we know the parametrized distance $m(x)$ of the set $M$ from the $x$ axis. Then the surface area of $M$ would be (https://en.wikipedia.org/wiki/Surface_of_revolution): $$ 2 \pi \int_a^b x \sqrt{1+m'(x)^2}dx. $$ As the $f$ depends only on $x$, my hypothesis is that our integral over $M$ is simply $$ 2 \pi \int_a^b f(x) x \sqrt{1+m'(x)^2}dx. $$
Is this right? Why? Why not? What are the assumptions on $f$?