4

What is an efficient and stable numerical algorithm to evaluate the integral:

$\int_0^L e^{-\alpha x}\frac{e^{\frac{i\beta}{(x+x_0)}}}{(x+x_0)}\mbox{d}x$

with $i$ the imaginary unit, $\;(\alpha,L)>0$, $\;(\beta,x_0) \in \mathbb{R}$?

Some notes. If $\alpha=0$ the integral can be evaluated in closed form in terms of the exponential integral $E_i$ function. If $x_0=0$ and $L\rightarrow \infty$ the integral can be expressed in terms of the MeijerG function. For my purposes $L$ can be safely substituted with $\infty$ if it can help.

1 Answers1

0

Obviously, what I should do is to replace the second exponential by sine and cosine. Then, what I should prefer is an high order self adaptative Runge-Kutta method for the evaluation of each integral. This assumes that L is not infinity. You will find details in these two links

http://en.wikipedia.org/wiki/Runge-Kutta_methods#Adaptive_Runge.E2.80.93Kutta_methods http://en.wikipedia.org/wiki/List_of_Runge-Kutta_methods

You could prefer standard methods (there are really many)
http://en.wikipedia.org/wiki/Numerical_integration

  • Thanks, but standard algorithms, e.g., quad or quadgk by Matlab, experience problems due to the fast oscillations of the second exponential. Moreover, if x0<0 there is a singularity in the integral. – user2696676 Dec 06 '13 at 09:57
  • May I suggest you have a look at http://www.gnu.org/software/gsl/manual/html_node/Numerical-Integration.html ? They have a very good reputation for simple problems like your ! Let me know if you find something there. Cheers. – Claude Leibovici Dec 06 '13 at 10:07
  • @user2696676. I just noticed (I am almost blind) that I forgot to write "simple" instead of simple. This makes the difference between a joke and a stupidity. Sorry for that. – Claude Leibovici Dec 07 '13 at 04:44
  • Unfortunately I need to use Matlab or Mathematica. But both fail in evaluating the integral for the mentioned problems (singularity and fast oscillations). Since both Matlab and Mathematica have a good reputation as well, I believe that the problem cannot be tackled with general purpose routines. I'm searching for smarter ideas. Maybe the steepest descent method can be the solution, but I'm not used with it. – user2696676 Dec 09 '13 at 14:59