How to calculate the volume of intersection of sphere and cylinder












-1














I have to calculate the volume of intersection of a sphere and a cylinder.
The cylinder's radius is $r$ and the center point is $(r,0,0)$.
The sphere's center point is $(0,0,0)$ and the radius $2r$.



I calculated the estimated volume with Monte Carlo methods but now I have to calculate the real volume with a formula.
Is there any kind of explicit equation for this volume?



I will appreciate any kind of help!










share|cite|improve this question
























  • Please show that estimated volume calculation and any and all other relevant info, please!
    – The Count
    Jan 10 '17 at 19:09










  • ok=0; for i=1:n x = rand(1,3); x = x*4*R-2*R; if((x(1))^2+(x(2))^2+x(3)^2-(2*R)^2 <= 0 && ((x(1)-R)/R)^2+(x(2)/R)^2-1 <= 0) ok=ok+1; end end montecarlo_V = ok/n * (2*R)^3;
    – VanBubuu
    Jan 10 '17 at 20:29










  • I used this to calculate the estimated, now I have to calculate the theoretical one.
    – VanBubuu
    Jan 10 '17 at 20:29
















-1














I have to calculate the volume of intersection of a sphere and a cylinder.
The cylinder's radius is $r$ and the center point is $(r,0,0)$.
The sphere's center point is $(0,0,0)$ and the radius $2r$.



I calculated the estimated volume with Monte Carlo methods but now I have to calculate the real volume with a formula.
Is there any kind of explicit equation for this volume?



I will appreciate any kind of help!










share|cite|improve this question
























  • Please show that estimated volume calculation and any and all other relevant info, please!
    – The Count
    Jan 10 '17 at 19:09










  • ok=0; for i=1:n x = rand(1,3); x = x*4*R-2*R; if((x(1))^2+(x(2))^2+x(3)^2-(2*R)^2 <= 0 && ((x(1)-R)/R)^2+(x(2)/R)^2-1 <= 0) ok=ok+1; end end montecarlo_V = ok/n * (2*R)^3;
    – VanBubuu
    Jan 10 '17 at 20:29










  • I used this to calculate the estimated, now I have to calculate the theoretical one.
    – VanBubuu
    Jan 10 '17 at 20:29














-1












-1








-1







I have to calculate the volume of intersection of a sphere and a cylinder.
The cylinder's radius is $r$ and the center point is $(r,0,0)$.
The sphere's center point is $(0,0,0)$ and the radius $2r$.



I calculated the estimated volume with Monte Carlo methods but now I have to calculate the real volume with a formula.
Is there any kind of explicit equation for this volume?



I will appreciate any kind of help!










share|cite|improve this question















I have to calculate the volume of intersection of a sphere and a cylinder.
The cylinder's radius is $r$ and the center point is $(r,0,0)$.
The sphere's center point is $(0,0,0)$ and the radius $2r$.



I calculated the estimated volume with Monte Carlo methods but now I have to calculate the real volume with a formula.
Is there any kind of explicit equation for this volume?



I will appreciate any kind of help!







integration volume spheres monte-carlo






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Jan 10 '17 at 19:24









The Count

2,29961431




2,29961431










asked Jan 10 '17 at 19:05









VanBubuu

1




1












  • Please show that estimated volume calculation and any and all other relevant info, please!
    – The Count
    Jan 10 '17 at 19:09










  • ok=0; for i=1:n x = rand(1,3); x = x*4*R-2*R; if((x(1))^2+(x(2))^2+x(3)^2-(2*R)^2 <= 0 && ((x(1)-R)/R)^2+(x(2)/R)^2-1 <= 0) ok=ok+1; end end montecarlo_V = ok/n * (2*R)^3;
    – VanBubuu
    Jan 10 '17 at 20:29










  • I used this to calculate the estimated, now I have to calculate the theoretical one.
    – VanBubuu
    Jan 10 '17 at 20:29


















  • Please show that estimated volume calculation and any and all other relevant info, please!
    – The Count
    Jan 10 '17 at 19:09










  • ok=0; for i=1:n x = rand(1,3); x = x*4*R-2*R; if((x(1))^2+(x(2))^2+x(3)^2-(2*R)^2 <= 0 && ((x(1)-R)/R)^2+(x(2)/R)^2-1 <= 0) ok=ok+1; end end montecarlo_V = ok/n * (2*R)^3;
    – VanBubuu
    Jan 10 '17 at 20:29










  • I used this to calculate the estimated, now I have to calculate the theoretical one.
    – VanBubuu
    Jan 10 '17 at 20:29
















