# Triple Integral boundaries and solution

So I'm working on triple integrals, specifically on those where I have a region bounded by various surfaces. (In other words, the ranges for each integrals are not given, but must be calculated.)

I know how to do the integral once I have the boundaries of each integral. I also know how to use regionplot and implicitregion to graph my surface. Mathematica then shows a nice picture of the bounded region.

What I don't know how to do is tell Mathematica to immediately calculate the integral. I've found a couple of examples online but in each case they seemed to have already calculated the boundaries and then just entered them into the Integrate function.

I need to figure out the interval. How do I figure out the boundaries or just immediately tell Mathematica to calculate the integral (with the boundaries being part of the effort)?

Thanks.

Here's an example of the code I found in another document. It all makes sense and is replicable until you get to the Integrate function. It has boundaries. Are these done by hand? Or is there a way to have Mathematica create them?

Here is the code that doesn't seem to work. I did follow Bob's method below, and I recreated his example, but the following doesn't work. Mathematica says "Volume = undefined" and the integral is zero.

Clear["Global*"]

reg = ImplicitRegion[    y==4-z&&y==-x^2&&y==0&&z==0, {x, y, z}];

Region[reg, Axes -> True, Boxed -> True]

volume[reg]

Integrate[1, {x, y, z} ∈ reg]

Here's an example I found online. But again the limits are entered in here. • Post the code instead of picture since not all of us can see the pictures. Nov 16, 2020 at 3:48
• I'm sorry. I don't have any code to offer. I don't know where to start, except by repeating what's been done. Nov 16, 2020 at 4:18

Clear["Global*"]

reg = ImplicitRegion[
z <= 4 - 4 (x^2 + y^2) && (z >= (x^2 + y^2)^2 - 1), {x, y, z}];

Region[reg, Axes -> True, Boxed -> True] The volume can be calculated by any of the following methods:

Volume[reg]

(* (8 π)/3 *)

RegionMeasure[reg]

(* (8 π)/3 *)

Integrate[1, {x, y, z} ∈ reg]

(* (8 π)/3 *)


EDIT:

Alternatively,

Integrate[
Boole[z <= 4 - 4 (x^2 + y^2) && (z >= (x^2 + y^2)^2 - 1)],
{x, -Infinity, Infinity}, {y, -Infinity, Infinity},
{z, -Infinity, Infinity}]

(* (8 π)/3 *)

• Thanks. I did try this, and edited my above post to show my code. I couldn't get it work. I did replicate your work, but I couldn't do it on my problem. I know it is possible, as I have a book answer to the problem, but I can't seem to get it done in Mathematica. Nov 16, 2020 at 15:18
• What version of Mathematica are you using? Nov 16, 2020 at 16:14
• I am using version 10. Nov 16, 2020 at 16:30
• @user27847 please include this in an edit to your question. Such details are essential & will help others to better answer your question. Nov 17, 2020 at 1:02
• @BobHanlon I have tried to mess with your equations. Could you help me understand how I might go about a problem like: f(x,y,z)=2x-y-z bounded by z=y^2,x=0,x=1,y=-2,y=2, and the xy plane? Nov 18, 2020 at 2:11

New Edition

One way is calculate all the possible measure of regions.

BTW, the questioner's equations can't enclose any finite regions.Here we change the sign of the second equation.

equations = {y == 4 - z, y == x^2, y == 0, z == 0};
expressions = (First[#] - Last[#]) & /@ equations;
inequalities =
And @@@ Tuples@
Outer[Construct[#2, #1] &,
expressions, {GreaterEqual[#, 0] &, LessEqual[#, 0] &}];
regions = ImplicitRegion[#, {x, y, z}] & /@ inequalities;
PositionIndex[Volume /@ regions]

regions[] // Volume
(* 256/15 *)

regions[] //
RegionPlot3D[#, PlotPoints -> 100, MaxRecursion -> 2] & Original

equations = {y == 4 - z, y == x^2, y == 0, z == 0};
expressions = (First[#] - Last[#]) & /@ equations;
inequalities =
And @@@ Tuples[

<|∞ -> {1, 2, 3, 5, 6, 7, 10, 12, 13, 14, 15, 16}, 0 -> {4, 8}, 256/15 -> {9}, 4 -> {11}|>
-4 + y + z <= 0 && -x^2 + y >= 0 && y >= 0 && z >= 0
-4 + y + z <= 0 && -x^2 + y >= 0 && y <= 0 && z >= 0