# NDSolve with Finite Element ignoring terms in partial differential equations?

Solving a 1D dispersive wave equation with NDSolve and the finite element method seems to give completely wrong results. Consider the 1D PDE below

eq = D[f[t, x], {t, 2}] - D[f[t, x], {x, 2}] - D[f[t, x], {t, 2},{x, 2}]==0


with an initial shape for f as shown below and zero speed:

shape = Cos[32*Pi*(-0.5 + x)]/E^(120.*(x-0.5)^2);
ics ={f[0, x] == shape, Derivative[1,0][f][0,x]==0};
Plot[shape,{x,0,1},Frame->True, PlotLabel->{"x","f[0,x]","initial shape"]}]


Solving the problem for x in the {0,1} region with NDSolveValue (and implicit zero Neumann values, which are anyway irrelevant at short times when the wave has not reached the region boudaries yet) renders a solution without error:

sol=NDSolveValue[{eq, ics} // Flatten, f, {t, 0, 0.25}, {x} \[Element]region,
Method -> {"FiniteElement", "MeshOptions" -> {"MaxCellMeasure" -> 0.005}}];


This solution plotted below is obviously wrong since it displays no dispersion, despite the D[f[t, x], {t, 2},{x, 2}] term in eq!!!

More precisely, plotting the three terms of the equation a t = 0 for instance shows that the last (and giant) term has been simply ignored without notice:

The equation which has been solved is actually

eq2 = D[f[t, x], {t, 2}] - D[f[t, x], {x, 2}]==0


This is strange since according to the documentation pasted below, the original equation eq fullfills all the requested conditions to be solvable (Transcient PDE in 1D, single PDE with derivatives that are second order in space and second order in time, linear with constant coeff, zero Neumann values):

• I am a bit surprised that you are not presented an error message stating that Mathemtica's FEM capabilities do not support fouth-order PDE. To my knowledge, they do not and D[f[t, x], {t, 2},{x, 2}] is a fourth order term. Mar 20 '19 at 12:58
• Thanks Henrik. 1) Where did you find this information in the doc. 2) And what does "...derivatives up to second order in space and arbitrary order in time" mean, in the section of the documentation that I have copy-pasted above ? Mar 20 '19 at 13:43
• Good point! Okay, I am not sure whether your use case is supposed to be covered or not. Let's ask @user21; as developer, he will definitely be able to tell. Mar 20 '19 at 13:47
• @HenrikSchumacher It's solved as a transient PDE (see this tutorial). One can see some evidence with Head /@ sol["Coordinates"] (I used region = Line[{{0}, {1}}]). Mar 21 '19 at 0:01
• @HenrikSchumacher, yes the documentation is not quite clear on this: I have changed the sentence to "Transcient PDE in 1D, single PDE with derivatives that are second order in space OR second order in time.." That should be better. I'd need to look at why this does not give a warning but that is nothing I can fix for 12.0 Mar 21 '19 at 6:07