Message Boards Message Boards

[?] Algorithm used by the function NIntegrate over a specific region?

Posted 7 years ago

Hi, everyone

In the new version of Mathematica 11 we can use the function NIntegrate to numerically integrate over a specific region, for example in a sphere region created by the command Ball. How works the algorithm used by the Mathematica to do this integration? In older versions of the Mathematica we could integrate over a region, however without using the function region.

Thanks

POSTED BY: Anderson Almeida

For

NIntegrate[Sqrt[1 + x^2] + y^2 - z^4, {x, y, z} \[Element] Ball[]]

a change of variables is made that remaps it to an integral over the unit cube, which is integrated with the "MultiDimensionalRule":

NIntegrate[
 8 Sqrt[1 - x^2] Sqrt[1 - x^2 - (1 - x^2) y^2] (Sqrt[1 + x^2] + (1 - x^2) y^2 - (1 - x^2 - (1 - x^2) y^2)^2 z^4),
 {x, 0, 1}, {y, 0, 1}, {z, 0, 1}]

For a discretized mesh region, NIntegrate calls an FEM integrator that integrates over each mesh element using integration rules for each element type.

POSTED BY: Michael Rogers
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract