Square root of a 2 variable quadratic - integration (2 different results - principal square root and factoring)

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












Consider the integral and the result according to wolfram alpha



$$ int_0^R sqrtr^2 + z^2 - 2zr;dr = fracr(r-2z)sqrt(r-z)^22(r-z)Bigg|_0^R \
=fracR^22 - zR
$$



where $z$ is a constant and $ 0 leq z < R$



Now lets factor the expression under the square root



$$ int_0^R sqrt(r - z)^2 ; dr$$



The square root only returns a magnitude according to convention (because we want it to be a function). So we have $|r - z|$ and our integral becomes



$$ int_0^z z - r ; dr + int_z^R r - z ; dr \
textor \
zr - fracr^22Bigg|_0^z + fracr^22 - zrBigg|_z^R \
fracR^22 - zR + z^2
$$



Why do I get 2 different results? Is the first method wrong and if so why? I must be integrating different functions if I'm getting different results. The 2nd method is the area under 2 line segments. The 1st method is the area under the slice of the surface $w = sqrtr^2 + z^2 -2zr$ where the slice is at some constant $z$. I'm confused what the math is saying in each situation. The 2 situations are different, but I don't know why they are different. It must somehow come down to the difference between $sqrtr^2 + z^2 - 2rz$ and $|r - z|$. Aren't $sqrt(x-a)^2$ and $|x-a|$ the same function? They can't be exactly the same because $int_0^10+adots ; dx$, depending on the integrand, gives different results?







