4
$\begingroup$

I want to solve a multiple integral:

$\iint_{D} x y \mathrm{~d} \sigma$

D: y <= x && y >= 1 && x <= 2

I have to find the value range of x and y before I can list the integral expression:

Clear["Global`*"];

Integrate[x*y Boole[y <= x && y >= 1 && x <= 2], {x, 1, 2}, {y, 1, 2}]

{*9/8*}

My question is how to get the value range of x and y ({x, 1, 2}, {y, 1, 2}) from the region defined by Boole[y <= x && y >= 1 && x <= 2] by use of MMA code quickly?

$\endgroup$

1 Answer 1

6
$\begingroup$

Try

reg = ImplicitRegion[ y < x && y >= 1 && x <= 2, {x, y}]
Integrate[x*y , Element[{x, y}, reg]]
(*9/8*)
$\endgroup$
3
  • $\begingroup$ Thank you! @Ulrich Neumann $\endgroup$
    – lotus2019
    Commented Feb 25, 2022 at 8:42
  • $\begingroup$ You're welcome! $\endgroup$ Commented Feb 25, 2022 at 9:03
  • $\begingroup$ @lotus2019 - to visualize the region use Region[reg, Axes -> True] $\endgroup$
    – Bob Hanlon
    Commented Feb 25, 2022 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.