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. :)
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.)