I'm trying to deduce the formula of the moment of inertia of an object of rotation. The general formula for the moment of inertia is declared as:
$J=m*r^2 =\sum{m_i * r_i^2}$
If I replace $m_i$ of the $\sum{m_i * r_i^2}$ with $\int dm$ (where dm are the masses) and $r_i^2$ with the $\int(y)^2dx$, I get $J=\int y^2 dm = \int y^2*(\rho\space dV)$ (remember: $(\rho\space dV)$ since $\rho=\frac{m}{V}$)
Furthermore $V=\int{\pi*y^2}dx$ leads me to $J = \int y^2*(\rho\space dV) = \int y^2 * \rho*\pi*y^2 dx = $
$J=\pi*\rho*\int y^4 dx$
Now my question: If I compare my formula with the formula it should be, I perceive that there is $\frac{1}{2}$ missing.
$J=\frac{\pi*\sigma}{{\color{red}2}}*\int y^4 dx$
What mistake did I make?