# Exponential integral with trigonometric argument

Hi,

Does anyone know of an analytic solution for the integral

$$\int_{0}^{\pi}\sin\theta\exp\left(a\sin^{2}\theta+b\sin\theta\right)d\theta$$

Thanks.

Mathematica has no clue how to do it in closed form.

jasonRF
Gold Member
I think I found all the pieces you need for an analytic solution, but my hunch is that it is useless. If you want insight, you will likely get more from pushing a bunch of a's and b's into the expression and doing the integrals numerically and observing behavior.

My analytical solution is an infinite series of terms that include Bessel, modified Bessel, modified Struve, and Weber functions, some with imaginary arguments (although of course in the end all the imaginary terms must cancel). Here it goes. Except where noted, all equation numbers refer to "handbook of mathematical functions" edited by Abramowitz and Stegun (you can find it free online at
http://www.math.ucla.edu/~cbm/aands/intro.htm#006 [Broken] ).

I start by using basic trig to change the integral to
$$P = \exp(a/2) \int_{0}^{\pi}\sin\theta\exp\left(\frac{-a}{2}\cos(2 \theta)+ b\sin\theta\right)d\theta$$

Then I use (9.6.34) which is the generating function for modified Bessel functions of the first kind, I_k(x), to get
$$\exp\left(\frac{-a}{2}\cos(2 \theta) \right) = \exp\left(\frac{a}{2}\cos(2 \theta-\pi) \right) = I_0(a/2) + 2 \sum_{k=1}^{\infty} I_k(a/2) \cos (2 k \theta - k \pi )$$

So we can write the integral as
$$P = \exp(a/2) \int_{0}^{\pi} d\theta \, \sin\theta \exp\left(b \sin \theta \right) \left[ I_0(a/2) + 2 \sum_{k=1}^{\infty} I_k(a/2) \cos (2 k \theta - k \pi ) \right]$$

The first integral in the series was solved by Mathematica Alpha
$$\int_{0}^{\pi} d\theta \, \sin\theta \exp\left(b \sin \theta \right) = \pi \left[L_{-1}(b) + I_1(b) \right]$$
Where $$L_{-1}(b)$$ is the modified Struve function of order -1. So it is already getting crazy. So I now write the integral as
$$P = \pi \exp(a/2) I_0(a/2) \left[L_{-1}(b) + I_1(b) \right] + \exp(a/2) \sum_{k=1}^{\infty} I_k(a/2) \left[\alpha_k^{+}(b) + \alpha_k^{-}(b) \right]$$
where I have used basic trig identities and defined
$$\alpha_k^{\pm}(b) = \int_{0}^{\pi} d\theta \, \sin\left( (2k \pm 1) \theta - k \pi \right) \exp\left(b \sin \theta \right)$$

Note that the modified bessel functions of the first kind decrease rapidly with increasing order once the order is larger than the argument. So as long as $$a$$ isn't too large very few terms will be required.

Anyway, we basically just need to evaluate integrals of the form
$$Q_\ell (b) = \int_{0}^{\pi} d\theta \, \sin\left( \ell \theta \right) \, \exp\left(b \sin \theta \right)$$

where $$\ell$$ is odd. Numerically these can be evaluated. Analytically I only come up with something crazy. I do the following

$$Q_\ell (b) = \int_{0}^{\pi} d\theta \, \sin\left( \ell \theta \right) \, \exp\left(b \sin \theta \right) = \frac{1}{2i} \int_{0}^{\pi} d\theta \, \left[\exp (i (-ib \sin\theta + \ell\theta )) - \exp (i (-ib \sin\theta - \ell\theta)) \right]$$

where $$i=\sqrt{-1}$$. We then continue ...

$$Q_\ell (b) = \frac{1}{2i} \int_{0}^{\pi} d\theta \, \cos( \ell\theta - i b \sin \theta ) + i \sin( \ell\theta - i b \sin \theta ) - \cos( -\ell\theta - i b \sin \theta ) - i \sin( -\ell\theta - i b \sin \theta )$$

Now I use (9.1.21) and (12.3.3) to write these as Bessel functions of first kind and Weber's functions

$$Q_\ell (b) = \frac{\pi}{2i} \left[J_\ell(ib) + i E_\ell(ib) - J_{-\ell} (ib) - i E_{-\ell}(ib)\right]$$

Where $$E_\ell(x)$$ is Weber's function.

So I think all the pieces are here for an infinite series representation of the integral, if you want to go through the trouble of puting it all together. As I stated before, I suspect this approach is useless, but it was kind of fun to play with. Numerical evaluation of the original integral will lead to some insight. Series and asymptotic expansions of it may also help.

Last edited by a moderator:
Hi JasonRF,

Thanks for all your help, it looks like you put in a lot of work! I am going to take sometime to go through it and see how it looks - I am still clinging to the hope that a neater analytical solution might pop out! Thanks again.

jasonRF
Gold Member
Found a much simpler expression, although is still an infinite series. Basic approach was to expand the exponential portion of the integrand
$$\exp\left(a\sin^{2}\theta+ b\sin\theta\right) = \sum_{n=0}^{\infty} \frac{(a \sin^2 \theta + b \sin \theta )^n}{\Gamma(n+1)}$$
Then use binomial theorem on each term, multiply by $$\sin\theta$$, and integrate term by term. I used Mathematica alpha for the only integral left
$$\int_0^\pi \sin^m \theta = \frac{\sqrt{\pi} \Gamma\left(\frac{m+1}{2} \right)}{\Gamma\left(\frac{m+2}{2} \right)}$$

I then get the integral of interest to be
$$\sqrt{\pi} \sum_{n=0}^{\infty} \sum_{k=0}^n \frac{a^{n-k} b^k \Gamma(n+1-k/2)} {\Gamma(k+1) \Gamma(n-k+1) \Gamma(n+3/2 - k/2)}$$

This is way better than my last post, and simpler too! The series converges pretty quickly. For example, with a=10 and b=5, if I sum up to n=50 I get the correct answer to 13 significant digits!

jason

Last edited:
Hi Jason,

That is very nice, thanks! Do you know of any methods/tricks that I could try to reduce it from a double to a single summation?

jasonRF
Gold Member
I did look at this with wolfram alpha. It turns out you can write the inner sum as two hypergeometric functions, which may look pretty but are likely less useful for computation. I am too lazy to type the result, but you can go to wolframalpha.com and type:

Sum[a^(n-k) b^k Gamma[n+1-k/2] / (Gamma[k+1] Gamma[n-k+1] Gamma[n+3/2-k/2]), {k, 0, n}]

you will get a sum of two 3F2 functions with some extra Gamma function factors.

jason

Yea, I got the hypergeometric functions from mathematica as well but I really don't think it improves the result! Thanks for your help!