5 added 200 characters in body edited Nov 5 '14 at 20:25 user29165 31522 silver badges1010 bronze badges I don't have much experience of numerical methods for multidimensional integrals. Currently, the particular function I want to integrate is: $$f(x,y,z,p_x,p_y,p_z) = \frac{p_x^2(2 p_x x(p_y y + 4 p_z z)-2 p_x^2(y^2+4 z^2)+x^2 \sqrt{x^2+y^2+4 z^2})}{2 (x^2+y^2+4 z^2)^{\frac{3}{2}}}$$ I want to integrate $$f(x,y,z,p_x,p_y,p_z)$$ over the entire real plane: $$\int_{-\infty}^{\infty}dx\int_{-\infty}^{\infty}dy\int_{-\infty}^{\infty}dz\int_{-\infty}^{\infty}dp_x\int_{-\infty}^{\infty}dp_y\int_{-\infty}^{\infty}dp_z f(x,y,z,p_x,p_y,p_z)$$ NIntegrate[ (px^2 (2 px x (py y + 4 pz z) - 2 px^2 (y^2 + 4 z^2) + x^2 Sqrt[x^2 + y^2 + 4 z^2]))/(2 (x^2 + y^2 + 4 z^2)^(3/2)), {x, -∞, ∞}, {y, -∞, ∞}, {z, -∞, ∞}, {px, -∞, ∞}, {py, -∞, ∞}, {pz, -∞, ∞} ]  The above code couldn't evaluate a value and returns: 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. Is there some general strategy to look at the function and see which numerical method to use? EditEdit If I break down the function as follows: $$f(x,y,z,p_x,p_y,p_z) = \frac{2 p_x^3 x(p_y y + 4 p_z z)}{2 (x^2+y^2+4 z^2)^{\frac{3}{2}}} - \frac{p_x^4 (y^2 + 4 z^2)}{(x^2+y^2+4 z^2)^{\frac{3}{2}}} + \frac{x^2 p_x^2}{2(x^2+y^2+4 z^2)}$$ The first term when integrated will be 0 because it is an odd function in $$p_x$$ (NIntegrate also return the same result) $$\int_{-\infty}^{\infty} d p_x \frac{2 p_x^3 x(p_y y + 4 p_z z)}{2 (x^2+y^2+4 z^2)^{\frac{3}{2}}} = 0$$ Naively, I would expect the second and third term when integrated to give $$-\infty$$ and $$\infty$$ respectively. Is it possible for those 2 terms to cancel to 0 or something finite? I don't have much experience of numerical methods for multidimensional integrals. Currently, the particular function I want to integrate is: $$f(x,y,z,p_x,p_y,p_z) = \frac{p_x^2(2 p_x x(p_y y + 4 p_z z)-2 p_x^2(y^2+4 z^2)+x^2 \sqrt{x^2+y^2+4 z^2})}{2 (x^2+y^2+4 z^2)^{\frac{3}{2}}}$$ I want to integrate $$f(x,y,z,p_x,p_y,p_z)$$ over the entire real plane: $$\int_{-\infty}^{\infty}dx\int_{-\infty}^{\infty}dy\int_{-\infty}^{\infty}dz\int_{-\infty}^{\infty}dp_x\int_{-\infty}^{\infty}dp_y\int_{-\infty}^{\infty}dp_z f(x,y,z,p_x,p_y,p_z)$$ NIntegrate[ (px^2 (2 px x (py y + 4 pz z) - 2 px^2 (y^2 + 4 z^2) + x^2 Sqrt[x^2 + y^2 + 4 z^2]))/(2 (x^2 + y^2 + 4 z^2)^(3/2)), {x, -∞, ∞}, {y, -∞, ∞}, {z, -∞, ∞}, {px, -∞, ∞}, {py, -∞, ∞}, {pz, -∞, ∞} ]  The above code couldn't evaluate a value and returns: 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. Is there some general strategy to look at the function and see which numerical method to use? Edit If I break down the function as follows: $$f(x,y,z,p_x,p_y,p_z) = \frac{2 p_x^3 x(p_y y + 4 p_z z)}{2 (x^2+y^2+4 z^2)^{\frac{3}{2}}} - \frac{p_x^4 (y^2 + 4 z^2)}{(x^2+y^2+4 z^2)^{\frac{3}{2}}} + \frac{x^2 p_x^2}{2(x^2+y^2+4 z^2)}$$ The first term when integrated will be 0 because it is an odd function in $$p_x$$ (NIntegrate also return the same result) $$\int_{-\infty}^{\infty} d p_x \frac{2 p_x^3 x(p_y y + 4 p_z z)}{2 (x^2+y^2+4 z^2)^{\frac{3}{2}}} = 0$$ I don't have much experience of numerical methods for multidimensional integrals. Currently, the particular function I want to integrate is: $$f(x,y,z,p_x,p_y,p_z) = \frac{p_x^2(2 p_x x(p_y y + 4 p_z z)-2 p_x^2(y^2+4 z^2)+x^2 \sqrt{x^2+y^2+4 z^2})}{2 (x^2+y^2+4 z^2)^{\frac{3}{2}}}$$ I want to integrate $$f(x,y,z,p_x,p_y,p_z)$$ over the entire real plane: $$\int_{-\infty}^{\infty}dx\int_{-\infty}^{\infty}dy\int_{-\infty}^{\infty}dz\int_{-\infty}^{\infty}dp_x\int_{-\infty}^{\infty}dp_y\int_{-\infty}^{\infty}dp_z f(x,y,z,p_x,p_y,p_z)$$ NIntegrate[ (px^2 (2 px x (py y + 4 pz z) - 2 px^2 (y^2 + 4 z^2) + x^2 Sqrt[x^2 + y^2 + 4 z^2]))/(2 (x^2 + y^2 + 4 z^2)^(3/2)), {x, -∞, ∞}, {y, -∞, ∞}, {z, -∞, ∞}, {px, -∞, ∞}, {py, -∞, ∞}, {pz, -∞, ∞} ]  The above code couldn't evaluate a value and returns: 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. Is there some general strategy to look at the function and see which numerical method to use? Edit If I break down the function as follows: $$f(x,y,z,p_x,p_y,p_z) = \frac{2 p_x^3 x(p_y y + 4 p_z z)}{2 (x^2+y^2+4 z^2)^{\frac{3}{2}}} - \frac{p_x^4 (y^2 + 4 z^2)}{(x^2+y^2+4 z^2)^{\frac{3}{2}}} + \frac{x^2 p_x^2}{2(x^2+y^2+4 z^2)}$$ The first term when integrated will be 0 because it is an odd function in $$p_x$$ (NIntegrate also return the same result) $$\int_{-\infty}^{\infty} d p_x \frac{2 p_x^3 x(p_y y + 4 p_z z)}{2 (x^2+y^2+4 z^2)^{\frac{3}{2}}} = 0$$ Naively, I would expect the second and third term when integrated to give $$-\infty$$ and $$\infty$$ respectively. Is it possible for those 2 terms to cancel to 0 or something finite? 4 added 200 characters in body edited Nov 5 '14 at 20:16 user29165 31522 silver badges1010 bronze badges I don't have much experience of numerical methods for multidimensional integrals. Currently, the particular function I want to integrate is: $$f(x,y,z,p_x,p_y,p_z) = \frac{p_x^2(2 p_x x(p_y y + 4 p_z z)-2 p_x^2(y^2+4 z^2)+x^2 \sqrt{x^2+y^2+4 z^2})}{2 (x^2+y^2+4 z^2)^{\frac{3}{2}}}$$ I want to integrate $$f(x,y,z,p_x,p_y,p_z)$$ over the entire real plane.: $$\int_{-\infty}^{\infty}dx\int_{-\infty}^{\infty}dy\int_{-\infty}^{\infty}dz\int_{-\infty}^{\infty}dp_x\int_{-\infty}^{\infty}dp_y\int_{-\infty}^{\infty}dp_z f(x,y,z,p_x,p_y,p_z)$$ NIntegrate[ (px^2 (2 px x (py y + 4 pz z) - 2 px^2 (y^2 + 4 z^2) + x^2 Sqrt[x^2 + y^2 + 4 z^2]))/(2 (x^2 + y^2 + 4 z^2)^(3/2)), {x, -∞, ∞}, {y, -∞, ∞}, {z, -∞, ∞}, {px, -∞, ∞}, {py, -∞, ∞}, {pz, -∞, ∞} ]  The above code couldn't evaluate a value and returns: 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. Is there some general strategy to look at the function and see which numerical method to use? Edit If I break down the function as follows: $$f(x,y,z,p_x,p_y,p_z) = \frac{2 p_x^3 x(p_y y + 4 p_z z)}{2 (x^2+y^2+4 z^2)^{\frac{3}{2}}} - \frac{p_x^4 (y^2 + 4 z^2)}{(x^2+y^2+4 z^2)^{\frac{3}{2}}} + \frac{x^2 p_x^2}{2(x^2+y^2+4 z^2)}$$ The first term when integrated will be 0 because it is an odd function in $$p_x$$ (NIntegrate also return the same result) $$\int_{-\infty}^{\infty} d p_x \frac{2 p_x^3 x(p_y y + 4 p_z z)}{2 (x^2+y^2+4 z^2)^{\frac{3}{2}}} = 0$$ I don't have much experience of numerical methods for multidimensional integrals. Currently, the particular function I want to integrate is: $$f(x,y,z,p_x,p_y,p_z) = \frac{p_x^2(2 p_x x(p_y y + 4 p_z z)-2 p_x^2(y^2+4 z^2)+x^2 \sqrt{x^2+y^2+4 z^2})}{2 (x^2+y^2+4 z^2)^{\frac{3}{2}}}$$ I want to integrate $$f(x,y,z,p_x,p_y,p_z)$$ over the entire real plane. NIntegrate[ (px^2 (2 px x (py y + 4 pz z) - 2 px^2 (y^2 + 4 z^2) + x^2 Sqrt[x^2 + y^2 + 4 z^2]))/(2 (x^2 + y^2 + 4 z^2)^(3/2)), {x, -∞, ∞}, {y, -∞, ∞}, {z, -∞, ∞}, {px, -∞, ∞}, {py, -∞, ∞}, {pz, -∞, ∞} ]  The above code couldn't evaluate a value and returns: 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. Is there some general strategy to look at the function and see which numerical method to use? Edit If I break down the function as follows: $$f(x,y,z,p_x,p_y,p_z) = \frac{2 p_x^3 x(p_y y + 4 p_z z)}{2 (x^2+y^2+4 z^2)^{\frac{3}{2}}} - \frac{p_x^4 (y^2 + 4 z^2)}{(x^2+y^2+4 z^2)^{\frac{3}{2}}} + \frac{x^2 p_x^2}{2(x^2+y^2+4 z^2)}$$ I don't have much experience of numerical methods for multidimensional integrals. Currently, the particular function I want to integrate is: $$f(x,y,z,p_x,p_y,p_z) = \frac{p_x^2(2 p_x x(p_y y + 4 p_z z)-2 p_x^2(y^2+4 z^2)+x^2 \sqrt{x^2+y^2+4 z^2})}{2 (x^2+y^2+4 z^2)^{\frac{3}{2}}}$$ I want to integrate $$f(x,y,z,p_x,p_y,p_z)$$ over the entire real plane: $$\int_{-\infty}^{\infty}dx\int_{-\infty}^{\infty}dy\int_{-\infty}^{\infty}dz\int_{-\infty}^{\infty}dp_x\int_{-\infty}^{\infty}dp_y\int_{-\infty}^{\infty}dp_z f(x,y,z,p_x,p_y,p_z)$$ NIntegrate[ (px^2 (2 px x (py y + 4 pz z) - 2 px^2 (y^2 + 4 z^2) + x^2 Sqrt[x^2 + y^2 + 4 z^2]))/(2 (x^2 + y^2 + 4 z^2)^(3/2)), {x, -∞, ∞}, {y, -∞, ∞}, {z, -∞, ∞}, {px, -∞, ∞}, {py, -∞, ∞}, {pz, -∞, ∞} ]  The above code couldn't evaluate a value and returns: 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. Is there some general strategy to look at the function and see which numerical method to use? Edit If I break down the function as follows: $$f(x,y,z,p_x,p_y,p_z) = \frac{2 p_x^3 x(p_y y + 4 p_z z)}{2 (x^2+y^2+4 z^2)^{\frac{3}{2}}} - \frac{p_x^4 (y^2 + 4 z^2)}{(x^2+y^2+4 z^2)^{\frac{3}{2}}} + \frac{x^2 p_x^2}{2(x^2+y^2+4 z^2)}$$ The first term when integrated will be 0 because it is an odd function in $$p_x$$ (NIntegrate also return the same result) $$\int_{-\infty}^{\infty} d p_x \frac{2 p_x^3 x(p_y y + 4 p_z z)}{2 (x^2+y^2+4 z^2)^{\frac{3}{2}}} = 0$$ 3 added 200 characters in body edited Nov 5 '14 at 20:06 user29165 31522 silver badges1010 bronze badges I don't have much experience of numerical methods for multidimensional integrals. Currently, the particular function I want to integrate is: $$f(x,y,z,p_x,p_y,p_z) = \frac{p_x^2(2 p_x x(p_y y + 4 p_z z)-2 p_x^2(y^2+4 z^2)+x^2 \sqrt{x^2+y^2+4 z^2})}{2 (x^2+y^2+4 z^2)^{\frac{3}{2}}}$$ I want to integrate $$f(x,y,z,p_x,p_y,p_z)$$ over the entire real plane. NIntegrate[ (px^2 (2 px x (py y + 4 pz z) - 2 px^2 (y^2 + 4 z^2) + x^2 Sqrt[x^2 + y^2 + 4 z^2]))/(2 (x^2 + y^2 + 4 z^2)^(3/2)), {x, -∞, ∞}, {y, -∞, ∞}, {z, -∞, ∞}, {px, -∞, ∞}, {py, -∞, ∞}, {pz, -∞, ∞} ]  The above code couldn't evaluate a value and returns: 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. Is there some general strategy to look at the function and see which numerical method to use? Edit If I break down the function as follows: $$f(x,y,z,p_x,p_y,p_z) = \frac{2 p_x^3 x(p_y y + 4 p_z z)}{2 (x^2+y^2+4 z^2)^{\frac{3}{2}}} - \frac{p_x^4 (y^2 + 4 z^2)}{(x^2+y^2+4 z^2)^{\frac{3}{2}}} + \frac{x^2 p_x^2}{2(x^2+y^2+4 z^2)}$$ I don't have much experience of numerical methods for multidimensional integrals. Currently, the particular function I want to integrate is: $$f(x,y,z,p_x,p_y,p_z) = \frac{p_x^2(2 p_x x(p_y y + 4 p_z z)-2 p_x^2(y^2+4 z^2)+x^2 \sqrt{x^2+y^2+4 z^2})}{2 (x^2+y^2+4 z^2)^{\frac{3}{2}}}$$ I want to integrate $$f(x,y,z,p_x,p_y,p_z)$$ over the entire real plane. NIntegrate[ (px^2 (2 px x (py y + 4 pz z) - 2 px^2 (y^2 + 4 z^2) + x^2 Sqrt[x^2 + y^2 + 4 z^2]))/(2 (x^2 + y^2 + 4 z^2)^(3/2)), {x, -∞, ∞}, {y, -∞, ∞}, {z, -∞, ∞}, {px, -∞, ∞}, {py, -∞, ∞}, {pz, -∞, ∞} ]  The above code couldn't evaluate a value and returns: 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. Is there some general strategy to look at the function and see which numerical method to use? I don't have much experience of numerical methods for multidimensional integrals. Currently, the particular function I want to integrate is: $$f(x,y,z,p_x,p_y,p_z) = \frac{p_x^2(2 p_x x(p_y y + 4 p_z z)-2 p_x^2(y^2+4 z^2)+x^2 \sqrt{x^2+y^2+4 z^2})}{2 (x^2+y^2+4 z^2)^{\frac{3}{2}}}$$ I want to integrate $$f(x,y,z,p_x,p_y,p_z)$$ over the entire real plane. NIntegrate[ (px^2 (2 px x (py y + 4 pz z) - 2 px^2 (y^2 + 4 z^2) + x^2 Sqrt[x^2 + y^2 + 4 z^2]))/(2 (x^2 + y^2 + 4 z^2)^(3/2)), {x, -∞, ∞}, {y, -∞, ∞}, {z, -∞, ∞}, {px, -∞, ∞}, {py, -∞, ∞}, {pz, -∞, ∞} ]  The above code couldn't evaluate a value and returns: 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. Is there some general strategy to look at the function and see which numerical method to use? Edit If I break down the function as follows: $$f(x,y,z,p_x,p_y,p_z) = \frac{2 p_x^3 x(p_y y + 4 p_z z)}{2 (x^2+y^2+4 z^2)^{\frac{3}{2}}} - \frac{p_x^4 (y^2 + 4 z^2)}{(x^2+y^2+4 z^2)^{\frac{3}{2}}} + \frac{x^2 p_x^2}{2(x^2+y^2+4 z^2)}$$ 2 Fixed formatting and Infinity edited Nov 4 '14 at 15:32 Öskå 7,74533 gold badges2525 silver badges4747 bronze badges 1 asked Nov 4 '14 at 15:20 user29165 31522 silver badges1010 bronze badges