Inconsistency in Mathematica of whether integral diverges or not?

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











up vote
3
down vote

favorite












Consider the following integral



Integrate[(1 - x)^a x^b, x, 0, 1]



ConditionalExpression[(Gamma[1 + a] Gamma[1 + b])/Gamma[2 + a + b], Re[b]>-1&&Re[a]>-1]




The above general case states that the integral only converges when Re[b]>-1 and Re[a]>-1. However, if we plug the following explicit constants into the integral, we get:



Integrate[(1 - x)^(-(1/2) - 2 I) x^(-2 + 7 I), x, 0, 1]



(Gamma[-1 + 7 I] Gamma[1/2 - 2 I])/Gamma[-(1/2) + 5 I]




In which case mathematica seems to return a perfectly finite result that is the same as the general result above, except the parameters have been chosen such that the general case would not converge.



Now I am a bit confused and would like to ask:




Is the explicit result obtained above a bug in Mathematica and the integral actually should not converge at all?
Or maybe the result and convergence is fine, and the constraints in the general case are wrong?




Which one is it?










share|improve this question



























    up vote
    3
    down vote

    favorite












    Consider the following integral



    Integrate[(1 - x)^a x^b, x, 0, 1]



    ConditionalExpression[(Gamma[1 + a] Gamma[1 + b])/Gamma[2 + a + b], Re[b]>-1&&Re[a]>-1]




    The above general case states that the integral only converges when Re[b]>-1 and Re[a]>-1. However, if we plug the following explicit constants into the integral, we get:



    Integrate[(1 - x)^(-(1/2) - 2 I) x^(-2 + 7 I), x, 0, 1]



    (Gamma[-1 + 7 I] Gamma[1/2 - 2 I])/Gamma[-(1/2) + 5 I]




    In which case mathematica seems to return a perfectly finite result that is the same as the general result above, except the parameters have been chosen such that the general case would not converge.



    Now I am a bit confused and would like to ask:




    Is the explicit result obtained above a bug in Mathematica and the integral actually should not converge at all?
    Or maybe the result and convergence is fine, and the constraints in the general case are wrong?




    Which one is it?










    share|improve this question

























      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      Consider the following integral



      Integrate[(1 - x)^a x^b, x, 0, 1]



      ConditionalExpression[(Gamma[1 + a] Gamma[1 + b])/Gamma[2 + a + b], Re[b]>-1&&Re[a]>-1]




      The above general case states that the integral only converges when Re[b]>-1 and Re[a]>-1. However, if we plug the following explicit constants into the integral, we get:



      Integrate[(1 - x)^(-(1/2) - 2 I) x^(-2 + 7 I), x, 0, 1]



      (Gamma[-1 + 7 I] Gamma[1/2 - 2 I])/Gamma[-(1/2) + 5 I]




      In which case mathematica seems to return a perfectly finite result that is the same as the general result above, except the parameters have been chosen such that the general case would not converge.



      Now I am a bit confused and would like to ask:




      Is the explicit result obtained above a bug in Mathematica and the integral actually should not converge at all?
      Or maybe the result and convergence is fine, and the constraints in the general case are wrong?




      Which one is it?










      share|improve this question















      Consider the following integral



      Integrate[(1 - x)^a x^b, x, 0, 1]



      ConditionalExpression[(Gamma[1 + a] Gamma[1 + b])/Gamma[2 + a + b], Re[b]>-1&&Re[a]>-1]




      The above general case states that the integral only converges when Re[b]>-1 and Re[a]>-1. However, if we plug the following explicit constants into the integral, we get:



      Integrate[(1 - x)^(-(1/2) - 2 I) x^(-2 + 7 I), x, 0, 1]



      (Gamma[-1 + 7 I] Gamma[1/2 - 2 I])/Gamma[-(1/2) + 5 I]




      In which case mathematica seems to return a perfectly finite result that is the same as the general result above, except the parameters have been chosen such that the general case would not converge.



      Now I am a bit confused and would like to ask:




      Is the explicit result obtained above a bug in Mathematica and the integral actually should not converge at all?
      Or maybe the result and convergence is fine, and the constraints in the general case are wrong?




      Which one is it?







      calculus-and-analysis






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 3 hours ago









      Henrik Schumacher

      39.5k254118




      39.5k254118










      asked 3 hours ago









      Kagaratsch

      4,34031246




      4,34031246




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          4
          down vote



          accepted










          Use:



          Integrate[(1 - x)^(-(1/2) - 2 I) x^(-2 + 7 I), x, m, 1]



          ConditionalExpression[(Gamma[-1 + 7 I] Gamma[1/2 - 2 I])/
          Gamma[-(1/2) + 5 I] + (1/50 + (7 I)/50) m^(-1 + 7 I)
          Hypergeometric2F1[-1 + 7 I, 1/2 + 2 I, 7 I, m],
          0 < Re[m] < 1 && Im[m] == 0]




          and note that the first term is the result from your second integral, while the second, Hypergeometric2F1 term diverges for $m to 0$ due to the factor $m^(-1+7i)$. So, the second example looks like a bug in Integrate.



          Addendum



          Consider the Series expansion about the origin:



          Series[(1 - x)^a x^b, x, 0, 1] //TeXForm



          $x^b left(1-a x+Oleft(x^2right)right)$




          So, the integral will only converge at the origin if $Re(b)>-1$. Similarly, consider the Series expansion about $x=1$:



          Series[(1 - x)^a x^b, x, 1, 1] //TeXForm



          $(1-x)^a left(1+b (x-1)+Oleft((x-1)^2right)right)$




          This integral will converge at $x=1$ only if $Re(a)>-1$.






          share|improve this answer


















          • 1




            To clarify: it's not the hypergeometric function that causes the divergence in the second term, it's the factor m^(-1 + 7 I).
            – J. M. is somewhat okay.♦
            3 hours ago










          • @J.M.issomewhatokay. Agreed, my original wording was confusing.
            – Carl Woll
            3 hours ago










          • The result is certainly confusing, but is it absolutely wrong in all cases? With a suitable (non-standard) branch cut, I think you might be able to choose a spiral path (in the complex plane) to reach x=0 without the integrand diverging.
            – mikado
            3 hours ago










          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: "387"
          ;
          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: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f182667%2finconsistency-in-mathematica-of-whether-integral-diverges-or-not%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
          4
          down vote



          accepted










          Use:



          Integrate[(1 - x)^(-(1/2) - 2 I) x^(-2 + 7 I), x, m, 1]



          ConditionalExpression[(Gamma[-1 + 7 I] Gamma[1/2 - 2 I])/
          Gamma[-(1/2) + 5 I] + (1/50 + (7 I)/50) m^(-1 + 7 I)
          Hypergeometric2F1[-1 + 7 I, 1/2 + 2 I, 7 I, m],
          0 < Re[m] < 1 && Im[m] == 0]




          and note that the first term is the result from your second integral, while the second, Hypergeometric2F1 term diverges for $m to 0$ due to the factor $m^(-1+7i)$. So, the second example looks like a bug in Integrate.



          Addendum



          Consider the Series expansion about the origin:



          Series[(1 - x)^a x^b, x, 0, 1] //TeXForm



          $x^b left(1-a x+Oleft(x^2right)right)$




          So, the integral will only converge at the origin if $Re(b)>-1$. Similarly, consider the Series expansion about $x=1$:



          Series[(1 - x)^a x^b, x, 1, 1] //TeXForm



          $(1-x)^a left(1+b (x-1)+Oleft((x-1)^2right)right)$




          This integral will converge at $x=1$ only if $Re(a)>-1$.






          share|improve this answer


















          • 1




            To clarify: it's not the hypergeometric function that causes the divergence in the second term, it's the factor m^(-1 + 7 I).
            – J. M. is somewhat okay.♦
            3 hours ago










          • @J.M.issomewhatokay. Agreed, my original wording was confusing.
            – Carl Woll
            3 hours ago










          • The result is certainly confusing, but is it absolutely wrong in all cases? With a suitable (non-standard) branch cut, I think you might be able to choose a spiral path (in the complex plane) to reach x=0 without the integrand diverging.
            – mikado
            3 hours ago














          up vote
          4
          down vote



          accepted










          Use:



          Integrate[(1 - x)^(-(1/2) - 2 I) x^(-2 + 7 I), x, m, 1]



          ConditionalExpression[(Gamma[-1 + 7 I] Gamma[1/2 - 2 I])/
          Gamma[-(1/2) + 5 I] + (1/50 + (7 I)/50) m^(-1 + 7 I)
          Hypergeometric2F1[-1 + 7 I, 1/2 + 2 I, 7 I, m],
          0 < Re[m] < 1 && Im[m] == 0]




          and note that the first term is the result from your second integral, while the second, Hypergeometric2F1 term diverges for $m to 0$ due to the factor $m^(-1+7i)$. So, the second example looks like a bug in Integrate.



          Addendum



          Consider the Series expansion about the origin:



          Series[(1 - x)^a x^b, x, 0, 1] //TeXForm



          $x^b left(1-a x+Oleft(x^2right)right)$




          So, the integral will only converge at the origin if $Re(b)>-1$. Similarly, consider the Series expansion about $x=1$:



          Series[(1 - x)^a x^b, x, 1, 1] //TeXForm



          $(1-x)^a left(1+b (x-1)+Oleft((x-1)^2right)right)$




          This integral will converge at $x=1$ only if $Re(a)>-1$.






          share|improve this answer


















          • 1




            To clarify: it's not the hypergeometric function that causes the divergence in the second term, it's the factor m^(-1 + 7 I).
            – J. M. is somewhat okay.♦
            3 hours ago










          • @J.M.issomewhatokay. Agreed, my original wording was confusing.
            – Carl Woll
            3 hours ago










          • The result is certainly confusing, but is it absolutely wrong in all cases? With a suitable (non-standard) branch cut, I think you might be able to choose a spiral path (in the complex plane) to reach x=0 without the integrand diverging.
            – mikado
            3 hours ago












          up vote
          4
          down vote



          accepted







          up vote
          4
          down vote



          accepted






          Use:



          Integrate[(1 - x)^(-(1/2) - 2 I) x^(-2 + 7 I), x, m, 1]



          ConditionalExpression[(Gamma[-1 + 7 I] Gamma[1/2 - 2 I])/
          Gamma[-(1/2) + 5 I] + (1/50 + (7 I)/50) m^(-1 + 7 I)
          Hypergeometric2F1[-1 + 7 I, 1/2 + 2 I, 7 I, m],
          0 < Re[m] < 1 && Im[m] == 0]




          and note that the first term is the result from your second integral, while the second, Hypergeometric2F1 term diverges for $m to 0$ due to the factor $m^(-1+7i)$. So, the second example looks like a bug in Integrate.



          Addendum



          Consider the Series expansion about the origin:



          Series[(1 - x)^a x^b, x, 0, 1] //TeXForm



          $x^b left(1-a x+Oleft(x^2right)right)$




          So, the integral will only converge at the origin if $Re(b)>-1$. Similarly, consider the Series expansion about $x=1$:



          Series[(1 - x)^a x^b, x, 1, 1] //TeXForm



          $(1-x)^a left(1+b (x-1)+Oleft((x-1)^2right)right)$




          This integral will converge at $x=1$ only if $Re(a)>-1$.






          share|improve this answer














          Use:



          Integrate[(1 - x)^(-(1/2) - 2 I) x^(-2 + 7 I), x, m, 1]



          ConditionalExpression[(Gamma[-1 + 7 I] Gamma[1/2 - 2 I])/
          Gamma[-(1/2) + 5 I] + (1/50 + (7 I)/50) m^(-1 + 7 I)
          Hypergeometric2F1[-1 + 7 I, 1/2 + 2 I, 7 I, m],
          0 < Re[m] < 1 && Im[m] == 0]




          and note that the first term is the result from your second integral, while the second, Hypergeometric2F1 term diverges for $m to 0$ due to the factor $m^(-1+7i)$. So, the second example looks like a bug in Integrate.



          Addendum



          Consider the Series expansion about the origin:



          Series[(1 - x)^a x^b, x, 0, 1] //TeXForm



          $x^b left(1-a x+Oleft(x^2right)right)$




          So, the integral will only converge at the origin if $Re(b)>-1$. Similarly, consider the Series expansion about $x=1$:



          Series[(1 - x)^a x^b, x, 1, 1] //TeXForm



          $(1-x)^a left(1+b (x-1)+Oleft((x-1)^2right)right)$




          This integral will converge at $x=1$ only if $Re(a)>-1$.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 1 hour ago

























          answered 3 hours ago









          Carl Woll

          58.7k276150




          58.7k276150







          • 1




            To clarify: it's not the hypergeometric function that causes the divergence in the second term, it's the factor m^(-1 + 7 I).
            – J. M. is somewhat okay.♦
            3 hours ago










          • @J.M.issomewhatokay. Agreed, my original wording was confusing.
            – Carl Woll
            3 hours ago










          • The result is certainly confusing, but is it absolutely wrong in all cases? With a suitable (non-standard) branch cut, I think you might be able to choose a spiral path (in the complex plane) to reach x=0 without the integrand diverging.
            – mikado
            3 hours ago












          • 1




            To clarify: it's not the hypergeometric function that causes the divergence in the second term, it's the factor m^(-1 + 7 I).
            – J. M. is somewhat okay.♦
            3 hours ago










          • @J.M.issomewhatokay. Agreed, my original wording was confusing.
            – Carl Woll
            3 hours ago










          • The result is certainly confusing, but is it absolutely wrong in all cases? With a suitable (non-standard) branch cut, I think you might be able to choose a spiral path (in the complex plane) to reach x=0 without the integrand diverging.
            – mikado
            3 hours ago







          1




          1




          To clarify: it's not the hypergeometric function that causes the divergence in the second term, it's the factor m^(-1 + 7 I).
          – J. M. is somewhat okay.♦
          3 hours ago




          To clarify: it's not the hypergeometric function that causes the divergence in the second term, it's the factor m^(-1 + 7 I).
          – J. M. is somewhat okay.♦
          3 hours ago












          @J.M.issomewhatokay. Agreed, my original wording was confusing.
          – Carl Woll
          3 hours ago




          @J.M.issomewhatokay. Agreed, my original wording was confusing.
          – Carl Woll
          3 hours ago












          The result is certainly confusing, but is it absolutely wrong in all cases? With a suitable (non-standard) branch cut, I think you might be able to choose a spiral path (in the complex plane) to reach x=0 without the integrand diverging.
          – mikado
          3 hours ago




          The result is certainly confusing, but is it absolutely wrong in all cases? With a suitable (non-standard) branch cut, I think you might be able to choose a spiral path (in the complex plane) to reach x=0 without the integrand diverging.
          – mikado
          3 hours ago

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f182667%2finconsistency-in-mathematica-of-whether-integral-diverges-or-not%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          Long meetings (6-7 hours a day): Being “babysat” by supervisor

          Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

          Confectionery