3
$\begingroup$

Given a hemisphere $S=x^2+y^2+z^2 = R^2, z>0$ I need to evaluate the integral$$ \iint x^2\ dy \ dz$$

So, given implicit region,

RR = ImplicitRegion[x^2 + y^2 + z^2 == R^2 && z > 0, R > 0, {x, y, z}];

I have 2 questions:

  1. How can I compute it symbolycally (preferably without inducing manual parametrisation and/or using spherical/cylindrical coordinates)? However, if it is not possible to do with Mathematica, please show how to do with manual parametrisation.

  2. How can I compute it numerically with NIntegrate? I hope that for numerical computation we can avoid manual parametrisation, is it true?

Thanks a lot for you help!

Update: Sorry, I had to change my integral a bit since I got two irrelevant answers, anyway, thanks for them.

| improve this question | | | | |
$\endgroup$
4
$\begingroup$

To get the volume your region must be a solid, x^2 + y^2 + z^2 <= R^2. Further, it is good to tell Mathematica that R > 0,

r = ImplicitRegion[x^2 + y^2 + z^2 <= R^2 && z > 0 && R > 0, {x, y, z}];
Volume @ r

result

| improve this answer | | | | |
$\endgroup$
  • $\begingroup$ Thanks for your answer and for the hint about the sing! Unfortunately I am not interested in volume, but in arbitrary function under the integral sign, like $y^2z$ and not just $x$. $\endgroup$ – Hedgehog Nov 10 '17 at 20:09
  • $\begingroup$ @Hedgehog then use NIntegrate with {x, y, z} \[Element] r $\endgroup$ – b3m2a1 Nov 10 '17 at 21:34
  • $\begingroup$ @ b3m2a1 Feel free to post and I will accept as long as it work. $\endgroup$ – Hedgehog Nov 10 '17 at 21:36
3
$\begingroup$

I am not sure why you are integrating $x^2$ wrt $y$ and $z$. Anyway, no need to define an implicit region:

Integrate[x^2, {y, -Sqrt[R^2 - x^2], Sqrt[R^2 - x^2]}, {z, 0, Sqrt[R^2 - x^2 - y^2]}]

(* 1/2 \[Pi] x^2 (R^2 - x^2) *) 

Or if you really need ImplicitRegion:

Integrate[x^2, {y, z} \[Element]ImplicitRegion[x^2 + y^2 + z^2 <= R^2 && z > 0 && R > 0, {y, z}]]

enter image description here

| improve this answer | | | | |
$\endgroup$
1
$\begingroup$

You're looking for the 2D measure of the region, which is embedded in 3D. There's a built in function for that:

r = ImplicitRegion[x^2 + y^2 + z^2 <= R^2 && z > 0 && R > 0, {x, y, z}];
RegionMeasure@r

enter image description here

| improve this answer | | | | |
$\endgroup$
1
$\begingroup$
rgn = ImplicitRegion[
   x^2 + y^2 + z^2 <= R^2 && z > 0 && R > 0, {x, y, z}];

Integrate[1, Element[{x, y, z}, rgn]] == Volume[rgn] == 
 RegionMeasure[rgn]

(* True *)

Integrate[y^2 z, Element[{x, y, z}, rgn]]

enter image description here

| improve this answer | | | | |
$\endgroup$

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