Solving a nasty partial differential equation [closed]

I have a differential equation that I would like to solve numerically in the region $z \in [0,L]$ and $t \in [0,t_{max}]$:

$$\partial_t S(z,t) = f(z)S(z,t) + \int_0^L \text{d} z'g(z,z') S(z',t),$$ where $f(z)$ and $g(z,z')$ are complex-valued functions.As an initial condition I woud like to consider something like $S(z,0) = \exp(-(z-L/5)^2)$.

So somehow I have to use Mathematicas NDSolve and NIntegrate in one procedure. If the integral would not be there, I would just NDSolve. In fact I tried something naive like

NDSolve[{D[S[z, t], t] == f[z] S[z, t] +
NIntegrate[g[z, zprime] S[zprime, t], {zprime, -\[Infinity], \[Infinity]}],
S[z, 0] == Exp[-(z - L/5)^2]}, S, {t, 0, tsteps}, {z, 0, L}]

but Mathematica does not like this at all. Any thoughts about how I should deal with this problem? Ultimately I would like to find an interpolating function for $S$, which I can then plot dynamically.

• to use numerical solving functions you need to define all the variables like alpha, beta and L
– k_v
Feb 3 '15 at 10:39
• @k_v I did this, I just did not display it here. Feb 3 '15 at 10:46
• Please provide those quantities, including f and g, in your question. Feb 3 '15 at 14:45
• Once refer to this link: mathematica.stackexchange.com/questions/200270/…. You equation is similar to that of in the link. You have mentioned directly the integral, where as in that question hilbert transform is mentioned. I think you can figure it out. So you just change the function and boundary values and I think you get the answer thereafter. Jun 26 '19 at 6:42