# Integration over an implicit region

A question asks me to calculate the following integral using NIntegrate:

Calculate the double integral ... where D is the area bounded by the four lines ...

With the following code I only manage to get zero as an answer, which is wrong:

f[x_, y_] := (30*x^2 + 37*x*y + 10*y^2)^2

NIntegrate[f[x, y] Boole[6*x + 5*y == 9 && 6*x + 5*y == -9 && 5*x + 2*y == 1 &&
5*x + 2*y == -1], {x, -Infinity, Infinity}, {y, -Infinity, Infinity}]


You want the region of integration to be defined by inequalities, rather than equalities. Your region can be described as follows:

region = ImplicitRegion[Abs[6*x + 5*y] < 9 && Abs[5 x + 2 y] < 1, {x, y}]];
RegionPlot[region, AspectRatio -> Automatic]


With that definition, you can then write:

ClearAll[f]
f[x_, y_] := (30*x^2 + 37*x*y + 10*y^2)^2

NIntegrate[
f[x, y],
{x, y} ∈ region
]

(* Out: 24.9231 *)


In this case, you can also obtain a symbolic answer, just by replacing Integrate for NIntegrate above (it returns 324/13).