2
$\begingroup$

How can I calculate this surface integral with ImplicitRegion and RegionBoundary?

Clear["Global`*"];
reg1 = Region[
   ImplicitRegion[
    x > 0 && y > 0 && z > 0 && x + y + z < 1, {x, y, z}]];
reg2 = RegionBoundary[reg1];
f[x_, y_, z_] := x*y*z;
Integrate[f[x, y, z], Element[{x, y, z}, reg2]]

(* Returns unevaluated *)
$\endgroup$
11
  • $\begingroup$ NIntegrate[f[x, y, z], Element[{x, y, z}, reg2]] evaluates! $\endgroup$ Commented Mar 7, 2022 at 11:35
  • $\begingroup$ reg2 = BoundaryDiscretizeRegion[reg1] and Integrate[f[x, y, z], Element[{x, y, z}, reg2]] $\endgroup$
    – Syed
    Commented Mar 7, 2022 at 11:38
  • $\begingroup$ @Syed What's your Mathematica version? v12.2 doesn't evaluate your code. $\endgroup$ Commented Mar 7, 2022 at 11:44
  • $\begingroup$ @UlrichNeumann I see this. $\endgroup$
    – Syed
    Commented Mar 7, 2022 at 11:50
  • 1
    $\begingroup$ @Syed:reg3 = DiscretizeRegion[reg2] ; Integrate[x*y*z, Element[{x, y, z}, reg3]] performs 0.0144338. $\endgroup$
    – user64494
    Commented Mar 7, 2022 at 16:36

2 Answers 2

2
$\begingroup$

One way is as directed in the Ulrich Neumann's comment.

Clear["Global`*"];reg1 = Region[ImplicitRegion[
x >= 0 && y >= 0 && z >= 0 && x + y + z <= 1, {x, y, z}]];reg2 = RegionBoundary[reg1];
NIntegrate[x*y*z, {x, y, z} \[Element] reg2]

0.01443375672974058

RootApproximant[%]

1/(40 Sqrt[3])

The command of Maple

VectorCalculus:-SurfaceInt(x*y*z, [x, y, z] = Surface(<s, t, 1 - s - t>, [s, t] = Triangle(<0, 0>, <1, 0>, <0, 1>)))

sqrt(3)/120

confirms it (The integrals over the triangles lying in the coordinate planes equal zero.).

$\endgroup$
2
  • $\begingroup$ I'd like to add that Mathematica is able to calculate this surface integral, making use of Integrate[x*y*(1 - x - y)*Sqrt[1 + D[1 - x - y, x]^2 + D[1 - x - y, y]^2], Element[{x, y}, Triangle[{{0, 0}, {1, 0}, {0, 1}}]]] which results in 1/(40 Sqrt[3]). $\endgroup$
    – user64494
    Commented Mar 7, 2022 at 13:56
  • $\begingroup$ Thanks a lot! @user64494 $\endgroup$
    – lotus2019
    Commented Mar 8, 2022 at 7:58
2
$\begingroup$

Since this is a piece-wise surface,we need to calculate all the individual surface integral and sum up.

pts = {{0, 0, 0}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}};
triangles = Triangle /@ Subsets[pts, {3}];
Integrate[x*y*z, {x, y, z} ∈ #] & /@ triangles // Total

1/(40 Sqrt[3])

$\endgroup$
2
  • $\begingroup$ How do you derive pts from reg2? $\endgroup$
    – user64494
    Commented Mar 7, 2022 at 13:57
  • $\begingroup$ Thanks a lot! @cvgmt $\endgroup$
    – lotus2019
    Commented Mar 8, 2022 at 7:59

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.