# Exploratory Study of a Green Function Based Solver for Nonlinear Partial Differential Equations
## 3 Numerical Implementation
### The Numerical Transposition of the Integral Scheme
#### 3.2.3 Non-Homogeneous Terms
Yet, any multi-step technique can be applied too at the level of the general expression of the Green function, allowing to combine its error and step definition with the nonlinear integrals with a non-negligible level of complexity. This study ties again with the advances on exponential integrators and time-propagating solutions, and its in-depth analysis is left as a future line of research. To show the performance of the midpoint adapted scheme and the wide range of possibilities for nonlinear terms, we present two test-cases: a nonlinear advection-diffusion equation where the norm must be conserved, and an equation with a soliton-like solution. The first test case is the diffusive or viscid Burgers Equation [49], defined under a ring domain so there is no injection or destruction of information from the boundaries. Defining the PDE by means of its information current [69], \(J(x,t)=1/2u-u_{x}\), we can show that its norm, \(n(t)\) is conserved,  
\[ \begin{split} u_{t}&=-uu_{x}+\
u u_{xx}=-J_{x},\\ n(t)&=\int_{-1}^{1}u\big{(}x^{\prime},t\big{)}dx^{ \prime},\;\;n_{t}=\int_{-1}^{1}u_{t}\big{(}x^{\prime},t\big{)}dx^{\prime}=J_{ 1}(t)-J_{-1}(t)=0\longrightarrow n=\text{cte}.\end{split}  \tag{59}\]  
Therefore, we impose as an initial condition a normalized Gaussian that will evolve under the usual Burgers _shock_-like tendency: the higher values of the unknown function will advect as much as the value of the unknown function while the almost zero regions will remain still, grouping them into a front. This case is specially delicate as we are using a purely diffusive Green function, implementing the nonlinear advection through the \(\Phi\) term. There are two main advantages of using such Green function: there is no correction terms as the viscosity, i.e., the diffusive transport coefficient, is constant, and we can introduce any extra forcing terms into the problem without modifying the weights of the numerical scheme. The typical _shock_-like evolution of the Burgers equation is shown clearly in Figure 9, where we also compare whether the numerical the numerical norm is conserved or not. To contrast the order of magnitude of the approximation we obtain the error between norms:the analytical (that for this example is equal to one) and the numerical one. Additionally, we take profit to compare how this error is altered by the inclusion of the RK scheme, showing a clear improvement of the order of magnitude when activating the scheme. Yet, as the error of the norm was already low enough, the duplication of the computational cost to reach these levels of accuracy must be a compromise when applying the methodology. Regarding the aforementioned computational cost of implementing the RK scheme, it will always be a compromise between how much the time grid can be increased, hence, saving a substantial number of iterations, versus the time spent in evaluating twice the domain for the half step and the final propagation. In the example of the Burgers equation, the order of magnitude for one iteration doubles or, depending whether we need to compute the corrections for a variable transport coefficient or not, it might quadruply. For the soliton-like solution we select the nonlinear Schrodinger equation, that for an elastic potential presents a traveling wave solution, see [70]. To solve the wave function using the Green function scheme we have two possible paths: or we separate the nonlinear equation in its real and imaginary contributions, deriving two coupled diffusive equations to be solved or we use the closed definition of the Green function and introduce the imaginary diffusion before the discretization. As we want to show the capability of the scheme to hold the soliton solution, we select the first option, considering the numerical solution of the two equations--the real and the imaginary parts of the wave function--more challenging: two independent contributions of error will arise from their solution, affecting the required balance between functions to form the soliton.