Skip to main content
added 8 characters in body
Source Link
Ulrich Neumann
  • 56.8k
  • 2
  • 26
  • 60

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}]}]

enter image description here

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

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

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}]}]

enter image description here

The correct result follows, similar to @cvgmt 's modified answer, to

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

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}]}]

enter image description here

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*)
Source Link
Ulrich Neumann
  • 56.8k
  • 2
  • 26
  • 60

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}]}]

enter image description here

The correct result follows, similar to @cvgmt 's modified answer, to

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