Please show that estimated volume calculation and any and all other relevant info, please!
– The Count
Jan 10 '17 at 19:09




Please show that estimated volume calculation and any and all other relevant info, please!
– The Count
Jan 10 '17 at 19:09












ok=0; for i=1:n x = rand(1,3); x = x*4*R-2*R; if((x(1))^2+(x(2))^2+x(3)^2-(2*R)^2 <= 0 && ((x(1)-R)/R)^2+(x(2)/R)^2-1 <= 0) ok=ok+1; end end montecarlo_V = ok/n * (2*R)^3;
– VanBubuu
Jan 10 '17 at 20:29




ok=0; for i=1:n x = rand(1,3); x = x*4*R-2*R; if((x(1))^2+(x(2))^2+x(3)^2-(2*R)^2 <= 0 && ((x(1)-R)/R)^2+(x(2)/R)^2-1 <= 0) ok=ok+1; end end montecarlo_V = ok/n * (2*R)^3;
– VanBubuu
Jan 10 '17 at 20:29












I used this to calculate the estimated, now I have to calculate the theoretical one.
– VanBubuu
Jan 10 '17 at 20:29




I used this to calculate the estimated, now I have to calculate the theoretical one.
– VanBubuu
Jan 10 '17 at 20:29










2 Answers
2






active

oldest

votes


















1














Yes, draw a figure, and you will realize that the volume is given by
$$
2iint_D sqrt{(2r)^2-x^2-y^2},dx,dy
$$
where
$$
D={(x,y)inmathbb R^2~|~(x-r)^2+y^2leq r^2}.
$$
I leave it to you to calculate the integral.






share|cite|improve this answer





















  • Thank you for the answer. Can you give me some hints, links how can I calculate this? I'm not very good in math :(
    – VanBubuu
    Jan 10 '17 at 20:30



















0














Let the sphere be $x^2+y^2+z^2 = 4a^2$
And the cylinder be $(x - a)^2+y^2 = a^2$
Using polar coordinates we have
$$x = r costheta cosphi$$
$$y = r sintheta cosphi$$
$$z = r sinphi$$
Then the equation of the sphere is r = 2a
And the cylinder $r cosphi = 2a costheta$
Solving the 2 equations we have the curve of intersection $cosphi = costheta$ or $phi = theta$
This means that for a fixed $theta$ we have $phi$ varies from 0 to $theta$ and r varies from 0 to 2a and $theta$ from 0 to $pi$ / 2 by considering only the first quadrant.
By transforming to polar coordinates we have the volume integrant to be
$$frac{D(x, y, z)}{D(theta, phi, r)} = r^2cosphi$$
Hence the total volume is
$$4int_0^frac{pi}{2}int_0^{2a}int_0^theta r^2cos{phi}d{phi}drd{theta}$$
$$= 4int_0^frac{pi}{2}int_0^{2a}r^2sin{theta}drd{theta}$$
$$= 4int_0^frac{pi}{2}frac{8a^3}{3}sin{theta}d{theta}$$
$$= frac{32a^3}{3}$$






