# Exploratory Study of a Green Function Based Solver for Nonlinear Partial Differential Equations
## 3 Numerical Implementation  
Throughout this section we will explore how to effectively implement the aforementioned integral scheme, hence solving numerically the PDE. We will start from its most basic shape, i.e., an equation defined in an infinite, one dimensional domain without nonlinear terms, then we will increase progressively the difficulty of the problem. Going through the previous section, we can identify the levels of complexity that will appear when obtaining the solution, being the simplest one a constant transport coefficient PDE, that might have an analytic solution available. Then, non-constant transport coefficients will be introduced, analyzing how they affect the Green function and the integral scheme already implemented. The last milestone will be the addition of the two time-integral terms, c.f., the nonlinear term and the one corresponding to the boundary conditions, looking into the possible definitions of the _extended_ initial conditions. Thus, the time evolution of the unknown function \(u\) with these simplifications can be reduced to solving the following integral,  
\[u(x,t)=\int_{-\infty}^{+\infty}\mathcal{G}_{o_{2}}\big{(}x,t\,|\,x^{\prime}, t^{\prime}\big{)}u\big{(}x^{\prime},t^{\prime}\big{)}dx^{\prime}. \tag{32}\]  
We recall the terminology introduced in the previous section: \(\mathcal{G}_{o_{2}}\) is the Green function of the operator whose highest spatial derivative is of order \(o_{2}\), and it takes information from the initial \(x^{\prime},t^{\prime}\) state and propagates it towards the final \(x,t\) state. Figure 2: Second-order, Neumann semi-open domain Green function, explained using the method of images. The numerical implementation of the Green function integral scheme requires a discretization of the variables that define its domain of interest. For our study, we have time and either space or frequency. As a result, the initial condition will be reconstructed from its discrete spatial values saved in arrays and its time evolving solution will consist on its propagation through the integral scheme (32). We will call the time step, i.e., the temporal difference between the initial and the final states, \(\tau=t-t^{\prime}\) and, as long as the short-time approximation is satisfied we can assume \(\tau\ll 1\) (see Section 2.2). Regarding the spatial or frequency discretization, its definition, the subsequent reconstruction of the initial condition and the time-evolving solution will define the numerical method together with the possible error associated with this operation. For this initial exploratory work, we will only define a discrete numerical spatial grid of \(2N+1\) points with the positions at which the initial condition and its subsequent time evolution will be represented. Each of the positions of this grid will have a one-to-one correspondence with its numerical coefficient, that will be saved in its corresponding array with \(2N+1\) values. In particular, we define the following spatial discretization:  
\[\{x\} =x_{i},\;\;i\in[-N,N],\;\;x_{i}\in[x_{-N},x_{N}]\] \[\{t\} =t_{n},\;\;n\in[0,T],\;\;t_{n}\in\left[t_{0},t_{f}\right] \tag{33}\] \[\{u\} =u_{i}^{n}=u(x_{i},t_{n}).\]  
where \(N\) and \(T\) are the number of points of the spatial and temporal grids, respectively, and we have already selected \(\tau\) as the timestep. Furthermore, \(i\) and \(n\) are indexes to go through the different discrete values in space and time, respectively. Both grid and time steps in principle do not need to be homogeneous through the discretization, yet for the short-time approximation to hold, the values of \(\tau_{n}\) are required to be small. How small will be determined by the final time-evolving solution. Although in the first, most simplified starting point our domain is defined as open, we have a discrete, finite, spatial grid as we assume \(N\) is a finite integer. We can already foresee that this issue will become a source of error in the computation of the solution.