I have a function defined as
rpd[r_, OptionsPattern[]] :=
Module[
{A = OptionValue[A]},
NIntegrate[
q/(q^2 + r) E^(-q^2/2)*
Cos[3*q] BesselJ[1, A*q], {q, 0, \[Infinity]}]];
Options[rpd] = {A -> 1};
and plotting it for r \Elem {0,0.001}
I see it crosses zero for some value of r (call it r0) which depends on the parameter a<1, like this:
I'd like to plot a graph of r0(a), so I'm trying to produce a table
rpdA = Table[{a, FindRoot[rpd[r, A -> a], {r, 0.000001}]}, {a, 0.1, 1,
0.1}];
but I keep getting instead a lot of error messages, namely NIntegrate::ncvb
and NIntegrate::slwcon
. Could you help me sort this out?