share|cite|improve this answer





















    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "69"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2092290%2fhow-to-calculate-the-volume-of-intersection-of-sphere-and-cylinder%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Yes, draw a figure, and you will realize that the volume is given by
    $$
    2iint_D sqrt{(2r)^2-x^2-y^2},dx,dy
    $$
    where
    $$
    D={(x,y)inmathbb R^2~|~(x-r)^2+y^2leq r^2}.
    $$
    I leave it to you to calculate the integral.






    share|cite|improve this answer





















    • Thank you for the answer. Can you give me some hints, links how can I calculate this? I'm not very good in math :(
      – VanBubuu
      Jan 10 '17 at 20:30
















    1














    Yes, draw a figure, and you will realize that the volume is given by
    $$
    2iint_D sqrt{(2r)^2-x^2-y^2},dx,dy
    $$
    where
    $$
    D={(x,y)inmathbb R^2~|~(x-r)^2+y^2leq r^2}.
    $$
    I leave it to you to calculate the integral.






    share|cite|improve this answer





















    • Thank you for the answer. Can you give me some hints, links how can I calculate this? I'm not very good in math :(
      – VanBubuu
      Jan 10 '17 at 20:30














    1












    1








    1






    Yes, draw a figure, and you will realize that the volume is given by
    $$
    2iint_D sqrt{(2r)^2-x^2-y^2},dx,dy
    $$
    where
    $$
    D={(x,y)inmathbb R^2~|~(x-r)^2+y^2leq r^2}.
    $$
    I leave it to you to calculate the integral.






    share|cite|improve this answer












    Yes, draw a figure, and you will realize that the volume is given by
    $$
    2iint_D sqrt{(2r)^2-x^2-y^2},dx,dy
    $$
    where
    $$
    D={(x,y)inmathbb R^2~|~(x-r)^2+y^2leq r^2}.
    $$
    I leave it to you to calculate the integral.







    share|cite|improve this answer












    share|cite|improve this answer



    share|cite|improve this answer










    answered Jan 10 '17 at 19:11









    mickep

    18.5k12250




    18.5k12250












    • Thank you for the answer. Can you give me some hints, links how can I calculate this? I'm not very good in math :(
      – VanBubuu
      Jan 10 '17 at 20:30


















    • Thank you for the answer. Can you give me some hints, links how can I calculate this? I'm not very good in math :(
      – VanBubuu
      Jan 10 '17 at 20:30
















    Thank you for the answer. Can you give me some hints, links how can I calculate this? I'm not very good in math :(
    – VanBubuu
    Jan 10 '17 at 20:30




    Thank you for the answer. Can you give me some hints, links how can I calculate this? I'm not very good in math :(
    – VanBubuu
    Jan 10 '17 at 20:30











    0














    Let the sphere be $x^2+y^2+z^2 = 4a^2$
    And the cylinder be $(x - a)^2+y^2 = a^2$
    Using polar coordinates we have
    $$x = r costheta cosphi$$
    $$y = r sintheta cosphi$$
    $$z = r sinphi$$
    Then the equation of the sphere is r = 2a
    And the cylinder $r cosphi = 2a costheta$
    Solving the 2 equations we have the curve of intersection $cosphi = costheta$ or $phi = theta$
    This means that for a fixed $theta$ we have $phi$ varies from 0 to $theta$ and r varies from 0 to 2a and $theta$ from 0 to $pi$ / 2 by considering only the first quadrant.
    By transforming to polar coordinates we have the volume integrant to be
    $$frac{D(x, y, z)}{D(theta, phi, r)} = r^2cosphi$$
    Hence the total volume is
    $$4int_0^frac{pi}{2}int_0^{2a}int_0^theta r^2cos{phi}d{phi}drd{theta}$$
    $$= 4int_0^frac{pi}{2}int_0^{2a}r^2sin{theta}drd{theta}$$
    $$= 4int_0^frac{pi}{2}frac{8a^3}{3}sin{theta}d{theta}$$
    $$= frac{32a^3}{3}$$






    share|cite|improve this answer


























      0














      Let the sphere be $x^2+y^2+z^2 = 4a^2$
      And the cylinder be $(x - a)^2+y^2 = a^2$
      Using polar coordinates we have
      $$x = r costheta cosphi$$
      $$y = r sintheta cosphi$$
      $$z = r sinphi$$
      Then the equation of the sphere is r = 2a
      And the cylinder $r cosphi = 2a costheta$
      Solving the 2 equations we have the curve of intersection $cosphi = costheta$ or $phi = theta$
      This means that for a fixed $theta$ we have $phi$ varies from 0 to $theta$ and r varies from 0 to 2a and $theta$ from 0 to $pi$ / 2 by considering only the first quadrant.
      By transforming to polar coordinates we have the volume integrant to be
      $$frac{D(x, y, z)}{D(theta, phi, r)} = r^2cosphi$$
      Hence the total volume is
      $$4int_0^frac{pi}{2}int_0^{2a}int_0^theta r^2cos{phi}d{phi}drd{theta}$$
      $$= 4int_0^frac{pi}{2}int_0^{2a}r^2sin{theta}drd{theta}$$
      $$= 4int_0^frac{pi}{2}frac{8a^3}{3}sin{theta}d{theta}$$
      $$= frac{32a^3}{3}$$






      share|cite|improve this answer
























        0












        0








        0






        Let the sphere be $x^2+y^2+z^2 = 4a^2$
        And the cylinder be $(x - a)^2+y^2 = a^2$
        Using polar coordinates we have
        $$x = r costheta cosphi$$
        $$y = r sintheta cosphi$$
        $$z = r sinphi$$
        Then the equation of the sphere is r = 2a
        And the cylinder $r cosphi = 2a costheta$
        Solving the 2 equations we have the curve of intersection $cosphi = costheta$ or $phi = theta$
        This means that for a fixed $theta$ we have $phi$ varies from 0 to $theta$ and r varies from 0 to 2a and $theta$ from 0 to $pi$ / 2 by considering only the first quadrant.
        By transforming to polar coordinates we have the volume integrant to be
        $$frac{D(x, y, z)}{D(theta, phi, r)} = r^2cosphi$$
        Hence the total volume is
        $$4int_0^frac{pi}{2}int_0^{2a}int_0^theta r^2cos{phi}d{phi}drd{theta}$$
        $$= 4int_0^frac{pi}{2}int_0^{2a}r^2sin{theta}drd{theta}$$
        $$= 4int_0^frac{pi}{2}frac{8a^3}{3}sin{theta}d{theta}$$
        $$= frac{32a^3}{3}$$






        share|cite|improve this answer












        Let the sphere be $x^2+y^2+z^2 = 4a^2$
        And the cylinder be $(x - a)^2+y^2 = a^2$
        Using polar coordinates we have
        $$x = r costheta cosphi$$
        $$y = r sintheta cosphi$$
        $$z = r sinphi$$
        Then the equation of the sphere is r = 2a
        And the cylinder $r cosphi = 2a costheta$
        Solving the 2 equations we have the curve of intersection $cosphi = costheta$ or $phi = theta$
        This means that for a fixed $theta$ we have $phi$ varies from 0 to $theta$ and r varies from 0 to 2a and $theta$ from 0 to $pi$ / 2 by considering only the first quadrant.
        By transforming to polar coordinates we have the volume integrant to be
        $$frac{D(x, y, z)}{D(theta, phi, r)} = r^2cosphi$$
        Hence the total volume is
        $$4int_0^frac{pi}{2}int_0^{2a}int_0^theta r^2cos{phi}d{phi}drd{theta}$$
        $$= 4int_0^frac{pi}{2}int_0^{2a}r^2sin{theta}drd{theta}$$
        $$= 4int_0^frac{pi}{2}frac{8a^3}{3}sin{theta}d{theta}$$
        $$= frac{32a^3}{3}$$







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Nov 21 '18 at 1:47









        KY Tang

        644




        644






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2092290%2fhow-to-calculate-the-volume-of-intersection-of-sphere-and-cylinder%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            'app-layout' is not a known element: how to share Component with different Modules

            android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

            WPF add header to Image with URL pettitions [duplicate]