# Solving 2-D partial integro-differential equation

• Mathematica

## Main Question or Discussion Point

While reproducing a research paper, I came across the following equation,
∂f/∂t−(H(f)(∂f/∂x)=0
where [H(f)] is hilbert transform of 'f.'
and f=f(x,t) and initial condition is f(x,0)=cos(x) and also has periodic boundary conditions given by
F{H{f(x′,t)}}=i⋅sgn(k)F{f(x,t)},
where F(f(x,t) is fourier transform of f(x,t).
and here ''t'' runs from 0 to 1.3 seconds

so I think we have to use iterations on basis of 't' while solving this equation.
Please help me in solving this integro differential equation(PDE). I am unable write a code for this(Matlab/Mathematica/Maple)
And suggestions are highly appreciated.
After solving the given equation, we have to get the figure-1 of the paper

Code I have written is:
Mathematica code:
L = Pi; tmax = 1.2; sys = {D[u[x, t], t] -
1/(Pi)*int[u[x, t], x, t]*D[u[x, t], x] == 0, u[0, t] == 1,
u[x, 0] == Cos[x]};
int[u_, x_?NumericQ, t_ /; t == 0] :=
NIntegrate[Cos[xp]/(x - xp), {xp, 0, x, x + 2 L},
Method -> {"InterpolationPointsSubdivision",
Method -> "PrincipalValue"}, MaxRecursion -> 20];
PrintTemporary@Dynamic@{foo, Clock[Infinity]};
InternalInheritedBlock[{MapThread}, {state} =
NDSolveProcessEquations[sys, u, {x, 0, 2 L}, {t, 0, tmax},
StepMonitor :> (foo = t)];
NDSolveIterate[state, {0, tmax}];
sol = NDSolveProcessSolutions[state]] // AbsoluteTiming
{Plot3D[u[x, t] /. sol, {x, 0, 2 Pi}, {t, 0., 1.}, Mesh -> None,
ColorFunction -> Hue, AxesLabel -> Automatic] // Quiet,
Plot[Evaluate[Table[u[x, t] /. sol, {t, 0., 1., .2}]], {x, -Pi,
Pi}] // Quiet}

Related MATLAB, Maple, Mathematica, LaTeX News on Phys.org
jedishrfu
Mentor
Hopefully someone here knows mathematica sufficiently to help.

In the meantime, I will look for some comparable examples using the same functions.

• semivermous
The question in first link was posted by myself but the solution is wrong.

jedishrfu
Mentor
Ahh okay. Well it may still hope others who read this thread.

One problem with this kind of question is the specialized knowledge needed to answer it. This would happen to me often in grad school before the internet. There was simply no place to turn to get help.