Finding the centroid of the composition of two functions I have a solid that is comprised of the "solid of revolution" of two functions.  I want to find the centroid of the entire solid.  Because it is a solid of revolution, I can assume that the x and z coordinates of the centroid will be 0, so what I'm looking for is just the y coordinate of the centroid.
The two functions, if this matters, can be described as follows (shown below):


*

*f(x): a line from (0, 4) to (3, 0).  When revolved around the y-axis, this is just a cone

*g(x): a parabola (but note that it is flipped over the x-axis).  When revolved around the y-axis, it looks something like a rounded bottle cap.

To find the volume of each, I've used the disc-based method of finding the area of revolution.
To find the y-coordinate of the centroid, I have this formula:
$$
\bar y = (1/A) * \int^b_a ((1/2)*f(x)^2) dx
$$
This is for a 2D plane, so I'm assuming I can use-- and need to use-- volume instead of area (A).  Please correct me if I'm wrong.
(Going forward, note that the density is constant throughout the entire shape.)
Using that formula, I can find the y-coordinate centroid for each of the two solids of revolution.  But once I get to that point, how do I get the centroid of the entire shape?  Do I just add their centroids and divide by 2?  Or is there a complication since g(x) is under the x-axis instead of above it?
Sorry if I provided way more information than is necessary.  My secondary goal in asking this is to make sure I'm not making any major conceptual mistakes by using a formula incorrectly or something. :)
 A: Let a shape $S$ in the $(x,y)$-plane  be defined by
$$a(x)\leq y\leq b(x)\qquad(0\leq x\leq R)\ .$$
When $S$ is rotated around the $y$-axis we obtain a rotational body $B$. This body can be seen as a union of thin cylindrical shells of radius $x$, height $b(x)-a(x)$, and thickness $dx$. The volume of such a shell is $dV=2\pi x\bigl(b(x)-a(x)\bigr)\ dx$, and its centroid is on the $y$-axis at level $h(x):={1\over2}\bigl(a(x)+b(x)\bigr)$. 
The level $\eta$ of the centroid of the full body $B$ is the weighted mean of the levels $h(x)$ of these shells. Therefore
$$\eta\ =\ {\int\nolimits _0^R h(x)\ dV \over \int\nolimits_0^R dV}\ =
{\int\nolimits _0^R x\bigl(b^2(x)-a^2(x)\bigr)\ dx  \over 2 \int\nolimits_0^R x\bigl(b(x)-a(x)\bigr)\ dx}\ .$$
Of course it is easily possible to translate this "stenographic" derivation into a fullfledged proof by partitioning the $x$-interval $[0,R]$ into $N$ equal parts and letting $N\to\infty$.
A: The centre of mass is the "average" position, that is, the mass-weighted integral over the position divided by the integral of the mass, which is the total mass:
$$\bar r=\frac{\int \rho(r)r\mathrm dr}{\int \rho(r)\mathrm dr}=\frac{\int \rho(r)r\mathrm dr}M\;.$$
For the centroid, the density is constant and drops out, and you have
$$\bar r=\frac{\int \rho r\mathrm dr}{\int \rho\mathrm dr}=\frac{\int r\mathrm dr}{\int \mathrm dr}=\frac{\int r\mathrm dr}V\;.$$
Both the numerator and the denominator are linear, so if you have two bodies, you get their centroid by adding the numerators and denominators:
$$\bar r_{AB}=\frac{\int_{AB} r\mathrm dr}{\int_{AB} \mathrm dr}=\frac{\int_A r\mathrm dr+\int_B r\mathrm dr}{\int_A \mathrm dr+\int_B \mathrm dr}=\frac{\int_A r\mathrm dr+\int_B r\mathrm dr}{V_A+V_B}=\frac{V_A\bar r_A+V_B\bar r_B}{V_A+V_B}\;.$$
Thus, the easiest way to do this is to add the numerators and denominators before forming the centroids and then dividing. If you happen to have the centroids of two bodies, you can still calculate the centroid of the combined body, but you need to "undo" the division by the volume and use the last expression, which is the weighted average of the centroids, weighted with the volumes. (The analogous formula with masses applies for the centre of mass when the density isn't constant.)
