Clear["Global`*"]
r = Polygon[{{-a, 0}, {a, 0}, {a, h}, {0, h}}];
As pointed out by cvgmt in a comment, the area is
area = Assuming[a > 0 && h > 0, Area[r]]
(* (3 a h)/2 *)
As a workaround to do the integral, break the region r
into three triangular regions
r21 = Polygon[{{-a, 0}, {0, 0}, {0, h}}];
r22 = Polygon[{{0, 0}, {0, h}, {a, 0}}];
r23 = Polygon[{{0, h}, {a, h}, {a, 0}}];
The integral can be done over the subregions
area == Assuming[a > 0 && h > 0,
Total[Integrate[1, {x, y} ∈ #] & /@ {r21, r22, r23}]]
(* True *)
EDIT: For a more complicated integrand
f[x_, y_] := (x^2 + 3) (x + y)
Assuming[a > 0 && h > 0,
Total[Integrate[f[x, y], {x, y} ∈ #] & /@ {r21, r22, r23}] //
Simplify]
(* 1/60 a h (60 a + 12 a^3 + 120 h + 11 a^2 h) *)
EDIT 2: The subdivisions do not need to be only triangles; however, there are limitations. Arbitrary polygons cannot be handled. Even a Polygon
representing a Rectangle
fails.
r31 = Polygon[{{0, 0}, {0, h}, {a, h}, {a, 0}}];
Assuming[a > 0 && h > 0,
Total[Integrate[f[x, y], {x, y} ∈ #] & /@ {r21, r31}] // Simplify]
However, the equivalent Rectangle
works
r32 = Rectangle[{0, 0}, {a, h}];
Assuming[a > 0 && h > 0,
Total[Integrate[f[x, y], {x, y} ∈ #] & /@ {r21, r32}] // Simplify]
(* 1/60 a h (60 a + 12 a^3 + 120 h + 11 a^2 h) *)
r = Polygon[{{-a, 0}, {a, 0}, {a, h}, {0, h}}]; Area[r, Assumptions -> h > 0 && a > 0]
$\endgroup$