# Exploding Integrand

1. Jul 3, 2007

### Heavytortoise

I'm trying to put together an acoustic scattering simulation program using the T-matrix method. To keep things simple initially I'm just modeling scattering from rigid 2-D cylinders in an inviscid medium. My problem is that I'm a newb with respect to Bessel functions and can't get a particular integral to behave well. As briefly as possible, I need to evaluate the following surface integral over an ellipse:
$$Q_{nm}=\int_S\hat{n}\cdot(\nabla\phi_n(r))\;Re\phi_m(r)\;dS$$,
where the indices range from 0 up to 10 or higher, depending on scatterer size. The even-parity cylindrical basis functions are

$$\phi_n(r)=H_n(kr)\cos n\theta$$

where $$H_n(kr)$$ are Hankel functions of the first kind and $$Re\phi_n(r)$$ are the real part of the basis functions. My problem shows up when I take the inner product with the surface normal using cylindrical coordinates. Since the angular component of the gradient is complex valued, the cylindrical inner product $$r_1r_2\cos(\theta_1-\theta_2)$$ attains very large values (NaNs in floating point) for $$kr < n, m < n$$. In this particular problem, I have

$$\theta_1 = -\frac{n}{r}(J_n(kr)+iN_n(kr))J_m(kr)\sin n\theta\cos m\theta$$.

I can't see a way around this yet, and it's driving me crazy. T-matrix methods have been around for a few decades now so I know they work, I just can't get past this obstacle. Hopefully I'm missing something simple.