I try to solve an integro-differential equation with a convolution term using this code. Here i used a periodic condition.
L=10; tmax = 2;
NDSolve[{D[u[x, t], t] + u[x, t]*D[u[x, t], x] + D[u[x, t], {x, 2}] +
D[u[x, t], {x, 4}] + 1/(2 L)*D[NIntegrate[u[xp, t]*Cot[\[Pi](x - xp)/(2*L)], {xp, -L, L}(*,PrincipalValue\[Rule]True*)], {x, 3}] == 0, u[-L, t] == u[L, t],
u[x, 0] == Cos[\[Pi]/L*x]}, u, {x, -L, L}, {t, 0, tmax}]
which gives me
NIntegrate::inumr: "The integrand ... has evaluated to non-numerical values for all sampling points"
The warning is understandable because the function u[xp, t]
is still unknow when NIntegrate
is evaluated. I also tried Method -> "MethodOfLines"
, but it still doesn't work.
My problem may closely relate to this, which is linear equation and more like a wave equation in the sense of $u_{tt}$. But my pde is nonlinear and has 1st-derivative in $t$. So I post my problem here for a more general solution. Thank you for any suggestion.
Update:
As indicated by bbgodfrey in a comment: it is necessary to convert the convolution to the same range as used in
NDSolve
. For a spatial periodic solution, I can change the convolution with integral limits of infinite to aNIntegrate
over a finite interval.With
Convolve
one can usePrincipalValue -> True
for a principal value integral, however, usingNIntegrate
how could we calculate the Principal Value (commented in the code)?