I have to evaluate the object
$$ b(q,m,n)=\int_{-\infty}^{\infty} \mathrm{d}k |c_n(w(k,q))|^2J_m(q)\delta(Y_n(w(k,q))-m) $$
Where $q$ is a continuous variable, $m$, $n$ are integers and
$$ w(k,q)=k^2+q^2 $$
The exact definitions of $c_n$ and $Y_n$ are irrelevant, the important point being that they are both known only numerically (no closed form expression).
Nevertheless in my problem they are
$$ c_n(w)= \int_{0}^{2\pi}\mathrm{d}z\, S(b_{2n+2}(w), \frac{1}{w^2}, z) C'(a_0(w), \frac{1}{w^2}, z) $$
and
$$Y_n(w)=b_{2n+2}(w)-a_0(w)$$
where
$C(a,q,z)$, $S(a,q,z)$ - Mathieu even and odd functions (aka elliptic cosine and sine functions), $a_0(z)$, $b_{2n+2}(z)$ - Mathieu characteristic values for even and odd functions.
Here is how I am trying to solve this:
First I define the variables $Y_n, w, c_n$ above
w[q_, k_] := q^2+k^2
Y[n_, q_,k_] := MathieuCharacteristicB[2 n + 2, w[q,k]] -
MathieuCharacteristicA[0, w[q,k]]
c[n_,q_,k_] := NIntegrate[MathieuS[MathieuCharacteristicB[2n + 2, w[q,k]], 1/w[q,k]^2, x] MathieuCPrime[MathieuCharacteristicA[0, w[q,k]], 1/w[q,k]^2, x], {x, 0, 2 Pi}]
Until this point everything seems to work fine. I can evaluate the above objects. But then I try to evaluate $b$ using
b[q_,m_,n_ ] := Integrate[Abs[c[n,q,k]]^2 BesselJ[m, q] DiracDelta[Y[n,q,k] - m], {k, -Infinity,Infinity}]
But this returns the error messages
NIntegrate::inumri: The integrand Indeterminate has evaluated to Overflow, Indeterminate, or Infinity for all sampling points in the region with boundaries {{0,6.8}}.
NIntegrate::nlim: x = Integrate`ImproperDump`zero is not a valid limit of integration.
Any help in overcoming these issues would be greatly appreciated.
DiracDelta[E_n - m*r}]
makes no sense. Please repair your code and format it for this forum. I suggest you concentrate on the integral containing the delta function. $\endgroup$