Moment of inertia of a continuous body may be given as,
#I = int r^2dm#
If #rho# be mass density (assumed to be constant) then, #dm = rhodV# where #dV# is volume element.
We will now calculate the moment of inertia of the cylinder with radius #R# and height #h# about it's central diameter.
Consider #z# axis along the axis of cylinder then, for moment of inertia along #x# axis (which is taken as the central diameter perpendicular to #z# axis), #r^2 = x^2 + z^2 = s^2/2 + z^2#
Where, #s^2 = x^2 + y^2# and symmetry considerations, #x^2 = y^2# thus, we replace #x^2# with #s^2/2#.
Also,
#dV = sds d theta dz#. (In cylindrical coordinates #(s,theta,z)#)
Making these substitutions,
#I_x = rho intintint (s^2/2 + z^2) sds d theta dz#
Now limits of #s# are from #0# to #R#, that of #z# are from #-h/2# to #h/2# (Origin of the coordinate system lies at the centre of the cylinder), and that of #theta# is from #0# to #2pi#.
Therefore,
#I_x = rho int_0^R int_0^(2pi) int_(-h/2)^(h/2) (s^2/2 + z^2) sds d theta dz#
#implies I_x = rho int_0^(2pi) d theta int_0^R int_0^(h/2) 2(s^2/2 + z^2) sds dz#
#implies I_x = rho (2pi) int_0^R 2((s^2h)/2 + h^3/24)sds#
#implies I_x = 2pirho int_0^R ((s^3h)/2 + (sh^3)/12)ds#
#impliesI_x = 2pirho [(R^4h)/8 + (R^2h^3)/24]#
But, #rho = M/(piR^2h)# where #M# is total mass.
Therefore, #I_x = M[R^2/4 + h^2/12]#
By symmetry considerations, #I_y = I_x#