# Integrate a bessel function?

**URL:** <https://community.wolfram.com/t/integrate-a-bessel-function/10279>\
**Category:** Questions\
**Tags:** calculus, equation-solving, symbolic-computations\
**Created:** [April 6, 2017, 7:00am UTC](https://community.wolfram.com/t/integrate-a-bessel-function/10279 "2017-04-06T07:00:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![moneerabughalwa](https://avatars.discourse-cdn.com/v4/letter/m/b9bd4f/32.png) [@moneerabughalwa](https://community.wolfram.com/u/moneerabughalwa)\
**Post date:** [April 6, 2017, 7:00am UTC](https://community.wolfram.com/t/integrate-a-bessel-function/10279/1 "2017-04-06T07:00:48Z")

</div>

Hi

I am trying to solve this integral, but Mathematica but with no luck at all.

```
Integrate[(Exp[-(x + s^2)/(2*a^2)])*(BesselI[0, Sqrt[x]*s/a^2]), {x, 0, g}]

```

where g is a constant.  
Can this be solved?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![mariuszi28cg](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mariuszi28cg/32/308_2.png) [@mariuszi28cg](https://community.wolfram.com/u/mariuszi28cg)\
**Post date:** [April 6, 2017, 3:58pm UTC](https://community.wolfram.com/t/integrate-a-bessel-function/10279/2 "2017-04-06T15:58:22Z")

</div>

It is best to use **NIntegrate** in yours case.

```
f[a_?NumericQ, s_?NumericQ, g_?NumericQ] := 
NIntegrate[(Exp[-(x + s^2)/(2 a^2)]) (BesselI[0, Sqrt[x]*s/a^2]), {x,0, g}]

f[1., 2, 3]
(*0.580509*)

```

Analytical solution maybe not exist.

Integral represented by an _ **infinite sum** _.

```
func = (Exp[-(x + s^2)/(2 a^2)]) (BesselI[0, Sqrt[x]*s/a^2])
sol = InverseZTransform[func /. x -> 1/x, x, n]
sol2 = Integrate[sol*x^n, {x, 0, g}, Assumptions -> n >= 0]
(*(2^-n a^(-2 n) E^(-(s^2/(2 a^2))) g^(1 + n) HypergeometricU[-n, 1, s^2/(2 a^2)])/((1 + n) Gamma[1 + n]^2)*)

```

![4444.png](https://global.discourse-cdn.com/wolfram/original/3X/5/b/5b30e20f6b88c1257b4e0486614022da9d85cf0d.png)

```
Sum[sol2, {n, 0, 1000}] /. a -> 1 /. s -> 2 /. g -> 3 // N
(*0.580509*)

```

---

<div class="post-metadata">

**Author:** ![sblinder](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/sblinder/32/17861_2.png) [@sblinder](https://community.wolfram.com/u/sblinder)\
**Post date:** [April 6, 2017, 5:07pm UTC](https://community.wolfram.com/t/integrate-a-bessel-function/10279/3 "2017-04-06T17:07:02Z")

</div>

Mathematica is evidently not able to do the integral analytically. You need some clever transformation of variables or just a resort to numerical integration (with g, a and s given numerical values).

---

<div class="post-metadata">

**Author:** ![bradklee](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/bradklee/32/16606_2.png) [@bradklee](https://community.wolfram.com/u/bradklee)\
**Post date:** [April 6, 2017, 7:48pm UTC](https://community.wolfram.com/t/integrate-a-bessel-function/10279/4 "2017-04-06T19:48:55Z")

</div>

Hi,

You might also look into the following reference:

\> [Wolfram Functions: Bessel](http://functions.wolfram.com/Bessel-TypeFunctions/BesselI/).

\>\> [Product Integrals](http://functions.wolfram.com/Bessel-TypeFunctions/BesselI/21/01/02/)

\>\>\> [Power Function](http://functions.wolfram.com/Bessel-TypeFunctions/BesselI/21/01/02/01/01/01/)

\>\>\> [Exponential Function](http://functions.wolfram.com/Bessel-TypeFunctions/BesselI/21/01/02/02/01/02/)

A lot of integrals are already written down, usually in terms of a linear argument. I agree with Blinder, you may want to start by changing variables: \sqrt{x}=y.

Although, it’s also useful to look at the series expansion:

[Bessel Series Expansion](http://functions.wolfram.com/Bessel-TypeFunctions/BesselI/06/01/04/01/01/)

As it is an even function, the integrand should expand in whole powers of x. Then it’s possible to integrate term by term,

```
Integrate[Normal[Series[(Exp[-(x + s^2)/(2*a^2)])*(BesselI[0, 
      Sqrt[x]*s/a^2]), {x, 0, 10}]], {x, 0, g}]
N[% /. {a -> 1, s -> 2, g -> 3}]

```

 ![Output.png](https://global.discourse-cdn.com/wolfram/original/3X/0/7/07208bd80edb006a0e885af9033972c6f902f376.png)

Depending on the limit g, this is an okay method numerically. It also lends some insight in terms of symbols. The functional part has a reliable lexicographic ordering, so we just need to figure out sequence or sequences of denominators. It’s useful to compare with OEIS, for example: [A002866](http://oeis.org/A002866), and [A187735](http://oeis.org/A187735) which appear correct to a factor for cases with s^0 and s^2 .

If you get stuck with transforms, it can help to calculate a few coefficients.

Brad

---

<div class="post-metadata">

**Author:** ![anon21378091](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@anon21378091](https://community.wolfram.com/u/anon21378091)\
**Post date:** [April 9, 2017, 1:18pm UTC](https://community.wolfram.com/t/integrate-a-bessel-function/10279/5 "2017-04-09T13:18:33Z")

</div>

thanks a lot guys for the help, this was useful
