Message Boards Message Boards

0
|
7752 Views
|
10 Replies
|
7 Total Likes
View groups...
Share
Share this post:

Integrate a Bessel Function K0(a*x) without the constant 'a' ?

Posted 5 years ago

Thanks for reading !

I am having a problem with the numerical integration of the Bessel function

y = BesselK0(a*x)

Since my constant is too large (a = 6800) I am getting the large arguments aproximation for the Bessel K0 function, making the integration difficult.

My question is: Is there some mathematical method or manipulation to remove the constant 'a' from the integration like

y = BesselK0(x)

to make me integrate it like small arguments and then insert the constant 'a' in it somehow after ?

Thank you very much !

POSTED BY: Romildo Junior
10 Replies
Integrate[BesselK[0, a x], x]

gives:

1/2 \[Pi] x (BesselK[0,a x] StruveL[-1,a x]+BesselK[1,a x] StruveL[0,a x])

Where you then can plug in the end-pointsÂ…

POSTED BY: Sander Huisman
Posted 5 years ago

For large arguments, you might consider looking into the asymptotic expansion of the modified Bessel function (e.g. this one).

POSTED BY: J. M.
Posted 5 years ago

Let me clarify my question:

I am using the online paid wolfram alpha.

Thank you two for the responses, I am trying to implement a fortran code here to Integrate this bessel function wich is a series of functions that multiply that bessel function, and the online wolfram cannot integrate analitcaly. The true form of the function is:

NIntegrate[(Sqrt[(0. + 0.0078125*(1 - xi) + 
        0.0078125*xi)^2]*(-0.015625 + 0.0078125*(1 - xi)*(1 + xi) + 
      0.0078125*xi*(1 + xi))*
       BesselK[0, 
     6283.185307179586*
      Sqrt[0. + (-0.015625 + 0.0078125*(1 - xi)*(1 + xi) + 
           0.0078125*xi*(1 + xi))^2]])/
    (0. + (-0.015625 + 0.0078125*(1 - xi)*(1 + xi) + 
       0.0078125*xi*(1 + xi))^2), {xi, -1, 1}]

The constant '6283.185307179586' is the constant 'a' that I said. If it is small, I can integrate it since it has a LOG singularity BY USING GAUSS LOG INTEGRATION. If the constant 'a' is large, I cant integrate it since it has finite part integrals of many orders ( large argument expansion).

Is there any mathematical method ( change of variables ?, substitution ? ) that can make me remove this 'a' '6283.185307179586' from the integral ? or make the argument small ?

POSTED BY: Romildo Junior
  func = Rationalize[(Sqrt[(0. + 0.0078125 (1 - xi) + 
            0.0078125 xi)^2] (-0.015625 + 0.0078125 (1 - xi) (1 + xi) + 
          0.0078125 xi (1 + xi)) BesselK[0, 
         6283.185307179586*
          Sqrt[0. + (-0.015625 + 0.0078125 (1 - xi) (1 + xi) + 
               0.0078125 xi (1 + xi))^2]])/(0. + (-0.015625 + 
           0.0078125 (1 - xi) (1 + xi) + 0.0078125 xi (1 + xi))^2), 0] //
     FullSimplify
  Integrate[func, {xi, -1, 1}](*Integral is divergent*)

  Integrate[BesselK[0, 2 Sqrt[(-1 + xi)^2]]/(-1 + xi), {xi, -1, 1}]
  (*Simplified version.Integral is divergent*)

Removing this: '6283.185307179586' large number will not help you at all.

POSTED BY: Mariusz Iwaniuk
Posted 5 years ago

Thank you very much for playing with the integral, yes this one is divergent !! But this is at one node of the problem, I am also dealing with integrals that are not divergent like this one:

