This demo finds the moment of inertia for a region in the plane of uniform density. The bounds of y are expressed as functions f and g of x.

The graph shown displays the region, coloring each point based on its distance from the center of rotation. The closer a point mass is to the center of rotation, the less it adds to the moment of inertia.