Area of a Surface of Revolution (Integration) I'm given the following formulas:

In my book, one of the examples is as follows:

This confuses me as to what exactly I'm supposed to put in place of x. If the equation in the problem is $y=x^{2}$, why is S being defined as $S=\int2\pi x \space ds$ instead of $S=\int2\pi x^{2} \space ds$?
 A: I rather dislike the way a lot of textbooks present the material on surfaces and solids of revolution because they will at some point present a table of formulas without having clarified the underlying reasoning.  Students are confronted with several rather similar-looking equations and wonder how they are going to memorize them.
What the surface area integral for a figure of revolution does is similar to what is done for the "shell method" in volume computation.  For surface area, we are taking an infinitesimal bit of the arclength $ \ ds \ $ of the curve and revolving it about the rotation (symmetry) axis for the surface.  A particular bit of the curve is at a distance (radius) $ \ r \ $ from that rotation axis, so when it is "swung around" the axis, it "sweeps out" a "belt" with an infinitesimal area  $ \ dA \ = \ 2 \pi \ r \ ds \ , $ which is defined by the infinitesimal arclength being carried around the circumference of a circle. (This is the resemblance to the "cylindrical shell" method for volume.)  The generic integral for surface area of a figure of revolution is then
$$ S \ = \ \int \ 2 \pi \ r \ \ ds \ \ . $$
The "radius arm" to the curve is always perpendicular to the axis of rotation. So when the rotation axis is the $ \ x-$ axis, the radius arm is "vertical", making the integral  $$ S \ = \ \int \ 2 \pi \ y \ \ ds \ \ , $$
and when the rotation axis is the $ \ y-$ axis, the radius arm is horizontal and the integral become  $$ S \ = \ \int \ 2 \pi \ x \ \ ds \ \ . $$
As a separate matter, there is the choice of the "direction of integration", which affects what we write for $ \ ds \ . $  Since we work with "ordinary" Euclidean space in these calculus courses, the basic representation for an "infinitesimal element" of arclength is $ \ ds^2 \ = \ dx^2 + dy^2 \ $ . (This is, in a sense, the basis of the "distance formula" and the Pythagorean Theorem.)  So in the surface area integral, we are always writing $ \ ds \ = \sqrt{ dx^2 + dy^2} \ $ , but will need to extract a "differential factor" in accordance with our direction of integration. 
So for integration in the $ \ x-$ direction, the differential to be used is $ \ dx \ $ and the infinitesimal arclength element is written as
$$ ds \ = \ \sqrt{ \frac{dx^2}{dx^2} \ + \ \frac{dy^2}{dx^2}} \ \ dx \ \ = \ \ \sqrt{ 1 \ + \ \left( \frac{dy}{dx} \right)^2 } \ \ dx   $$
and for integration in the $ \ y-$ direction, the differential to be used is $ \ dy \ $ and the infinitesimal arclength element is written as
$$ ds \ = \ \sqrt{ \frac{dx^2}{dy^2} \ + \ \frac{dy^2}{dy^2}} \ \ dy \ \ = \ \ \sqrt{  \left( \frac{dx}{dy} \right)^2  + \ 1 } \ \ dy   \ \ .$$
[I'll mention, as an aside, that when you get to parametric curves described by coordinate functions $ \ x(t) \ , \ y(t) \ , $ the differential is $ \ dt \ $  and we have $ \ ds \  = \ \sqrt{  \left( \frac{dx}{dt} \right)^2  +  \left( \frac{dy}{dt} \right)^2 } \ \ dt   \  . $ ]
So we have four possibilities for surface area integrals, with two "choices" for rotation axis and two for direction of integration.  I won't write all of them out, but the combinations you show as "Formulas (5) and (6)" are both for the x - axis being the rotation axis.  For (5), the integration is along the $ \ x-$ direction, so $ \ y \ $ in the surface area integral needs to be replaced by $ \ f(x) \ $ , and the integral should be written as
$$ S \ = \ \int \ 2 \pi \ y \ \ ds \ \ = \ \ 2 \pi \ \int_a^b   f(x) \ \sqrt{ 1 \ + \ \left( \frac{dy}{dx} \right)^2 } \ \ dx \ . $$
If we are taking the integration along the $ \ y-$ direction [Formula (6) ] because, say, we are working with a curve given by $ \ x \ = \ g(y) \ , $ then the radius arm $ \ y \ $ is left as is and we will need to find the derivative $ \ \frac{dx}{dy} \ = \ \frac{dg}{dy} \ . $  The surface area integral (still for the symmetry axis being the $ \ x-$ axis) is now
$$ S \ = \ \int \ 2 \pi \ y \ \ ds \ \ = \ \ 2 \pi \ \int_c^d   y \ \sqrt{  \left( \frac{dx}{dy} \right)^2  + \ 1 } \ \ dy  \ . $$
Perhaps it is clear from this how to construct the appropriate integrals for a surface produced by rotation about the $ \ y-$ axis.
For the "Example 2" that you show, the surface has the $ \ y-$ axis as the symmetry or rotation axis, so the basic integral is $ \ S \ = \ \int \ 2 \pi \ x \ \ ds \ . $  Since the integration is being taken in the $ \ x-$ direction, that "radius arm" $ \ x \ $ is left as is and the $ \ dx-$ form for $ \ ds \ $ is used.
