# Numerical integration of Hankel functions

I would like to know how to perform numeric integration for the following type of integrals in Mathematica.
For the following integrand, we can not get the symbolic result.

NIntegrate[ y * Integrate[ 1/x * HankelH1[1, k*x] * HankelH2[1, x/k], {x,1,y}],
{y, 1, 2}]


The aim of the integration is to find the real and imaginary parts of the result.

Your views and inputs are greatly appreciated.

-
p.s. where k = Exp[I*Pi/4] with "I" being the complex variable. –  learner123 Nov 29 '13 at 11:15
Yes the integration needs to be done twice –  learner123 Nov 29 '13 at 11:32
Can you try along the same direction as your other question 37931 ? –  b.gatessucks Nov 29 '13 at 11:38
What's wrong with with a straightforward double integral, NIntegrate[y*1/x*HankelH1[1, k*x]*HankelH2[1, x/k], {y, 1, 2}, {x, 1, y}]? –  Michael E2 Nov 29 '13 at 16:30

## 1 Answer

You can try to do it this way:

k = Exp[I Pi/4];
f[y_] := y * NIntegrate[ 1/x * HankelH1[1, k*x] * HankelH2[1, x/k], {x, 1, y}]
result = NIntegrate[ f[y], {y, 1, 2},
Method -> {Automatic, "SymbolicProcessing" -> None}]

-
Hi All, For the following command, NIntegrate[yNIntegrate[1/xHankelH1[1,xk]*HankelH2[1, x/k], {x,1,y}] ,{y,1,2}]/. {x->0.5, k-> Exp[IPi/4]} I recieve following warning. NIntegrate::nlim: x = y is not a valid limit of integration. –  learner123 Dec 2 '13 at 2:09
@learner123 Ok, so what is the problem? You can use code that Michael E2 post above (better) or my version (worse). Your code will never give result because there is "k" in the integrand that is not numeric. –  Kamov Sergey Dec 2 '13 at 3:17