Group Abstract Group Abstract

Message Boards Message Boards

0
|
5.7K Views
|
6 Replies
|
1 Total Like
View groups...
Share
Share this post:

Use float limits with Integrate?

Posted 7 years ago
POSTED BY: Jeffram Olander
6 Replies

Has seemingly to do with argument $k r$:

In[5]:= Integrate[BesselK[1, k r] BesselI[1, k r], {r, 1/2, 3/2}, Assumptions -> k \[Element] Complexes]
Out[5]= Integrate[BesselI[1, k r] BesselK[1, k r], {r, 1/2, 3/2}, Assumptions -> k \[Element] Complexes]

stating that $k \in \mathbb{C}$ does not help, so substitute the argument

    In[7]:= Integrate[BesselK[1, x] BesselI[1, x]/k, {x, k/2, 3 k/2}, 
                      Assumptions -> k \[Element] Complexes]

    Out[7]= (1/(4 k Sqrt[\[Pi]]))
            (-MeijerG[{{1, 1}, {}}, {{1/2, 3/2}, {-(1/2), 0}}, k/2, 1/2] + 
              MeijerG[{{1, 1}, {}}, {{1/2, 3/2}, {-(1/2), 0}}, (3 k)/2, 1/2]
            )
POSTED BY: Dent de Lion

Wow. sigh I'm using Mathematica 9. So it works in both an earlier and a later version. Thanks guys.

POSTED BY: Jeffram Olander

And here is the latest and greatest

In[4]:= $Version
Out[4]= "11.3.0 for Microsoft Windows (64-bit) (March 7, 2018)"

In[5]:= Integrate[BesselI[0, x] BesselK[1, x]/x^2, {x, 1/2, 3/2}]
Out[5]= 2/9 (8 + \[Pi]^(
    3/2) (9 MeijerG[{{1/2, 1}, {3/4, 5/4, 2}}, {{1, 1, 1}, {0, 0, 3/4,
           5/4}}, 1/2, 1/2] - 
      MeijerG[{{1/2, 1}, {3/4, 5/4, 2}}, {{1, 1, 1}, {0, 0, 3/4, 5/
         4}}, 3/2, 1/2]))

In[6]:= % // N
Out[6]= 1.45921

In[7]:= Integrate[BesselI[0, x] BesselK[1, x]/x^2, {x, .5, 1.5}]
Out[7]= 1.45921

Can you explain this?

It's a neverending story to explain software (implementations). Nevertheless Mathematica has an overwhelming strong relation to science and there it's quite usual to switch to numerical results (in contrast to symbolic ones) if the user chooses to give numerical input. Compare

In[8]:= 1/2
Out[8]= 1/2

In[9]:= 1/2.
Out[9]= 0.5

nothing obscure in that.

POSTED BY: Dent de Lion
POSTED BY: Hans Dolhaine
Posted 7 years ago

Hi Dent de Lion,

I really appreciate your investigation of my problem. You are correct that they argument $kr$ seems to be to blame for some of these computation failures. However, even with a simple argument, Integrate acts differently for float limits than for rational limits. Can you explain this?

For example,

In[1]:= Integrate[BesselI[0, x] BesselK[1, x]/x^2, {x, 1/2, 3/2}] // InputForm

Out[1]//InputForm=Integrate[(BesselI[0, x]*BesselK[1, x])/x^2, {x, 1/2, 3/2}]

In[2]:= Integrate[BesselI[0, x] BesselK[1, x]/x^2, {x, .5, 1.5}]

Out[2]= 1.45921

Thanks, Jeff

POSTED BY: Updating Name
When I give Integrate floating point limits is it reverting to NIntegrate?

no, by no means: NIntegrate[] returns a number (possibly with conditions), but you got a symbolic result parametrized by reals:

In[1]:= Integrate[(r k)^2, {r, 1/2, 3/2}]
Out[1]= (13 k^2)/12

In[2]:= NIntegrate[(r k)^2 , {r, 0.5, 1.5}]

During evaluation of In[2]:= NIntegrate::inumr: The integrand k^2 r^2 has evaluated to non-numerical values for all sampling points in the region with boundaries {{0.5,1.5}}.

Out[2]= NIntegrate[(r k)^2, {r, 0.5, 1.5}]
POSTED BY: Dent de Lion
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard