Answer: The cone has height \(h\) and base radius \(r\), so at distance \(x\) from the origin its radius is \(y=\frac{r}{h}x\).
The volume is
\(V=\frac{1}{3}\pi r^{2}h\).
To find the distance of the centroid from the origin, let \(\bar{x}\) be the x-coordinate of the centroid. Using moments about the origin,
\(V\bar{x}=\int_{0}^{h} \pi y^{2} x \, dx\).
Substitute \(y=\frac{r}{h}x\):
\(V\bar{x}=\int_{0}^{h} \pi \left(\frac{r}{h}x\right)^{2}x \, dx=\frac{\pi r^{2}}{h^{2}}\int_{0}^{h} x^{3}\,dx\).
So
\(V\bar{x}=\frac{\pi r^{2}}{h^{2}}\left[\frac{x^{4}}{4}\right]_{0}^{h}=\frac{\pi r^{2}h^{2}}{4}\).
Hence
\(\bar{x}=\frac{\pi r^{2}h^{2}/4}{(1/3)\pi r^{2}h}=\frac{3h}{4}.\)
Therefore the centroid is at a distance \(\frac{3}{4}h\) from the origin \(O\).
Consider the cone formed by rotating the region under the line \(y=kx\) from \(x=0\) to \(x=h\) about the x-axis. The centroid must lie on the axis of symmetry, so we only need its x-coordinate.
At position \(x\), the cross-section perpendicular to the x-axis is a disc of radius \(y\), so its area is \(\pi y^{2}\). The moment of this thin slice about the origin is therefore \(x\cdot \pi y^{2}\,dx\).
Since the line passes through \((h,r)\), we have \(y=\frac{r}{h}x\). Hence
\(\text{moment about }O=\int_{0}^{h} x\pi y^{2}\,dx=\int_{0}^{h} x\pi \left(\frac{r}{h}x\right)^{2}dx\).
So
\(\text{moment about }O=\frac{\pi r^{2}}{h^{2}}\int_{0}^{h} x^{3}\,dx=\frac{\pi r^{2}}{h^{2}}\left[\frac{x^{4}}{4}\right]_{0}^{h}=\frac{\pi r^{2}h^{2}}{4}.\)
The volume of the cone is
\(V=\frac{1}{3}\pi r^{2}h.\)
Therefore the x-coordinate of the centroid is
\(\bar{x}=\frac{\text{moment about }O}{V}=\frac{\pi r^{2}h^{2}/4}{(1/3)\pi r^{2}h}=\frac{3h}{4}.\)
So the centroid is a distance \(\frac{3}{4}h\) from the origin \(O\).