The shaded area is a trapezoid. We can decompose the trapezoid into a rectangle and a triangle, or use the general formulas for the centroid of an area.
Let's define the vertices of the trapezoid.
The bottom left vertex is at $(0,0)$.
The bottom right vertex is
Show more…