Double integral over special region [duplicate]

I need to calculate the value of the integral

Over the region between the four lines

I thought I could perhaps define the region using

Boole[{-8 <= 2 x + 3 y <= 8 && -2 <= 5 x + 2 y <= 2}]


but that doesn't work. ("Incomplete; more input is needed").

What functions can be used to solve this problem?

• The region should be defined as reg = ImplicitRegion[ -2 <= 2 x + 7 y <= 2 && -2 <= 3 x + 6 y <= 2 , {x, y}] I think. Jan 27 at 14:20
• You are nearly there with "Boole": NIntegrate[ Boole[-8 <= 2 x + 3 y <= 8 && -2 <= 5 x + 2 y <= 2], {x, -10, 10}, {y, -10, 10}] this yields: 5.81818 Jan 27 at 15:37
• Jan 28 at 0:34

• Method 1
Integrate[
Boole[{ -2 <= 2 x + 7 y <= 2 && -2 <= 3 x + 6 y <= 2}](6 x^2 +
33 x*y + 42 y^2)^4, {x, -∞, ∞}, {y, -∞, ∞}]


4096/225

• Method 2
Integrate[(6 x^2 + 33 x*y + 42 y^2)^4, {x, y} ∈
ImplicitRegion[{ -2 <= 2 x + 7 y <= 2 && -2 <= 3 x + 6 y <= 2}, {x,
y}]]


4096/225

• Method 3
(* change of variables *)
sol = Solve[{u == 2 x + 7 y, v == 3 x + 6 y}, {x, y}][[1]];
(*  {x -> 1/9 (-6 u + 7 v), y -> 1/9 (3 u - 2 v)}  *)
expr = (6 x^2 + 33 x*y + 42 y^2)^4 /. sol // Simplify;
(* u^4 v^4 *)
jacobian = Grad[{x, y} /. sol, {u, v}] // Det // Abs
(* 1/9 *)
Integrate[expr*jacobian, {u, -2, 2}, {v, -2, 2}]


4096/225

• Method 4
Factor[6 x^2 + 33 x*y + 42 y^2]
(* 3 (x + 2 y) (2 x + 7 y) *)


It means that the integrand (6 x^2 + 33 x*y + 42 y^2)^4 is just (u*v)^4 if we set u=3(x+2y) and v=2x+7y.

Then the region became -2<=u<=2 and -2<=v<=2.

To calculate Grad[{x,y},{u,v}]//Det, we just need to calculate 1/Grad[{u,v},{x,y}]//Det.

1/(Grad[{3(x+2y),2x+7y}, {x, y}] // Det // Abs)


1/9

Clear[u,v];
Integrate[(u*v)^4*1/9,{u,-2,2},{v,-2,2}]


4096/225

• Are you sure about the region definition? I think it should be ImplicitRegion[ -2 <= 2 x + 7 y <= 2 && -2 <= 3 x + 6 y <= 2 , {x, y}] Jan 27 at 14:23
• Thank you. These don't yield the correct result, though.
– Orm
Jan 27 at 14:24
• @UlrichNeumann Thanks, I just copy the author's code, not aware the picture. Jan 27 at 14:27
• Wow, thank you so much!! Really helpful stuff to learn from. You're a star.
– Orm
Jan 27 at 17:11

The region defined by the four lines doesn't agree with Boole[{-8 <= 2 x + 3 y <= 8 && -2 <= 5 x + 2 y <= 2}] mentioned by OP.

regQ = ImplicitRegion[ -8 <= 2 x + 3 y <= 8 && -2 <= 5 x + 2 y <= 2 , {x, y}] (*QP*)
reg = ImplicitRegion[-2 <= 2 x + 7 y <= 2 && -2 <= 3 x + 6 y <= 2, {x,y}]
Show[{RegionPlot[{regQ, reg}, BoundaryStyle -> { Dashed,Automatic}],ContourPlot[{2 x + 7 y == -2, 2 x + 7 y == 2, 3 x + 6 y == -2,3 x + 6 y == 2}, {x, -3, 3}, {y, -3, 3}]}]


The correct result follows, in accordance with @cvgmt 's modified answer, to

Integrate[(6 x^2 + 33 x*y + 42 y^2)^4, Element[{x, y}, reg]]
(*4096/225*)