# Why should the spatial derivative order of the ODE *not* exceed two?

Following this question I came across this strange behaviour.

Let me define a 1 D interval implicitely

a = 1; b = 2;
Ω = ImplicitRegion[a <= r <= b, {r}]


and let me try to solve PDEs on this interval.

This works as expected (second order ODE)

w1 = NDSolveValue[{w''[r] == 1/2,
DirichletCondition[w[r] == 0, r == a],
DirichletCondition[w[r] == 0, r == b]}, w, {r, a, b}]

Plot[w1[x], x ∈ Ω]


and so does this

w2 = NDSolveValue[{w''[r] == 1/2,
DirichletCondition[w[r] == 0, r == a],
DirichletCondition[w[r] == 0, r == b]}, w, r ∈ Ω]


This works again as expected (this time 4th order ODE)

w1 = NDSolveValue[{w''''[r] == 1/2,
DirichletCondition[w[r] == 0, r == a],
DirichletCondition[w'[r] == 0, r == a],
DirichletCondition[w[r] == 0, r == b],
DirichletCondition[w'[r] == 0, r == b]}, w, {r, a, b}]

Plot[w1[x], x ∈ Ω]


## Question

But why does this fail?

w2 = NDSolveValue[{w''''[r] == 1/2,
DirichletCondition[w[r] == 0, r == a],
DirichletCondition[w'[r] == 0, r == a],
DirichletCondition[w[r] == 0, r == b],
DirichletCondition[w'[r] == 0, r == b]}, w, r ∈ Ω]


with the error message The spatial derivative order of the PDE may not exceed two. >>

The only difference being using r ∈ Ω as a domain instead of {r,a,b}.

• I think it may be a limitation of the FEM code. – Michael E2 Aug 8 '15 at 17:18
• I was just about to add: Because in the non-working code, you use regions. -- That is to say, the use of regions causes NDSolve to go to FEM, without looking at whether the region is amenable to other methods. – Michael E2 Aug 8 '15 at 17:20
• @MichaelE2 it is a pity though is it not? – chris Aug 8 '15 at 17:22
• It's probably irrelevant, but conceptually spatial regions have no innate direction but time does. That fact that Ω could be viewed as having a direction and therefore integrated over as if it were time is a coincidence of it being 1D and the necessity of describing it in terms of a coordinate system. Still, you'd think it could say "FEM failed; integrating as an ODE with temporal variable r." – Michael E2 Aug 8 '15 at 18:35
• It's also annoying that explicitly setting the Method to something other than "FiniteElement" makes no difference. You do not even get a warning that it is being ignored. – Michael E2 Aug 8 '15 at 18:36

Right now (V11.3) NDSolve uses FEM for elliptic PDEs and that code does up to 2nd order spatial derivatives. The fact that this PDE can be viewed as a time dependent ODE is a coincidence in 1D as pointed out by @MichaelE2 and time dependent ODE are specified via explicit bounds. Another, harder, issue is that it is not trivial to write a general test to see if an ImplicitRegion is "Simple". Also, this test needs time to execute. This needs to be run for every ImplicitRegionalso ParametricRegions basically everything that is RegionQ and the number of cases where it could help is, I feel, very limited compared to the time it is going to take. Having to specify explicit boundaries is not that bad I think. What possibly could work is to add an indication to the message that this could be solved as a transient ODE or have an example in the >> link. I'll make that a suggestion.