# Discretised numerical solution to a non-linear non-local equation

I understand that to do something even slightly non-trivial in Mathematica, I need to read some materials; the problem is that there are (too) many materials and only one particular problem, and I cannot find the proper source (otherwise, I need to catch small pieces from different sources). So, I apologise if my question is (too) trivial.

I am interested in the following DE: $$\frac{\partial}{\partial t} u(x,t) = f\biggl(\int_{-\infty}^\infty a(x-y)u(y,t)dy\biggr), \quad u(x,0)=u_0(x), \quad x\in\mathbb{R}, t\in[0,T].$$ Here $f:\mathbb{R}\to\mathbb{R}$ is a given (nonlinear) function, for which I know that the Euler scheme $$u_n(x,t)=u_0(x)+\int_0^t f\biggl(\int_{-\infty}^\infty a(x-y)u_{n-1}(y,s)dy\biggr)ds, \qquad n\in\mathbb{N},$$ with $u_0(x,t)\equiv u_0(x)$ converges to the solution.

I consider now a discretisation of $[0,T]$ and change $\mathbb{R}$ on $[-r,r]$ which will be discretised as well. Namely, for some space-step $h$ and time-step $\tau$, we set $$x_j=-r+j h, \quad j=0,\ldots,\Bigl[\frac{2r}{h}\Bigr]=:J, \qquad t_k=k\tau, \quad k=0,\ldots, \Bigl[\frac{T}{\tau}\Bigr]=:K$$ and define $$u_n(x_i,t_m)=u_0(x_i)+\tau \sum_{k=0}^m f\biggl(h\sum_{j=0}^J a(x_i-x_j)u_{n-1}(x_j,t_k)\biggr),$$ where $i=0,\ldots,I$, $m=0,\ldots,K$.

My question is very simple: how to realise the calculations for $u_n(x_i,t_m)$ in Mathematica. I tried several things and always got very-very slow computations. For me is the most natural to consider a function $u[n]$ whose values would be the the table of values $u_n(x_i,t_m)$ for varying $i$ and $m$, but there will be definitely some repeating calculations and I have fully lost.

Could you advise me something? WBR, Dmitri.

• I'd suggest providing the code for what you tried. At the very least, this will prevent anyone else from wasting their time trying the same approach, or otherwise there might be some means to improve what you have done already. Nov 5 '15 at 16:32
• You might find adaptable code in hits for a Google query on 'Mathematica integral equations' (with or without the quotes, both seem to give hits to StackExchange, StackOverflow, and elsewhere). Nov 5 '15 at 16:52
• Rather than do the discretization yourself, you might use NIntegrate. However, anything you do is likely to be very slow. In any case, as recommended by @OleksandrR, you really should provide more detail. Nov 6 '15 at 1:37
• I asked here for a part of the code: http://mathematica.stackexchange.com/questions/99500/how-to-increase-speed-of-iterations-with-nonlinear-functions Nov 15 '15 at 10:05