# Exploratory Study of a Green Function Based Solver for Nonlinear Partial Differential Equations
## 2 Mathematical Foundations of the Method
### Closed Expressions for the Green Function
#### 2.3.2 Second-Order Operator: Diffusion Equation
\begin{split}&\mathcal{G}\big{(}x,\tau\,|\,x^{\prime},0\big{)}=\delta \big{(}x-x^{\prime}\big{)}+\tau a_{2}\partial_{xx}\delta\big{(}x-x^{\prime} \big{)}+\frac{1}{2}\tau^{2}a_{2}^{2}\partial_{xxxx}\delta\big{(}x-x^{\prime} \big{)}\\ &+\frac{1}{2}\tau^{2}\big{\{}(a_{2,t}+a_{2}\partial_{xx}a_{2}) \partial_{xx}+2a_{2}\partial_{x}a_{2}\partial_{xxx}\big{\}}\delta\big{(}x-x^{ \prime}\big{)}+\mathcal{O}\Big{(}\tau^{3}\Big{)}\\ &=\text{Exp}[\tau a_{2}(x,0)\partial_{xx}]\delta\big{(}x-x^{ \prime}\big{)}+\frac{1}{2}\tau^{2}\psi_{2}+\mathcal{O}\Big{(}\tau^{3}\Big{)}. \end{split}  \tag{30}\]  
It can be concluded that, similarly to the first-order operator, the corrections are of order \(\tau^{2}\) and they include the application of the PDE to the transport coefficient and extra order derivatives due to the general Leibniz rule. Placing the Green function into the integral scheme together with its corrections we see that all the derivatives applied to the Dirac delta will become derivatives over the extended initial condition. As a result, not only the initial condition but also the nonlinear terms will be affected by these corrections, altering the possible smoothing of discontinuities. The closed domain Green function for this operator, on the other hand, becomes more cumbersome as its Eigenfunctions accept two boundaries, therefore expression (21) must be derived accordingly for each geometry and kind of boundary conditions. Yet, we can once again take profit of the short-time approximation to simplify the problem. If the Gaussian spread is confined, at least until a numerical value close to the numerical zero, then the effect of the Green function will be limited to that spread. Being its standard deviation defined by the time step, it is clear that as long as the Gaussian does not interact with the boundary regions, the open domain Green function we have derived so far will suffice to describe the temporal evolution of the problem. For which is again important to recall that, while the Gaussian is not a bounded function, its value converges towards it fast enough, numerically speaking we can reach double floating point precision for around \(8.5\sigma\), thus defining an affectation region of the open domain of this size. Close to the boundaries we can take profit of the shape of the Eigenfunctions of the second-order operator, that allow the summation (21) to be operated by means of Poisson summation's formula, arising the well-known method of images [53]. This method develops the resulting Green function from the closed domain expression as linear combinations of _reflections_ of the open domain one. As a result, we can achieve Dirichlet or Neumann boundary conditions by simply substracting or adding a reflection at the Boundary, interpreting the boundaries as _mirrors_. Furthermore, for a closed domain, the infinite summation is recovered in the same sense an infinite reflection will be obtained when confronting two standard mirrors. If we add to this idea the short-time approximation the problem simplifies even more as the mirrors will be _far_ from each other and only one reflection will appear when the Gaussian--the open domain Green function--is close to the boundary. For example, the Dirichlet one dimensional semi-open Green function for this problem will be,  
\[\mathcal{G}_{sOD}\big{(}x,x^{\prime},\tau\big{)}=\frac{1}{\sqrt{4\pi a_{2}\tau }}\Bigg{\{}\text{Exp}\left[-\left(\frac{x-x^{\prime}}{4a_{2}\tau}\right)^{2} \right]-\text{Exp}\left[-\left(\frac{x+x^{\prime}}{4a_{2}\tau}\right)^{2} \right]\Bigg{\}}. \tag{31}\]  
where we see that the reflection is performed over the \(x^{\prime}\) variable and it can be verified that, for the boundary point \(x=0\), the Green function satisfies the Dirichlet homogeneous boundary conditions. In addition, in Figure 2 we present another example, this time a Neumann boundary reflection, to clarify visually how this problematic behaves.