A second sort of curve integral:
$\oint_{\Gamma}\left(y^{2}-z^{2}\right) d x+\left(z^{2}-x^{2}\right) d y+\left(x^{2}-y^{2}\right) d z$
The integral path $\Gamma$ is the cut-off line obtained by cutting the surface of the cube($\{(x, y, z) \mid 0 \leqslant x \leqslant 1,0 \leqslant y \leqslant 1,0 \leqslant z \leqslant 1\}$) with a plane ($x+y+z=\frac{3}{2}$). If you look from the forward direction of the ox axis, take the counterclockwise direction.
You can find the integration path in this 3D graph. It is the boundary of the hexagon, and the direction is counterclockwise:
Clear["Global`*"];
ContourPlot3D[{x + y + z == 3/2, x == 0, x == 1, y == 0, z == 0,
y == 1, z == 1}, {x, #, #2}, {y, #3, #4}, {z, #5, #6}, Mesh -> 1,
ImageSize -> 500, ViewPoint -> {5, 1, 2},
RegionFunction ->
Function[{x, y,
z}, \!\(TraditionalForm\`\(-0.1\) ⩽
x ⩽ 1.1 && \(-0.1\) ⩽
y ⩽ 1.1 && \(-0.1\) ⩽
z ⩽ 1.1\) && x + y + z <= 1.6],
ContourStyle -> (Directive @@@ {{Red, [email protected]}, {Green,
[email protected]}, {Blue, [email protected]}, {Yellow, [email protected]}, {Cyan,
[email protected]}, {Gray, [email protected]}, {Pink, [email protected]}}),
Lighting -> "Neutral", Axes -> True, AspectRatio -> 1,
AxesOrigin -> {0, 0, 0}, AxesLabel -> {"x", "y", "z"},
PlotPoints -> 50] & @@@ {{-1, 2, -1, 2, -1, 2}}
I tried to write the code of integral path, but RegionBoundary
returns the original plane region as the boundary.
Clear["Global`*"];
plane = ImplicitRegion[
x + y + z == 1.5 && 0 <= x <= 1 && 0 <= y <= 1 && 0 <= z <= 1, {x,
y, z}];
line = RegionBoundary[plane]
ImplicitRegion[x+y+z\[Equal]1.5&&0<=x<=1&&0<=y<=1&&0<=z<=1,{x,y,z}]
ImplicitRegion
is the right way to go, because even if it works, the direction needed for calculating the integral is missing. $\endgroup$