Question with Integrate and Region


Let’s say I’ve got a 2D region r=Region[Polygon[{{0,0},{1,0},{1,1}}]]. I can do integrals like Integrate[1,{x,y}\[Element]r], or Integrate[y,{x,y}\[Element]r], to calculate areas and area moments.

I’d like to do an integral like Integrate[c^2,{x}\[Element]r], where c is the height (ymax-ymin) of the region at a particular value of x.

Any ideas appreciated.

-David