moment of inertia of continous mass systems can be calculated by integration.
KEY STEPS-
1.write dm of a small element which is at a distance dx from the axis of rotation.
2.use I = integral of r
2dm over the entire length,area or volume respectively as you have chosen linear mass density (

) , surface mass density (

) , volume mass density (

) for writing
dm. 3.remember standard formulas for ring disc cone hollow and solid sphere etc. and use it for writing dI and integrate.