# How to plot region of integration in Mathematica? [closed]

I want to set limits of integration in cylindrical polar coordinates for a function $$f(r,\theta,z)$$ over a region bounded below by the plane $$z=0$$, laterally by the circular cylinder $$x^2+(y-1)^2=1$$ and above by the paraboloid $$z=x^2+y^2.$$ I need complete procedure. Because i am totally new to the mathematica.

• Did you try plotting your surfaces to see if the region makes sense? ContourPlot3D[{x^2 + (y - 1)^2 == 1, z == x^2 + y^2, z == 0}, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}] – J. M. is in limbo Jan 26 at 11:26
• Maybe you accidentally reversed it?: Don't you want 0 <= z <= x^2+y^2 and not the opposite? -- Also look up and try out RegionPlot3D in addition to ContourPlot3D. – Michael E2 Jan 26 at 11:56

You can visualize the region of integration as follows if specified in rectangular / Cartesian coordinates. I am looking for a way to specify in cylindrical to the plot directly and will update when I find it.

With[{
Δ=0.1
},
RegionPlot3D[And[
x^2+(y-1)^2<=1,
z<=x^2+y^2,
z>=0
],
{x,-1-Δ,1+Δ},
{y,0-Δ,2+Δ},
{z,0-Δ,4+Δ},

Mesh->10,
MeshFunctions->{#3&},
PlotStyle->Directive[Opacity[0.5],Yellow],

PlotPoints->150,

PlotTheme->"Detailed",
AxesLabel->Automatic
]
]


ClearAll[getCartesian,getCylindrical];
getCartesian[field_]:=FullSimplify@TransformedField["Cylindrical"->"Cartesian",field,{r,θ,\[ScriptZ]}->{x,y,z}];
getCylindrical[field_]:=FullSimplify@TransformedField["Cartesian"->"Cylindrical",field,{x,y,z}->{r,θ,\[ScriptZ]}];

getCylindrical/@And[
x^2+(y-1)^2<=1,
z<=x^2+y^2,
z>=0
]


r^2 <= 2 r Sin[θ] && [ScriptZ] <= r^2 && [ScriptZ] >= 0

Now you can use this transformation function to directly specify the conditions in cylindrical coordinates and it will be plotted.

With[{
Δ=0.1
},
RegionPlot3D[Evaluate[getCartesian/@And[
r^2<=2r Sin[θ],
\[ScriptZ]<=r^2,
\[ScriptZ]>=0
]],
{x,-1-Δ,1+Δ},
{y,0-Δ,2+Δ},
{z,0-Δ,4+Δ},

Mesh->10,
MeshFunctions->{#3&},
PlotStyle->Directive[Opacity[0.5],Yellow],

PlotPoints->150,

PlotTheme->"Detailed",
AxesLabel->Automatic
]
]

• Brother how can I learn mathematica, any suggestion about books, videos etc. I really want to learn, but I have no Idea – Noor Aslam Jan 26 at 14:41
• @NoorAslam best book for beginners: mathematica.stackexchange.com/questions/16485/… – user13892 Jan 26 at 15:14
• Sir the book you recommended is difficult, can you recommend any other book please! – Noor Aslam Feb 3 at 13:46
• – user13892 Feb 9 at 13:38

Transform your conditions to cylindrical coordinates

cond =
x^2 + (y - 1)^2 < 1 &&0 < z < x^2 + y^2 /. {x -> r Cos[φ], y -> r Sin[φ]} //
FullSimplify[#, {r > 0, -Pi < φ < Pi}] &

(*r < 2 Sin[φ] && 0 < z < r^2*)


to get the integration limits!

The first condition (remember r > 0) implies 0 < φ < Pi.

{φ, 0, Pi}, {r, 0, 2 Sin[φ]}, {z, 0, r^2}


Checking the results:

Volume of the cartesian region:

ImplicitRegion[x^2 + (y - 1)^2 < 1 && 0 < z < x^2 + y^2, {x, y, z}] // Volume

(*3Pi/2*)


equals

Integrate[r, {φ, 0, Pi}, {r, 0, 2 Sin[φ]}, {z, 0,r^2}]

(* 3Pi/2*)


That's it. Hope it helps.