I want to integrate a function (spherical coordinates):
$$\int _0^{2 \pi }\int _0^{\pi }\frac{r^2 \sin (\theta ) e^{-\lambda \sqrt{\rho ^2+r^2-2 \rho r \cos (\theta )}-2 r}}{\pi \epsilon \sqrt{\rho ^2+r^2-2 \rho r \cos (\theta )}}d\theta d\rho , ϵ=78.36, λ=0.548881$$
ϵ=78.36
λ=0.548881
funcin =
1/(ϵ*π)*Exp[-(2*r + λ*Sqrt[r^2 + ρ^2 -
2*r*ρ*Cos[θ]])]*r^2*Sin[θ]*1/Sqrt[ρ^2 + r^2 - 2*r*ρ*Cos[θ]]
intfuncing = Integrate[funcin, {r, 0, Infinity}, {θ, 0, π}, {ϕ, 0,2 π}]
If I use analytic calculation (Integrate
), an integral over r is left, which must be numerically evaluated, e.g., by using N[intfuncing]
for specific ρ. For example I can write:
Do[ρ = 0.1 + (i - 1)*0.05; int[[i]] = N[intfuncing], {i, 60}]
to calculate the integral at 60 points. But I get an error by that:
NIntegrate::slwcon: Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration is 0, highly oscillatory integrand, or WorkingPrecision too small.
If I try to evaluate the integral numerically with NIntegrate
, I get:
the integral ... evaluated to non-numerical values for all sampling points in the region with boundaries {{∞, 0.}, {0, 3.14159}, {0, 6.28319}}.
Does anyone have an idea how to solve this problem?
N[Integrate[..]]
re tries the analytic approach before evaluating numerically (x60...). Anybondy know the incantation to extract the arguments from anIntegrate
expression without evaluating it? (besides cut-paste! ) $\endgroup$