# 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.4 Boundary Conditions  
The last contribution to the integral scheme is due to the boundary conditions, presenting a structure similar to the nonlinear terms: an integral through the time step of a propagated quantity. Yet, the quantity being propagated is of a discrete, source-like nature, _breaking_, so to speak, the usual integral form of the convolution. For this exploratory study, we focus mainly on the second-order equation, utilizing the method of images [53], which serves as a foundational approach for further development. Consistent with this work, we operate under the short-time approximation, allowing us to separate the domain of study into two distinct regions, each with different Green functions: the inner domain, where both the theoretical and numerical frameworks we have presented hold, and the boundary region, where boundary effects influence both the theoretical (modifying the Green function expression) and numerical levels (requiring an optimized point distribution to mitigate interpolation errors). Thus, modificationsare required at three levels within the algorithm: the expression of \(\mathcal{G}\) across all three propagation terms, adjustments to the Lagrange-like interpolation weights due to the altered discrete points, and the contribution of the boundary integral term. The first modification is rather straightforward since, for the second-order operator, the boundary _reflects_ the Green function accordingly in order to satisfy the equivalent homogeneous boundary condition, see Figure 2. Furthermore, this reflection applies to both the closed expression of the Gaussian, c.f. expression (31), and the Taylor series expansion, with some precautions regarding the value of the diffusion coefficient. In general, if the transport coefficient is not constant, it will affect the expression of the Green function and the way the reflection occurs over the boundary as this coefficient will define the Eigenfunctions for the semi-open space of the approximated Green function, therefore, the affectation over the whole problem will be not negligible. Nonetheless, once again we take profit of both the short-time approximation and the perspective on how the Green function works as a transition probability to overcome this difficulty. In an abstract manner, we can think that the solution at future state \((x,t+\tau)\) as the sum of independent contributions  
Figure 10: Temporal evolution of the soliton for the nonlinear Scrödinger operation over a homogeneous grid of \(N=10^{4}\), a stencil with \(q=9\), a time-step \(\tau=10^{-4}\) and a characteristic diffusion of \(10^{1}\). We plot the three functions of the solution: the imaginary part of the wave function (**top left**), the real part of the wave function (**bottom left**) and the shape of the time evolving soliton (**top right**). from the past states, \((x^{\prime},t)\) being each of them defined by the Green function, that must be, at first-order, a Gaussian. Moreover, for each of the points \(x_{i}\) in the future state, its solution will be propagated by a Gaussian-like Green function with its diffusion coefficient evaluated at this very same point \(x_{i}\). Hence, from this perspective we can assume that each of the points \(x_{i}\) will have their own Gaussian-like Green function and, accordingly, their reflection to satisfy the homogeneous boundary condition that is required. Writing the reflected Green function in terms of the Taylor series expansion we recover,  
\[\mathcal{G}_{2,\text{OD}}\big{(}x,t+\tau|x^{\prime},t_{0}\big{)}=\bigg{\{} \text{Exp}\bigg{[}\tau a_{2}(x,t_{0})\frac{d^{2}}{dx^{2}}\bigg{]}+\frac{1}{2} \tau^{2}\psi_{2}\bigg{\}}\big{[}\delta\big{(}x-x^{\prime}\big{)}\pm\delta\big{(} x-2x_{b}+x^{\prime}\big{)}\big{]} \tag{62}\]  
where \(x_{b}\) is the position of the boundary and the \(\pm\) signs correspond, respectively, to the Dirichlet and Neumann homogeneous boundary conditions at the points.