Results 1 to 10 of 10

Math Help - How do I integrate this part of a hemisphere

  1. #1
    Newbie
    Joined
    Dec 2008
    Posts
    4

    How do I integrate this part of a hemisphere

    If i have a hemisphere:
    z=sqrt(3^2-x^2-y^2)


    Integrating this is no problem. For example, if the integration limits in the xy-plane are {x,0,1} and {y,0,1}, I can do it like this:

    \int_{0}^{1}\int_{0}^{1}sqrt(3^2-x^2-y^2) dx dy,

    which is easy to solve in mathematica for example.

    BUT, how do I do if I also have the condition: 0<z<2?

    \int_{0}^{2}(\int_{0}^{1}\int_{0}^{1}sqrt(3^2-x^2-y^2) dx dy)dz is obviously wrong... How do I set it up?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Dec 2008
    Posts
    4
    No one knows how to integrate the hemisphere which is limited by z<a (and a is smaller than the radius of the hemisphere)? (integration limits in the xy-plane must be rectangular)
    Attached Thumbnails Attached Thumbnails How do I integrate this part of a hemisphere-graph.jpg  
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Super Member
    Joined
    Aug 2008
    Posts
    903
    I'm sure a lot of them do. You just weren't clear what you wanted.

    I assume you mean the red part in the figure below. So I'd integrate the blue part and then subtract from 1/2 the volume of the sphere. Since the blue part is radially symmetric, I'll integrate over the first quadrant and multiply by four:

    I_b=4\int_0^{9-a^2}\int_0^{\sqrt{9-a^2-x^2}}\int_a^{\sqrt{9-x^2-y^2}} dzdydx.

    Since the volume of the sphere is 4/3 \pi r^3=36\pi then the volume of the red part is:

    V_r=1/2(36\pi)-I_b

    However probably easier to calculate this in perhaps cylindrical or spherical coordinates. Pretty sure that's it but double check it.
    Attached Thumbnails Attached Thumbnails How do I integrate this part of a hemisphere-hemispherepart.jpg  
    Last edited by shawsend; December 3rd 2008 at 03:49 PM. Reason: corrected integral limits
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Jul 2008
    Posts
    10

    ... not sure can't be solved ...

    .
    .
    Quote Originally Posted by jonitz View Post
    No one knows how to integrate the hemisphere which is limited by z<a (and a is smaller than the radius of the hemisphere)? (integration limits in the xy-plane must be rectangular)
    Not sure about that:

    The answer might ;-) be:

    0.5{ \int_{Y_L}^{Y_H}\int_{X_L}^{X_H}sqrt(R^2-x^2-y^2) dx dy

    -\int_{Y_L}^{Y_H}\int_{X_L}^{X_H}(sqrt(R^2-x^2-y^2)-a)dx dy

    +2a(Y_H-Y_L)(X_H-X_L)}

    ... or, that might be crap ... ;-)*

    .
    Where'd you get that smart graphic from? Did you make it up yourself just for this problem from some graphics program? If so, can you make them up to specification? I'm thinking of paraboloids, and off-axis sections of them, as illustrated in the following Powerpoint document, for example, the current Slide #41 (the slide #s are subject to change):

    http://home.att.net/~gijxixj/Parabol...nstrLatest.ppt

    ... though there are several other similar slides with paraboloid shapes there ... trouble is, the best one (with sufficient detail) that I could find on the Internet has the paraboloid "upside down".

    This PPT doc. refers to another interesting integration problem I posted here a while ago, and eventually solved myself:

    http://www.mathhelpforum.com/math-he...d-section.html

    Ditto to shawsend: where's your fancy graphic from?

    Thanks,
    Dennis Revell.
    .
    .
    * but it might not be ...
    .
    .
    Last edited by mathwimp; December 3rd 2008 at 09:56 PM. Reason: Enter title
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Dec 2008
    Posts
    4
    You are almost right. It's true that i'm interested in the red part. But not the whole red part, only small quadratic (in the xy-plane) elements.

    I can give you an example:

    We have the function for the hemisphere with radius of 2:
    f(x,y) = sqrt (2^2-x^2-y^2)
    And the maximum value of the function is 1:
    f(x,y)<=1

    I want to integrate this function for small quadratic elements (is supposed to be pixels) in the xy-plane. For example, integration limits: {x,1,2} and {y,0,1}

    The problem arises when a quadratic element contains both one part of the hemisphere which is truncated and a part that is not (because f(x,y) is not a continuos function in that area)

    Can you help me with this?
    (sorry for my bad english)


    Quote Originally Posted by shawsend View Post
    I'm sure a lot of them do. You just weren't clear what you wanted.

    I assume you mean the red part in the figure below. So I'd integrate the blue part and then subtract from 1/2 the volume of the sphere. Since the blue part is radially symmetric, I'll integrate over the first quadrant and multiply by four:

    I_b=4\int_0^{9-a^2}\int_0^{\sqrt{9-a^2-x^2}}\int_a^{\sqrt{9-x^2-y^2}} dzdydx.

    Since the volume of the sphere is 4/3 \pi r^3=36\pi then the volume of the red part is:

    V_r=1/2(36\pi)-I_b

    However probably easier to calculate this in perhaps cylindrical or spherical coordinates. Pretty sure that's it but double check it.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie
    Joined
    Dec 2008
    Posts
    4
    Can you explain how you are thinking?

    The "smart" graphics is done in Mathematica, and can easily be done to specification.

    Quote Originally Posted by mathwimp View Post
    .
    .
    Not sure about that:

    The answer might ;-) be:

    0.5{ \int_{Y_L}^{Y_H}\int_{X_L}^{X_H}sqrt(R^2-x^2-y^2) dx dy

    -\int_{Y_L}^{Y_H}\int_{X_L}^{X_H}(sqrt(R^2-x^2-y^2)-a)dx dy

    +2a(Y_H-Y_L)(X_H-X_L)}

    ... or, that might be crap ... ;-)*

    .
    Where'd you get that smart graphic from? Did you make it up yourself just for this problem from some graphics program? If so, can you make them up to specification?
    .
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Super Member
    Joined
    Aug 2008
    Posts
    903
    Quote Originally Posted by jonitz View Post
    I want to integrate this function for small quadratic elements (is supposed to be pixels) in the xy-plane. For example, integration limits: {x,1,2} and {y,0,1}

    The problem arises when a quadratic element contains both one part of the hemisphere which is truncated and a part that is not (because f(x,y) is not a continuos function in that area)

    Can you help me with this?
    (sorry for my bad english)
    You mean the region in the x-y plane below right?
    Attached Thumbnails Attached Thumbnails How do I integrate this part of a hemisphere-hemisphereregion.jpg  
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Super Member
    Joined
    Aug 2008
    Posts
    903
    Here's what I got if we're integrating that. See Plot below. I believe the volume of the indicated element is:

    V=\int_0^a \int_0^1\int_1^{\sqrt{4-y^2-z^2}} dxdydz

    You guys agree?

    Also, here's the Mathematica code I used to generate the plot for those interested. That way you can upload the code and then interactively rotate (ver 6 or higher) it to better see how the integration is being performed. See second plot.

    Code:
    pic1 = Graphics3D[
        {Polygon[{{2, 2, 0}, {-2, 2, 0}, 
           {-2, -2, 0}, {2, -2, 0}, 
           {2, 2, 0}}], Polygon[{{1, 0, 0}, 
           {1, 1, 0}, {1, 1, 1}, {1, 0, 1}, 
           {1, 0, 1}}], Line[{{-2, 0, 0}, 
           {2, 0, 0}}], Line[{{0, 2, 0}, 
           {0, -2, 0}}], Line[{{1, 1, 0}, 
           {Sqrt[3], 1, 0}}], 
         Line[{{1, 0, 0}, {1, 1, 0}}], 
         Line[{{1, 1, 1}, {Sqrt[2], 1, 1}}], 
         Line[{{1, 0, 1}, {Sqrt[3], 0, 
            1}}]}]; 
    bottom = ContourPlot3D[x^2 + y^2 + z^2 == 
        4, {x, -2, 2}, {y, -2, 2}, {z, 0, 1}, 
       PlotRange -> {{-2, 2}, {-2, 2}, 
         {-2, 2}}, BoxRatios -> {1, 1, 1}, 
       ContourStyle -> {Opacity[0.2], Red}, 
       Mesh -> None]
    shellsurface = ContourPlot3D[
       x^2 + y^2 + z^2 == 4, {x, -2, 2}, 
       {y, -2, 2}, {z, 0, 1}, PlotRange -> 
        {{-2, 2}, {-2, 2}, {-2, 2}}, 
       BoxRatios -> {1, 1, 1}, 
       ContourStyle -> {Opacity[0.2], Red}, 
       Mesh -> None, RegionFunction -> 
        Function[{x, y, z}, 1 <= x <= 2 && 
          0 <= y <= 1 && 0 <= z <= 1]]
    Show[{bottom, pic1, shellsurface}]
    Attached Thumbnails Attached Thumbnails How do I integrate this part of a hemisphere-volumeelement.jpg   How do I integrate this part of a hemisphere-view2.jpg  
    Last edited by shawsend; December 4th 2008 at 05:12 AM. Reason: corrected integration limits, added code and plot2
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Newbie
    Joined
    Jul 2008
    Posts
    10

    BRILLIANT!

    .
    .
    shawsend's got the answer - a lesson in: if you can't manage to think "outside the box", at least try turning the box around! Thanks for the lesson on lateral thinking. Nevertheless, I have a bone to pick with him! (see later).*

    As to "how I was thinking", jonitz, forget it, I wasn't - not too well, anyway - I was basically going down a similar path as shawsend started out on, but approached differently: "How do I remove the "offending" volume taken up by the disappeared 'polar cap(s)'?" Except I was looking at removing the volume of the (centre) cylinder (and/or rectangular sections thereof) from the (volume) integral of the cylindrical cut-out from the bottom to the top of the sphere ("horizontal" limits being the extent of the polar caps themselves): Such a subtraction must also give the volume of the caps. But then that messes up when trying to go for rectangular limits. My first description of the answer I gave (ie: crap) was the correct one!

    shawsend's method, or a slight extension thereof, will give an analytic answer for any rectangular limits - if any part of the limits occur within the inner circle, radius given by r = R - a, just figure which part of that volume (if any part, otherwise trivial) will have a side(s) or section(s) of a side wholly on the curved surface of the sphere: the type of integral that shawsend last gave then solves for this. The rest, to be added to this, then just comprises the volume of a rectangular block (or blocks) of height a, "horizontal" dimensions given according as to where the limit lines cross the inner circle - so you have to calculate these coincidences.

    I very much doubt that there is one single equation that covers all possible combinations of the horizontal rectangular limits, but with (a great deal of) care, you should(might?) be able to write a routine that figures out the relationship of the limits to the r circle, and so decide which (shawsend type) integral(s) to add to which rectangular block volume(s), to give the final answer. Some of the factors at least part of the way down such a routine might look like:
    .

    Assuming always that: XH > XL & YH > YL; r = |r| = |sqrt (R - a)|:

    IF
    -rXL ≤ +r AND -rXH ≤ +r AND XL+ YL ≤ r AND XH+ YL ≤ r AND XL+ YH ≤ r AND XH+ YH ≤ r => Ans. = |a(XH - XL)(YH - YL)| ... (Region 1: circle radius r: completely encloses limits "rectangle")

    ELSE IF
    XL > r OR XH < -r OR YL > r OR YH < -r => Ans. = you first thought of ... (Region 2: (limits rectangle) everywhere outside the square circumscribing circle of radius r)

    ELSE IF
    XL ≥ 0 AND YL ≥ 0 AND XL + YLr ( ... "standard" quadrant 1)
    OR
    XL ≥ 0 AND YH ≤ 0 AND XL + YHr ( ... "standard" quadrant 4)
    OR
    XH ≤ 0 AND YH ≤ 0 AND XH + YHr ( ... "standard" quadrant 3)
    OR
    XH ≤ 0 AND YL ≥ 0 AND XH + YLr ( ... "standard" quadrant 2)
    =>
    Ans. = you first thought of ... (Region 3: (limits rectangle) everywhere outside the circle of radius r. Region 2 (above) is contained within Region 3; Region 3 tests have "more finesse" than the Region 2 tests above - but are unnecessary if Region 2 tests prove TRUE. On the other hand, Region 3 tests make Region 2 tests redundant, ie: can either choose to always do Region 3 tests and omit Region 2 tests, or do Region 2 tests first, and if get a "hit", Region 3 tests can be looped around (ie: not done). The latter might occasionally save time, if that's an issue).

    ELSE IF NONE OF THE ABOVE:
    (ie: have a mix of (contiguous) Regions 1 & 3)
    ... Simple sum of "shawsend type" (s) and rectangular block(s) of height a ... UNLESS a corner or corners of the rectangle formed by the given X, Y limits fall between the r circle and the R "circle" (plan view!): this would require more working involving construction of new sets of limits based on the relation of the given X, Y limits with the r circle and the R "circle", and looks likely will involve difference(s) between the couple of types of s seen so far ("standard" & "shawsend") added, as before, to rectangular block(s) of height a.


    .
    It's more a hell of a problem in the general case than I'd first thought after comprehending the shawsend intregal, but I'm near certain that all combinations of limits and sphere size (R) and "cutoff" circle size (a) are analytic.


    .
    .
    shawsend, I guess the Mathematica code you gave is only of use if you happen to have Mathematica? Mathematica can solve integrals? Damn! How clever is that! Probably costs a bomb. Do you (anybody) know of any good free ;-) programs that'll do fancy 3-d graphics, and all that?

    After all that, I think jonitz should tell us what it's all for, don't you? ;-)

    .
    .
    * Where were you when I wanted the answer to THIS (which I eventually figured myself) ;-)
    .
    .
    Last edited by mathwimp; December 9th 2008 at 01:25 AM. Reason: Correction/Elaboration
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Newbie
    Joined
    Jul 2008
    Posts
    10

    Correction / Elaboration to immediately preceding post ...

    .
    .
    See corrected/elaborated post ...

    I'm done with this now ;-)

    I think ;-)
    .
    .
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. centroid of a hemisphere
    Posted in the Calculus Forum
    Replies: 9
    Last Post: April 19th 2012, 02:01 PM
  2. Sphere/hemisphere
    Posted in the Calculus Forum
    Replies: 1
    Last Post: December 12th 2010, 03:43 AM
  3. Temperature in Hemisphere
    Posted in the Differential Equations Forum
    Replies: 0
    Last Post: March 31st 2009, 06:41 AM
  4. Cone and Hemisphere
    Posted in the Trigonometry Forum
    Replies: 4
    Last Post: July 8th 2007, 10:15 AM
  5. Boundary of the Upper Hemisphere
    Posted in the Differential Geometry Forum
    Replies: 1
    Last Post: June 6th 2007, 05:11 PM

Search Tags


/mathhelpforum @mathhelpforum