share|cite|improve this question























    up vote
    2
    down vote

    favorite












    Consider the integral and the result according to wolfram alpha



    $$ int_0^R sqrtr^2 + z^2 - 2zr;dr = fracr(r-2z)sqrt(r-z)^22(r-z)Bigg|_0^R \
    =fracR^22 - zR
    $$



    where $z$ is a constant and $ 0 leq z < R$



    Now lets factor the expression under the square root



    $$ int_0^R sqrt(r - z)^2 ; dr$$



    The square root only returns a magnitude according to convention (because we want it to be a function). So we have $|r - z|$ and our integral becomes



    $$ int_0^z z - r ; dr + int_z^R r - z ; dr \
    textor \
    zr - fracr^22Bigg|_0^z + fracr^22 - zrBigg|_z^R \
    fracR^22 - zR + z^2
    $$



    Why do I get 2 different results? Is the first method wrong and if so why? I must be integrating different functions if I'm getting different results. The 2nd method is the area under 2 line segments. The 1st method is the area under the slice of the surface $w = sqrtr^2 + z^2 -2zr$ where the slice is at some constant $z$. I'm confused what the math is saying in each situation. The 2 situations are different, but I don't know why they are different. It must somehow come down to the difference between $sqrtr^2 + z^2 - 2rz$ and $|r - z|$. Aren't $sqrt(x-a)^2$ and $|x-a|$ the same function? They can't be exactly the same because $int_0^10+adots ; dx$, depending on the integrand, gives different results?







    share|cite|improve this question





















      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      Consider the integral and the result according to wolfram alpha



      $$ int_0^R sqrtr^2 + z^2 - 2zr;dr = fracr(r-2z)sqrt(r-z)^22(r-z)Bigg|_0^R \
      =fracR^22 - zR
      $$



      where $z$ is a constant and $ 0 leq z < R$



      Now lets factor the expression under the square root



      $$ int_0^R sqrt(r - z)^2 ; dr$$



      The square root only returns a magnitude according to convention (because we want it to be a function). So we have $|r - z|$ and our integral becomes



      $$ int_0^z z - r ; dr + int_z^R r - z ; dr \
      textor \
      zr - fracr^22Bigg|_0^z + fracr^22 - zrBigg|_z^R \
      fracR^22 - zR + z^2
      $$



      Why do I get 2 different results? Is the first method wrong and if so why? I must be integrating different functions if I'm getting different results. The 2nd method is the area under 2 line segments. The 1st method is the area under the slice of the surface $w = sqrtr^2 + z^2 -2zr$ where the slice is at some constant $z$. I'm confused what the math is saying in each situation. The 2 situations are different, but I don't know why they are different. It must somehow come down to the difference between $sqrtr^2 + z^2 - 2rz$ and $|r - z|$. Aren't $sqrt(x-a)^2$ and $|x-a|$ the same function? They can't be exactly the same because $int_0^10+adots ; dx$, depending on the integrand, gives different results?







      share|cite|improve this question











      Consider the integral and the result according to wolfram alpha



      $$ int_0^R sqrtr^2 + z^2 - 2zr;dr = fracr(r-2z)sqrt(r-z)^22(r-z)Bigg|_0^R \
      =fracR^22 - zR
      $$



      where $z$ is a constant and $ 0 leq z < R$



      Now lets factor the expression under the square root



      $$ int_0^R sqrt(r - z)^2 ; dr$$



      The square root only returns a magnitude according to convention (because we want it to be a function). So we have $|r - z|$ and our integral becomes



      $$ int_0^z z - r ; dr + int_z^R r - z ; dr \
      textor \
      zr - fracr^22Bigg|_0^z + fracr^22 - zrBigg|_z^R \
      fracR^22 - zR + z^2
      $$



      Why do I get 2 different results? Is the first method wrong and if so why? I must be integrating different functions if I'm getting different results. The 2nd method is the area under 2 line segments. The 1st method is the area under the slice of the surface $w = sqrtr^2 + z^2 -2zr$ where the slice is at some constant $z$. I'm confused what the math is saying in each situation. The 2 situations are different, but I don't know why they are different. It must somehow come down to the difference between $sqrtr^2 + z^2 - 2rz$ and $|r - z|$. Aren't $sqrt(x-a)^2$ and $|x-a|$ the same function? They can't be exactly the same because $int_0^10+adots ; dx$, depending on the integrand, gives different results?









      share|cite|improve this question










      share|cite|improve this question




      share|cite|improve this question









      asked Jul 20 at 14:53









      DWade64

      3891313




      3891313




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          The problem is that the function
          $$ r mapsto fracr(r-2z)lvert r-z rvert2 (r-z) = left(fracr^22 - r zright)operatornamesgn(r-z) $$
          is discontinuous at $r=z$ . It is a valid antiderivative of $r mapsto lvert r-zrvert$ on the intervals $[0,z]$ and $[z,R]$ individually, but not on the whole interval $[0,R]$ , since it is of course not differentiable at $r=z$ as well.



          If you split the interval of integration accordingly, you can still get the correct result:
          $$ - left(fracr^22 - r zright) Bigg|_0^z + left(fracr^22 - r zright) Bigg|_z^R = fracR^22 - z R +z^2 , .$$






          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',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            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%2f2857714%2fsquare-root-of-a-2-variable-quadratic-integration-2-different-results-princ%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            2
            down vote



            accepted










            The problem is that the function
            $$ r mapsto fracr(r-2z)lvert r-z rvert2 (r-z) = left(fracr^22 - r zright)operatornamesgn(r-z) $$
            is discontinuous at $r=z$ . It is a valid antiderivative of $r mapsto lvert r-zrvert$ on the intervals $[0,z]$ and $[z,R]$ individually, but not on the whole interval $[0,R]$ , since it is of course not differentiable at $r=z$ as well.



            If you split the interval of integration accordingly, you can still get the correct result:
            $$ - left(fracr^22 - r zright) Bigg|_0^z + left(fracr^22 - r zright) Bigg|_z^R = fracR^22 - z R +z^2 , .$$






            share|cite|improve this answer

























              up vote
              2
              down vote



              accepted










              The problem is that the function
              $$ r mapsto fracr(r-2z)lvert r-z rvert2 (r-z) = left(fracr^22 - r zright)operatornamesgn(r-z) $$
              is discontinuous at $r=z$ . It is a valid antiderivative of $r mapsto lvert r-zrvert$ on the intervals $[0,z]$ and $[z,R]$ individually, but not on the whole interval $[0,R]$ , since it is of course not differentiable at $r=z$ as well.



              If you split the interval of integration accordingly, you can still get the correct result:
              $$ - left(fracr^22 - r zright) Bigg|_0^z + left(fracr^22 - r zright) Bigg|_z^R = fracR^22 - z R +z^2 , .$$






              share|cite|improve this answer























                up vote
                2
                down vote



                accepted







                up vote
                2
                down vote



                accepted






                The problem is that the function
                $$ r mapsto fracr(r-2z)lvert r-z rvert2 (r-z) = left(fracr^22 - r zright)operatornamesgn(r-z) $$
                is discontinuous at $r=z$ . It is a valid antiderivative of $r mapsto lvert r-zrvert$ on the intervals $[0,z]$ and $[z,R]$ individually, but not on the whole interval $[0,R]$ , since it is of course not differentiable at $r=z$ as well.



                If you split the interval of integration accordingly, you can still get the correct result:
                $$ - left(fracr^22 - r zright) Bigg|_0^z + left(fracr^22 - r zright) Bigg|_z^R = fracR^22 - z R +z^2 , .$$






                share|cite|improve this answer













                The problem is that the function
                $$ r mapsto fracr(r-2z)lvert r-z rvert2 (r-z) = left(fracr^22 - r zright)operatornamesgn(r-z) $$
                is discontinuous at $r=z$ . It is a valid antiderivative of $r mapsto lvert r-zrvert$ on the intervals $[0,z]$ and $[z,R]$ individually, but not on the whole interval $[0,R]$ , since it is of course not differentiable at $r=z$ as well.



                If you split the interval of integration accordingly, you can still get the correct result:
                $$ - left(fracr^22 - r zright) Bigg|_0^z + left(fracr^22 - r zright) Bigg|_z^R = fracR^22 - z R +z^2 , .$$







                share|cite|improve this answer













                share|cite|improve this answer



                share|cite|improve this answer











                answered Jul 20 at 15:16









                ComplexYetTrivial

                2,607624




                2,607624






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2857714%2fsquare-root-of-a-2-variable-quadratic-integration-2-different-results-princ%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    What is the equation of a 3D cone with generalised tilt?

                    Relationship between determinant of matrix and determinant of adjoint?

                    Color the edges and diagonals of a regular polygon