# NIntegrate::femrdim: FiniteElement method can only be applied to regions of embedding dimension 1, 2, or 3

As in the title: I'm trying to Nintegrate over an ImplicitRegion, this error appears. No idea what it means. Nothing in the docs. It appears on this line:

NIntegrate[ΔPtt[r3, r1, r2,  0, ϕ1, 0, l, 1, 1] ,
{r1, r2, r3, ϕ1} ∈ IntegrationRegionReduced, PrecisionGoal -> 2, MaxRecursion -> 20]


where ΔPtt[r3, r1, r2, 0, ϕ1, 0, l, 1, 1] is a normal (although very long) function.

• The message is rather descriptive: you are trying to integrate over a 4-manifold, while the method only works up to dimension 3. I guess your real question is how to overcome this limitation? May 29, 2019 at 17:04
• I don't understand where is the problem, actually. NIntegrate? or the function? The region? May 29, 2019 at 18:49
• I write that because in another notebook I use Nintegrate over a region with 6 dimensions and it seems not to be bothering. So I don't understand what's wrong here.That's what I am asking. May 29, 2019 at 18:57
• Unless you post the complete code, answers are going to be speculation. May 30, 2019 at 11:09

As noted in the comments, the message means that NIntegrate can only integrate over regions with have a RegionEmbeddingDimension of 1, 2 or 3.

RegionEmbeddingDimension[IntegrationRegionReduced]


probably returns 4. Unfortunately, you do not provide the region, so there is no way anyone can suggest ways around that.

NIntegrate can very well integrate over a 4 dim ImplicitRegion, like in

NIntegrate[1, Element[{x, y, z, w}, ImplicitRegion[
{x <= y || z >= w}, {{x, 0, 1}, {y, 0, 1}, {z, 0, 1}, {w, 0, 1}}]]]


However, in some cases the implicit region is so complicated that the finite element method needs to be used to discretize the region and that method only works in 1,2 and 3D.

As a side question, how should the message be formulated that you had understood it?

• that cannot be what the message means, as I said in the comments. In another notebook I used NIntegrate with a region with 7 dimensions, so this cannot be it. Also, nowehere is stated that NIntegrate has this limitation. As it shouldn't have. May 30, 2019 at 10:03
• I am the developer of that functionality in NIntegrate and that is what the message means. Now, since you did not share the region or that other region I can only speculate. NIntegrate can very well integrate over a 4 dim ImplicitRegion, like in NIntegrate[1, Element[{x, y, z, w}, ImplicitRegion[{x <= y || z >= w}, {{x, 0, 1}, {y, 0, 1}, {z, 0, 1}, {w, 0, 1}}]]]. However, in some cases the implicit region is so complicated that the finite element method needs to be used to discretize the region and that method only works in 1,2 and 3D. Unless you post the region.... May 30, 2019 at 11:03
• @LowFieldTheory, ... not much can be done for you. May 30, 2019 at 11:04
• You should write this in the documentation, I shouldn't ask for that here. "However, in some cases the implicit region is so complicated that the finite element method needs to be used to discretize the region and that method only works in 1,2 and 3D." how is someone supposed to know? Anyway, I already solved by simplifying a bit the region. If you write this explanation in the answer more clearly I can accept it. May 30, 2019 at 12:34
• @LowFieldTheory, updated the answer. The main question is how should the message have been worded that you would have understood the content. What I could do is add an example to the message reference. The main reference page for NIntegrate is out of my control. If you feel strongly about it, I suggest you send the example to [email protected]. But again, the main issue is that the message was misunderstood and that is something I can fix if you tell me what would have helped you. May 30, 2019 at 12:43