# Integration to find the centroid of a cone

The finite region enclosed by the line $y=kx$, where $k$ is a positive constant, the $x$-axis for $0 \leq x \leq h$, and the line $x=h$ is rotated through 1 complete revolution about the $x$-axis. Prove by integration that the centroid of the resulting cone is at a distance $\frac{3}{4}h$ from the origin $O$.

How do we go about doing this problem, what I tried was using a centroid formula, 1/2 * (definite integrate of $y^2$ divided by the definite integral of $y$) but that's wrong, how do we do this? Please help me .

By symmetry, the centroid is on the $x$-axis. To find the $x$-coordinate of the centroid, we find the moment of the cone about the $y$-$z$ plane (the plane $x=0$) and divide this moment by the volume of the cone.
Imagine a slice of the cone, of thickness "$dx$" going from $x$ to $x+dx$. The area of cross-section is $\pi y^2$, so the volume of the slice is about $\pi y^2\,dx$. This slice is at distance roughly $x$ from the plane $x=0$. So the moment of the slice about that plane is approximately $(x)(\pi y^2\,dx)$.
For the full moment "add up" (integrate) from $x=0$ to $x=h$. Since $y=kx$, the full moment is $$\int_0^h (x)(\pi k^2x^2)\,dx.$$ So we are integrating $\pi k^2x^3$ from $0$ to $h$. We get $\frac{1}{4}\pi k^2 h^4$.
For the $x$-coordinate of the centroid, divide the moment we have just computed by the volume, which is $\frac{1}{3}\pi (h)(k^2h^2)$.