wolfram mathematica, numerical integration, precision of a function/expression

352 Views Asked by At

I want to obtain the best numerical approximation (up to 10 decimal place would be ok for me) to an integral:

$$ \int^{\infty}_{0} f(r)r^2dr $$

I am using the function $f(r)$, which is related to the function

$$g(r)=-\frac{\sqrt[3]{3} \sqrt[3]{e^{-2 r}}}{\pi ^{2/3}}-\frac{\sqrt[3]{2 \pi }}{5 \sqrt[3]{e^{-2 r}} \left(\frac{3 \sqrt[3]{\pi } \sinh ^{-1}\left(\frac{2 \sqrt[3]{2 \pi }} {\sqrt[3]{e^{-2 r}}}\right)}{5\ 2^{2/3} \sqrt[3]{e^{-2 r}}}+1\right)}$$

as

$$ f(r)=-\frac{1}{4\pi}\nabla^2_{r,\theta,\phi} g(r) $$

Obviously, explicit integration is impossible. The product $f(r)r^2$ is well-behaved and integrable for sure. The function f(r) decays faster than $\frac{1}{r^2}$.

When I try to increase WorkingPrecision, the program says the expression I am integrating itself is not specified so precisely. How can I overcome this? Any tips/ hints?

I am asking about general strategy of how to obtain the most precise value of this integral

NIntegrate[f(r)* 4* \[Pi] r^2, {r, 0, y}, WorkingPrecision -> x] , where y and x are some numbers.

P.S I've been using Mathematica for only two days.

1

There are 1 best solutions below

0
On

You are probably specifying some parameter to your integrand with a decimal point. It would be easier to tell if you specified the command you were trying. Instead of giving something like 1.3, try 1.3`30 to specify precision of 30 digits. That's the backtick, conjugate to ~ on your keyboard.