# 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  
Once we have defined and characterized the evolution of the initial condition of the problem through the numerical Green function, the next step is to add the propagation of the non-homogeneous terms, \(\Phi\) into the time-evolving solution. To do so, we need to compute the double integral, see Equation (13), that takes into account the propagation and variation of these terms through the time step \(\tau\). While the spatial integral can be obtained in the same manner as we have already introduced, the temporal integral requires a numerical quadrature:  
\[ \begin{split} u_{nh}(x_{i},t+\tau)=\int_{0}^{\tau}\int\Phi\big{(} x^{\prime},t+\tau^{\prime}\big{)}\mathcal{G}_{\rho_{2}}\big{(}x_{i}-x^{\prime}, \tau-\tau^{\prime}\big{)}dx^{\prime}d\tau^{\prime}=\\ \sum_{k=1}^{s}\sum_{j=-q}^{q}w_{j}(t_{0}+\tau|t_{0}+\tau_{k})\Phi (x_{i},t+\tau_{k}),\end{split}  \tag{57}\]  
where we have used the same notation as we introduced for the Green functions to make explicit the time propagation between the time frame \(t_{0}+\tau_{k}\) and the final one \(t_{0}+\tau\). For first-order, \(s=1\), we recover the equivalent Euler method presented in Section 2.2: the weights will coincide with those of the initial condition causing both propagations--the initial condition and the non-homogeneous terms--be equivalent. Hence, we can group both terms, having an _extended_ initial condition for the problem that evolves in time. Increasing the order of the quadrature will imply propagations towards and from time frames between \(t_{0}\) and \(t_{0}+\tau\). Thus, requiring Runge-Kutta (RK) or \(\theta\)-like schemes [63] that allow to decrease the error combining them. In particular, the definition of such such schemes over an operator previously split into two parts, a linear and a nonlinear one, is the starting point for the exponential integrators, a family of numerical methods we introduced in Section 1, see for example [20; 68] and the references within. Their difficulty lies precisely in the split of the operator: while only the \(u_{nh}\) integral requires to be approximated, in order to obtain the value of the nonlinear term at each of the intermediate \(s\) steps of the method we will need to propagate the whole solution towards them first. Moreover, once the non-homogeneous function is computed at those intermediate steps, the propagation towards \(t=t_{0}+\tau\) must be done using a Green function that starts at these \(t_{0}+\tau_{k}\) points, i.e., its transport coefficients and CFLs must be evaluated at these intermediate time frames and the two states for the Green function (the initial and final ones) must be defined accordingly. The control and reduction of the quadrature errors under these operators will require for adapted versions of Butcher tableau and the coefficients for high-order methods might not coincide with the classical ones. For the explorative phase presented on this work we will limit ourselves to the midpoint method for the quadrature, that will serve also as an example of the implementation of these methods over the integral scheme, leaving the fourth-order equivalent Runge-Kutta and its adaptive versions for future works. Following the usual steps for the RK methods\[t_{0}\to t_{0}+\frac{\tau}{2}:u_{mp}\Big{(}x_{i},t_{0}+\frac{\tau}{2}\Big{)}= \tag{58}\]  
where we see that, while the number of operations is doubled as two time propagations are required for each time step, the methodology will be highly simplified for a constant transport coefficient (or one that produce negligible corrective terms). Indeed, in this situation the Green function will only depend on the time frame explicitly, allowing for the weights to be precomputed, leaving only the value of the local transport coefficient \(a(x_{i})\) to be updated. Recall that the RK methodology is only applied to solve the integral for the nonlinear terms, leaving the Taylor series expansion of the Green function as the usual extrapolation in time from the initial value.