Integrate[(Sqrt[(0. + 0.0078125*(1 - xi) + 
        0.0078125*xi)^2]*(-0.0078125 + 0.0078125*(1 - xi)*(1 + xi) + 
      0.0078125*xi*(1 + xi))*
        BesselK[0, 
     6283.185307179586*
      Sqrt[0. + (-0.0078125 + 0.0078125*(1 - xi)*(1 + xi) + 
           0.0078125*xi*(1 + xi))^2]])/
     (0. + (-0.0078125 + 0.0078125*(1 - xi)*(1 + xi) + 
       0.0078125*xi*(1 + xi))^2), {xi, -1, 1}]

If the correct numerical integration is used, this integral is given = 0. So if the constant is used 6283.185307179586, one need to solve as a cauchy principal value integral, if the constant is small one could solve as a weakly singular integral. I would love to remove that constant from the Bessel Term and then add it somehow after the integration. But Thank you very much for your answer !

POSTED BY: Romildo Junior
 func = Rationalize[(Sqrt[(0. + 0.0078125 (1 - xi) + 
             0.0078125 xi)^2] (-0.0078125 + 
           0.0078125 (1 - xi) (1 + xi) + 0.0078125 xi (1 + xi)) BesselK[
          0, 6283.185307179586*
           Sqrt[0. + (-0.0078125 + 0.0078125 (1 - xi) (1 + xi) + 
                0.0078125 xi (1 + xi))^2]])/(0. + (-0.0078125 + 
            0.0078125 (1 - xi) (1 + xi) + 0.0078125 xi (1 + xi))^2), 
      0] // FullSimplify;
  NIntegrate[func, {xi, -1, 0, 1}, Method -> PrincipalValue]
  (* 2.52435*10^-29 *)

With the Cauchy principal value integral is finite and equal to Zero.

POSTED BY: Mariusz Iwaniuk
Posted 5 years ago

This is a singular integral, maybe mathematica is having some problems integrating it ?

POSTED BY: Romildo Junior

It's seems a bug is in Integrate command and Yes you are right.

  Integrate[BesselK[0, (6632555543 Sqrt[xi^2])/135117312]/xi, {xi, -1, 1}, PrincipalValue -> True](* It should be Zero*)

Indefine integral:

Integrate[BesselK[0, Sqrt[x^2]]/x, x](*Cant find !*)

but:

$$\int \frac{K_0\left(\sqrt{x^2}\right)}{x} \, dx=-\frac{1}{4} G_{1,3}^{3,0}\left(\frac{x^2}{4}| \begin{array}{c} 1 \\ 0,0,0 \\ \end{array} \right)+C$$

With Cauchy Principal Value:

  Limit[((-Inactive[MeijerG][{{}, {1}}, {{0, 0, 0}, {}}, x^2/4]/4 // 
        Activate) /. 
      x -> (-e)) - ((-Inactive[MeijerG][{{}, {1}}, {{0, 0, 0}, {}}, x^2/
          4]/4 // Activate) /. 
      x -> -1) + (((-Inactive[MeijerG][{{}, {1}}, {{0, 0, 0}, {}}, x^2/
            4]/4 // Activate) /. 
        x -> 1) - ((-Inactive[MeijerG][{{}, {1}}, {{0, 0, 0}, {}}, x^2/
            4]/4 // Activate) /. x -> e)), e -> 0, Direction -> -1]

    (*  0  *)
POSTED BY: Mariusz Iwaniuk

For this integral, the integrand has odd symmetry, so its principal value is zero.

POSTED BY: Michael Rogers
Posted 5 years ago

Yeah, I think Mathematica has some problems with the integration of Bessel functions. I am trying to somehow avoid the evaluation of the integral in the Cauchy principal value sense by removing the constant and thus making the integral weakly singular.

The Large value expression for the Bessel K0 has a series of finite part integrals that Mathematica should have problems solving it. But the small argument expression has only weakly singular integrals. thats why I am trying to somehow remove that constant.

Thank you for proving my point !

POSTED BY: Romildo Junior
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract