# Computation of Infinite Depth Green's Function

The normal incidence Green's function for infinite depth has already been published Squire and Dixon 2000, Dixon and Squire 2001, the solution being expressed in terms of the auxilary sine and cosine integrals, or equivalently in terms of the exponential integral (see Appendix C.2.3). Similarly, the finite depth Green's function was derived by Evans and Porter 2003a and was also presented in Section 3.1 of this thesis for both normal and oblique incidence. However, at present, the required derivatives $g^{(n)}(x)$ of the infinite depth Green's function for oblique incidence may only be calculated exactly when $x=0^\pm$. Formulae for these quantities were published by Williams and Squire 2002 and are also derived below in Appendix C.2.2. Although the aforementioned derivatives may be calculated when $x\neq0$ by Fast Fourier Transform, as shown in Section 3.2, this is often not the most efficient approach, especially when the Green's function is only required to be evaluated at a few points. The following two sections outline two approaches that are more suitable for such a scenario.

The first uses a partial fractions decomposition to reduce them (the required derivatives of $g$, or more specifically of $g_1$) into the sum of five simpler transforms which each satisfy linear inhomogeneous second order ordinary differential equations (ODEs). The inhomogeneous term is the zeroth order modified Bessel function of the second kind, $K_0$, which has a standard series representation (Abramowitz and Stegun 1964, p375). Using a method that is similar to both the Method of Undetermined Coefficients (Boyce and DiPrima 1997, p164 ff.) and the Method of Frobenius (Boyce and DiPrima 1997, p262 ff.), we search for solutions that have similar expansions to that of $K_0$, and obtain simple recurrence relations for the series coefficients. The series obtained are convergent for all values of $x$, with less terms needed in the expansion when $x$ is smaller.

A second approach, which uses a contour integral to transform the inversion integral into one that may be calculated more easily by numerical quadrature, is more efficient for larger values of $x$. It is described below in Section C.2, but first we will introduce the series expansion method.

Note that in both methods it is assumed in their derivations that the poles $\alpha_n$ have imaginary part greater than zero. However, it will be seen that the final expressions for $g$ retain the same form in the limits as any poles that need to be are allowed to return to the real line. Consequently, all results hold for any value of $\varpi$.

## Series Expansion

As stated in the introduction to this appendix, the series representation of $g_1(x)$ is obtained by breaking it up into the sum of five simpler transforms which each satisfy a different ODE. Section C.1.1 presents this decomposition and derives the ODEs that they satisfy. Section C.1.2 solves these ODEs by proposing series solutions of a particular type, which are similar to the series expansion of the inhomogeneous term (a modified Bessel function of the second kind).

### Ordinary Differential Equations

From (3.18), the Fourier transform of the $2n$-th derivative of $g_1$ may be expanded by partial fractions as

$\begin{matrix} (-ik)^{(2n)}\hat g_1(k)=-\frac1{\pi \mbox{i}}\sum^2_{m=-2}A_m\gamma_m(\mbox{i}\alpha_m)^{2n+1}\hat g_{1m}(k), &\qquad (C.1) \end{matrix}$

where the $A_n$ were defined in Section 3.2 as $A_n=-\gamma_n^3/\alpha_n(4\gamma_n^5+1)$, and

$\begin{matrix} \hat g_{1n}(k)=\frac{\pi}{\kappa(\alpha_n^2-k^2)}. &\qquad (C.2) \end{matrix}$

Multiplying this by $\alpha_n^2-k^2$ gives the Fourier transform of the ODE

$\begin{matrix} \big(\partial_x^2+\alpha_n^2\big)g_{1n}(x)=K_0(l|x|), &\qquad (C.3) \end{matrix}$

where $K_0$ is a zeroth order modified Bessel function of the second type (Abramowitz and Stegun 1964). For $|=Arg= (w)|\lt \pi$, it has the expansion

$\begin{matrix} K_0(w)&=-\big(\log(w/2)+\gamma_e\big)I_0(w)+\sum_{m=1}^\infty\chi_m\frac{(w/2)^{2m}}{(m!)^2}\\ &=\sum_{m=0}^\infty a_mw^{2m}\big(d_m-\log w\big), &\qquad (C.4) \end{matrix}$

where $\gamma_e$ is the Euler constant, $\chi_m=\sum_{r=1}^m1/r$, and $I_0$ is the modified Bessel function of the first kind (also given by Abramowitz and Stegun 1964):

$\begin{matrix} I_0(w)=\sum_{m=0}^\infty\frac{(w/2)^{2m}}{(m!)^2}=\sum_{m=0}^\infty a_mw^{2m}. &\qquad (C.6) \end{matrix}$

The coefficients $a_m$ and $d_m$ are given by $a_m=1/2^{2m}(m!)^2$ and if $\chi_0=0$, $d_m=\log2-\gamma_e+\chi_m$, so the above series converges for all $w$. Thus we anticipate that series representations for the $g_{1n}$ that satisfy (C.3) will also converge for all $x$. The $a_n$ and $d_n$ themselves may be calculated most efficiently by the recurrence relations $a_n=a_{m-1}/4m^2$ and $d_m=d_{m-1}+1/m$, with $a_0=1$ and $d_0=\log2-\gamma_e.$

The $g_{1n}$ should also satisfy the initial conditions

$\begin{matrix} g_{1n}(0)-q_n=g'_{1n}(0)=0, &\qquad (C.7) \end{matrix}$

where the $q_n$ can be evaluated analytically as shown in Section C.2.2 below.

In addition, we know that even derivatives of $g_1$ are even functions, and that odd derivatives are odd functions (since their Fourier transforms are). Consequently values of $g_1^{(n)}$ for negative $x$ can be generated in an obvious fashion from their values at $-x$, and so we will assume $x\gt 0$ from here on.

### Trial Series Solution

We will solve equations (C.3) by using a variation of the Method of Frobenius to obtain individual series expansions for each of the $g_{1n}$. Letting $w=lx$, $\alpha=\alpha_n/l$, and $J(w)=l^2\big(g_{1n}(x)-q_n\cos\alpha_nx\big)$, $J$ should now satisfy

$\begin{matrix} J''(w)+\alpha^2J(w)=K_0(w) \quad \mbox{for} \ w\gt 0, &\qquad (C.8a)\\ J(0^+)=J'(0^+)=0. &\qquad (C.8b) \end{matrix}$

We can see from their transforms that each of the $g_{1n}$ are continuous, even, and have continuous first derivatives, but that they have logarithmic singularities in their second derivatives, and so we propose a trial solution for (C.8) of the form

$J(w) = \sum_{m=0}^\infty \big( b_m + c_m \log w \big) w^{2m+2}, \qquad (C.9)$

which clearly satisfies (C.8b). This has first derivative

$\begin{matrix} J'(w)=\sum_{m=0}^\infty\big((2m+2)b_m+c_m+(2m+2)c_m\log w\big)w^{2m+1}, &\qquad (C.10) \end{matrix}$

enabling odd derivatives of $g_1$ to also be produced once the previous even one has been calculated. Proceeding to find $J$, however, we now substitute our trial solution into the left hand side of (C.8a), giving

$\begin{matrix} &J''(w)+\alpha^2J=2b_0+3c_0+2c_0\log w\\ &\quad+\sum_{m=1}^\infty\big( (2m+2)(2m+1)b_{m}+\alpha^2b_{m-1}+(4m+3)c_m\big)w^{2m}\\ &\quad+\sum_{m=1}^\infty\big((2m+2)(2m+1)c_m+\alpha^2c_{m-1}\big)w^{2m}\log w. &\qquad (C.11) \end{matrix}$

Consequently, $J$ will satisfy (C.8) if our $b_m$ and $c_m$ satisfy the recurrence relations

$\begin{matrix} (2m+2)(2m+1)b_{m}+\alpha^2b_{m-1}+(4m+3)c_{m}=a_{m}d_{m} \quad &\mbox{for} \ m\geq1, &\qquad (C.12a)\\ (2m+2)(2m+1)c_m+\alpha^2c_{m-1}=-a_m \quad & \mbox{for} \ m\geq1, &\qquad (C.12b) \end{matrix}$

and if $2c_0=-a_0$ and $2b_0=a_0d_0-3c_0$ (i.e., if $b_0=(\log2+3/2-\gamma_e)/2$ and $c_0=-1/2$). The latter relation (C.12b) implies that $|c_m/c_{m-1}|\to0$ as $m\to\infty$, and so the series involving those coefficients in (C.9) will converge for all $w$. This also implies that the $c_m$ themselves tend towards zero as $m\to\infty$, and so we can also deduce from (C.12a) that the ratio $|b_m/b_{m-1}|$ will do the same for large $m$. Consequently, (C.9) will converge in entirety for all $w$, although it will have a branch cut along the negative real axis due to the logarithmic factor.

## Contour Integration

An alternative means of calculating $g$ is by using contour integration to transform the inverse Fourier transform into an integral which is more easily evaluated numerically. This technique is more efficient for larger values of $x$, but it turns out that the resulting integral may actually be evaluated analytically when $x=0$. Section C.2.1 explains the contour used and outlines the numerical method of approximation of the resulting integral for general $x$ values, while Section C.2.2 derives the formula for that integral when $x=0$.

Some additional simplifications can be obtained for normal incidence. We show that the integral for general $x$ reduces to an expression involving the well-known and easily evaluated exponential integral function. This also acts as a further check on the oblique incidence results because the normal incidence results can be compared to those obtained by Dixon and Squire 2001a. This is done in Section C.2.3.

### Derivation and Numerical Approximation

For larger values of $x$, when the series expansions for the $g_{1n}$ take longer to converge, we would like to transform the integral

$g_{1n}(x)=\frac12\int_{-\infty}^\infty\frac{\mbox{e}^{\mbox{i} kx}\mbox{d} k}{\kappa(\alpha_n^2-k^2)} \qquad (C.13)$

into one that is easier to evaluate numerically. To do this we close the contour in the upper half plane, allowing for the pole at $k=\alpha_n$ and the branch cut along the line $k=\mbox{i}\times[l,\infty)$. Thus we can write

$g_{1n}(x)=g_{3n}(x)-\frac{\epsilon_n\pi \mbox{i}}{2\alpha_n\gamma_n}\mbox{e}^{\mbox{i}\alpha_nx}, \qquad (C.14)$

where $\epsilon_n=\mbox{sgn}\big(\mathfrak{Re}[\gamma_n]\big)$, and

$g_{3n}(x)=\int_{\mbox{i} l}^{\mbox{i}\infty}\frac{\mbox{e}^{\mbox{i} kx}\mbox{d} k}{\kappa(\alpha_n^2-k^2)}=\int_{l}^{\infty}\frac{\mbox{e}^{-\kappa x}\mbox{d}\kappa}{k(\kappa^2+\alpha_n^2)}. \qquad (C.15)$

The $\epsilon_n$ results from defining the square root in $\kappa$ as having a branch cut along the negative real axis. Consequently, $\sqrt{a_n^2+l^2}=\epsilon_n\gamma_n$ in the residue of $g_{1n}$ at $\alpha_n$. In addition, $\kappa$ in the left hand integral in (C.15) is taken from the positive imaginary axis.

Now let us define the analogous sum to (C.1):

$\begin{matrix} g_3(x)=-\frac1\pi\sum_{n=-2}^2A_n\alpha_n\gamma_ng_{3n}(x)=-\frac1\pi\int_0^\infty\frac{k\mbox{e}^{-\kappa x}\mbox{d}\kappa}{\Lambda^2(k)k^2+1}. &\qquad (C.16) \end{matrix}$

From (C.14), we now can write the relationship between $g_1$ and $g_3$:

$\begin{matrix} g_1(x)=g_3(x)+\frac \mbox{i}2\sum_{n=-2}^2A_n\epsilon_n\mbox{e}^{\mbox{i}\alpha_nx}. &\qquad (C.17) \end{matrix}$

Adding $g_0$ to $g_1$ then enables us to write $g(x)=g_2(x)+g_3(x)$, where

$\begin{matrix} g_2(x)=\mbox{i}\sum_{n=-2}^0A_n\mbox{e}^{\mbox{i}\alpha_nx}. &\qquad (C.18) \end{matrix}$

This confirms the results (3.20) and (3.21), which were obtained by taking the limit in (3.7) as $H\to\infty$ directly.

$g_3(x)$ as given by (C.16) is an integral that is more amenable to calculation by numerical quadrature than the inverse Fourier transform $g_1$. The integrand will never have any singularities on the real line and, because it is also $O(\mbox{e}^{-kx})$ as $k\to\infty$, $g_3$ will be infinitely differentiable for $x\gt 0$. However, since the non-exponential factor is only $O(k^{-9})$ as $k\to\infty$, its eighth derivative will be singular at the origin, as was mentioned in Section 3.1.1.

When $\theta=0$, $g_3$ may be calculated analytically in terms of the exponential integral $E_1$ as described below in Section C.2.3. First, however, we will show how any derivative of $g_3$ may be efficiently calculated for oblique incidence.

Differentiating (C.16) $n$ times gives

$\begin{matrix} &g_3^{(n)}(x)=-\frac{(-1)^{n}}\pi\int_l^\infty\frac{k\kappa^ne^{-\kappa x}\mbox{d}\kappa}{\Lambda^2(k)k^2+1} &\qquad (C.19a)\\ &=-\frac{(-1)^{n}}\pi\times x^{8-n}\mbox{e}^{-lx}\int_0^\infty \frac{t^{1/2}(t+lx)^n(t+2lx)^{1/2}\mbox{e}^{-t}\mbox{d} t}{t(t+2lx)\big(t^2(t+2lx)^2+\varpi x^4\big)^2+x^{10}} &\qquad (C.19b), \end{matrix}$

where $t=(\kappa-l)x$. This integral may now be found using generalised Gauss-Laguerre integration, using the weight function $t^{1/2}\mbox{e}^{-t}$. The remainder of the integrand will now be relatively smooth, with the exception of the $\sqrt{t+2lx}$ term which has a branch cut on the line $(-\infty,-2lx]$. However, we don't need to integrate over that singularity and the larger $x$ gets the further it moves away from the region of integration. Hence, the integral will converge faster for larger values of $x$. Also note that (C.19b) shows that $g_3^{(n)}$ decays exponentially as $x\to\infty$.

### Exact Calculation of Derivatives at the Origin

Equation (C.15) when $x=0$ is

$\begin{matrix} q_n'=q_n+\frac{\mbox{i}\epsilon_n}{2\alpha_n\gamma_n}=g_{3n}(0^+)=I(\alpha_n)+I(-\alpha_n), &\qquad (C.20) \end{matrix}$

where

$\begin{matrix} I(\alpha)&=\frac1{2\mbox{i}\alpha}\int_l^\infty\frac{\mbox{d}\kappa}{k(\kappa-\mbox{i}\alpha)} =-\frac1{\alpha}\int_0^1\frac{\mbox{d} w}{(\alpha-\mbox{i} l)w^2-(\alpha+\mbox{i} l)}, &\qquad (C.21) \end{matrix}$

and we have made the transformation $\kappa=l(1+w^2)/(1-w^2)$. If we also define $\beta$ and $\gamma$ by the relations $\beta^2=(\alpha+\mbox{i} l)/(\alpha-\mbox{i} l)$ and $\beta=\gamma/(\alpha-\mbox{i} l)=(\alpha+\mbox{i} l)/\gamma$ (so that $\gamma^2=\alpha^2+l^2$), (C.21) becomes

$\begin{matrix} &I(\alpha)=-\frac1{\alpha(\alpha-\mbox{i} l)}\int_0^1\frac{\mbox{d} w}{w^2-\beta^2} =-\frac1{2\alpha\gamma}\left(\int_0^1\frac{\mbox{d} w}{w-\beta} -\int_0^1\frac{\mbox{d} w}{w+\beta}\right)\\ &=\frac1{2\alpha\gamma}\big(\log(1+\beta)-\log(1-\beta)-\log\beta+\log(-\beta)\big). &\qquad (C.22) \end{matrix}$

To simplify (C.22), we choose $\beta$ to be the square root from the upper half plane (which also implies that $1+\beta$ is in the upper half plane, and that $\log(-\beta)=\log\beta-\mbox{i}\pi$). $1-\beta$ will then be in the lower half-plane so the quotient $(1+\beta)/(1-\beta)$ corresponds to an anti-clockwise rotation of $1+\beta$. Potentially this could rotate $1+\beta$ across the branch cut in the logarithm on the negative real axis, but it can be shown explicitly that with our choice of $\beta$ the aforementioned quotient remains in the upper half plane. Thus, the normal logarithm rules for quotients hold, and so (C.22) may be written

$\begin{matrix} &I(\alpha)=\frac1{2\alpha\gamma}\big(\log\frac{1+\beta}{1-\beta}-\pi \mbox{i}\big) =\frac1{2\alpha\gamma}\big(\log\frac{\gamma+\alpha+\mbox{i} l}{\gamma-\alpha-\mbox{i} l}-\pi \mbox{i}\big). &\qquad (C.23) \end{matrix}$

Note that the above expression is even in $\gamma$, so it doesn't matter after all which root we choose for it. Thus,

$\begin{matrix} q_n'=\frac1{2\alpha_n\gamma_n}\big(\log\frac{\gamma_n+\alpha_n+\mbox{i} l}{\gamma_n-\alpha_n-\mbox{i} l} -\log\frac{\gamma_n-\alpha_n+\mbox{i} l}{\gamma_n+\alpha_n-\mbox{i} l}\big)=\frac1{2\alpha_n\gamma_n}\log\Theta_n, &\qquad (C.24) \end{matrix}$

where $\Theta_n=(\gamma_n+\alpha_n)/(\gamma_n-\alpha_n)$. The latter step is justifed since if $\mathfrak{im}[\alpha_n]\gt 0$ the argument of the first logarithm will be in the first quadrant, while the argument of the second logarithm will be in the second quadrant. This means that we can now write

$g_3^{(2n)}(0^+)=-\frac1\pi\sum_{n=-2}^2A_n\alpha_n\gamma_nq'_n =-\frac1{2\pi}\sum_{m=-2}^2A_m(\mbox{i}\alpha_m)^{2n}\log{\Theta_m}. \qquad (C.25)$

Now, for small $l$, $\alpha_n\sim\epsilon_n\gamma_n\big(1-l^2/2\gamma_n+ O(l^4)\big)$, where $\epsilon_n=\mbox{sgn}(\mathfrak{im}[\gamma_n])$, so at first glance it seems like the above expression will become singular as $l \to 0$. However, this is not the case. If we define $A'_n=A_n\alpha_n/\gamma_n=-\gamma_n^2/ (4\gamma_n^5+1)$, $A_n\sim\epsilon_nA_n'+O(l^2)$ and it is easily shown that for $n=0,1,2,3$ they satisfy the rules

$\sum_{m=-2}^{2}A_m'\gamma_m^{2n}=0 \quad \mbox{for} \ n=0,\ldots,3, \qquad (C.26)$

which are similar to those presented by Squire and Dixon 2000. Thus as $l \to 0$,

$\begin{matrix} g_3^{(2n)}(0^+)&\sim-\frac1{2\pi}\sum_{m=-2}^2A_m'\big(1+O(l^2)\big)\times \left(\log\big( \gamma_n^2\big(1+O(l^2)\big) \big)-\log\frac{l^2}4\right)\\ &\to-\frac1{2\pi}\sum_{m=-2}^2A_m'(\mbox{i}\gamma_m)^{2n}\log{\gamma^2_m}. &\qquad (C.27) \end{matrix}$

### Normal Incidence Simplification

An alternative expansion to (C.20) for the $g_{3n}$ is

$\begin{matrix} &2\gamma_n^2g_{3n}(x)=\int_l^\infty\left(\frac2k-\frac1{k+\mbox{i}\gamma_n}-\frac1{k-\mbox{i}\gamma_n}\right)\mbox{e}^{-\kappa x}\mbox{d}\kappa\\ &=2K_0(lx)-\int_l^\infty\left(\frac1{k+\mbox{i}\gamma_n}+\frac1{k-\mbox{i}\gamma_n}\right)\mbox{e}^{-\kappa x}\mbox{d}\kappa. &\qquad (C.28) \end{matrix}$

Using the rules (C.26) to eliminate the Bessel function $K_0$, we can thus write the $2n$-th derivative of $g_3$ as

$\begin{matrix} &g_3^{(2n)}(x)=-\frac1\pi\sum_{m=-2}^2A_m'(\mbox{i}\alpha_m)^{2n}g_{3m}(x)\\ &=\frac1{2\pi}\sum_{m=-2}^2A_m'(\mbox{i}\alpha_m)^{2n}\int_l^\infty\left(\frac1{k+\mbox{i}\gamma_n}+\frac1{k-\mbox{i}\gamma_n}\right)\mbox{e}^{-\kappa x}\mbox{d}\kappa. &\qquad (C.29) \end{matrix}$

Now, if we let $\theta\to0$, $l\to0$, $\alpha_n^2\to\gamma_n^2$, and $\kappa\to k$ on the real line, (C.29) becomes

$\begin{matrix} g_3^{(2n)}(x)&=\frac1{2\pi}\sum_{m=-2}^2A_m'(\mbox{i}\gamma_m)^{2n}\left( \mbox{e}^{\mbox{i}\gamma_mx}E_1(\mbox{i}\gamma_mx)+\mbox{e}^{-\mbox{i}\gamma_mx}E_1(-\mbox{i}\gamma_mx) \right), &\qquad (C.30) \end{matrix}$

where $E_1$ is the well-known exponential integral function (Abramowitz and Stegun 1964, p228ff.) defined as follows

$E_1(w)=\int_w^\infty\frac{\mbox{e}^{-t}}t\mbox{d}t=-\gamma-\log w - \sum_{n=1}^\infty \frac{(-w)^n}{n\,n!} \quad \mbox{for} \ \mid \mbox{Arg} (w) \mid \lt \pi. \qquad (C.31)$

Note that, since no imaginary solutions exist for the infinite depth dispersion relation, $\big| \mbox{Arg} [\pm \mbox{i}\gamma_nx]\big|\lt \pi$, so the above formulae are valid. Also note that the $g_3^{2n}$ will be everywhere bounded, despite the logarithmic singularities in $E_1$. This also follows from the rules (C.26), allowing us to deduce that taking the limit in (C.30) as $x \to 0^+$ gives

$\begin{matrix} &g_3^{(2n)}(0^+)=-\frac1{2\pi}\sum_{m=-2}^2A_m'(\mbox{i}\gamma_m)^{2n} \big(\log(\mbox{i}\gamma_m)+\log(-\mbox{i}\gamma_m)\big)\\ &=-\frac1\pi\sum_{m=-2}^2A_m'(\mbox{i}\gamma_m)^{2n}\log\gamma_m -2i\big(A'_{-2}(\mbox{i}\gamma_1)^{2n}+A'_2(\mbox{i}\gamma_2)^{2n}\big) &\qquad (C.32a)\\ &=-\frac1{2\pi}\sum_{m=-2}^2A_m'(\mbox{i}\gamma_m)^{2n}\log\gamma_m^2, &\qquad (C.32b) \end{matrix}$

which agrees with (C.27). Recalling that $A_n\to\mbox{sgn}(\mathfrak{Im}[\gamma_n])A_n'$ as $l \to 0$, adding $g_2^{(2n)}(0^+)$ to (C.32a) and using (C.26) to simplify the product, then gives the following result for $g^{(2n)}(0^+)$ itself:

$\begin{matrix} g^{(2n)}(0^+)&=-\frac1\pi\sum_{m=-2}^2A_m'(\mbox{i}\gamma_m)^{2n}\log\gamma_m -2i\big(A'_{-2}(\mbox{i}\gamma_1)^{2n}+A'_2(\mbox{i}\gamma_2)^{2n}\big). &\qquad (C.33) \end{matrix}$

The above result is unstable as $\gamma_2$ becomes negative and so is only reliable for $\varpi\gt \varpi_\infty$. For a result that holds for all $\varpi$, use (C.32b) and the ordinary definition of $g_2$.

Odd derivatives of $g_3$ may also be obtained by differentiating (C.30) directly, again making use of (C.31) and also (C.26) to eliminate any $1/x$ type singularities produced. Thus,

$\begin{matrix} g_3^{(2n+1)}(x)&=\frac1{2\pi}\sum_{m=-2}^2A_m'(\mbox{i}\gamma_m)^{2n+1}\left( \mbox{e}^{\mbox{i}\gamma_mx}E_1(\mbox{i}\gamma_mx)-\mbox{e}^{-\mbox{i}\gamma_mx}E_1(-\mbox{i}\gamma_mx)\right), &\qquad (C.34) \end{matrix}$

and so we can write the general $n^\mbox{th}$ ($0\leq n\leq7$) derivative of $g_3$ as

$\begin{matrix} g_3^{(n)}(x)&=\frac1{2\pi}\sum_{m=-2}^2A_m'(\mbox{i}\gamma_m)^{n}\left( \mbox{e}^{\mbox{i}\gamma_mx}E_1(\mbox{i}\gamma_mx)+\mbox{e}^{\mbox{i}(n\pi-\gamma_mx)}E_1(-\mbox{i}\gamma_mx)\right). &\qquad (C.35) \end{matrix}$

Recall that from (3.13) that we already know what values $g^{(2n+1)}$ will take at the origin so there is no need to take the limit in (C.34) as $x \to 0^+$. In addition, we can also check the above results numerically by letting $l\to0$ and $\kappa\to k$ in (C.19a) and using generalised Gauss-Laguerre integration (with weight function $k^{n+1}\mbox{e}^{-kx}$).

A further confirmation of (C.35) can be obtained by checking the $n=0$ result against the equivalent result of Dixon and Squire 2001. Let us denote their nondimensional length variables as $x',z',\xi'$ and $\zeta'$, which equate to $x/a,z/a,\xi/a$ and $\zeta/a$ respectively. In their expression (6) for the Green's function in that scheme, which we shall denote $G_\mbox{SD}$, the integral when $x'\gt \xi'$ and $z',\zeta'\approx0$ is obtained by doubling the real part of equation (14b). Doing so, and then differentiating with respect to $\zeta'$ followed by $z'$ gives the result

$\begin{matrix} &g(x-\xi)=\frac1{a^2}\partial^2_{z'\zeta'}G_\mbox{SD}(x'-\xi',0,0)+\mbox{i} A_0\cos\gamma_0x\\ &=\mbox{i}\sum_{m=-2}^0A'_m\epsilon_me^{\mbox{i}\epsilon_m\gamma_mx} +\frac1\pi\sum_{m=-2}^2A_m'g_\mbox{cos}(\epsilon_m'\gamma_mx), &\qquad (C.36) \end{matrix}$

where $\epsilon_n'=\sgn\big(\mbox{e}[\gamma_n]\big)$. The cosine term needs to be added to allow for the difference between taking the Cauchy Principal value of the integral (3.4) and letting the poles $\pm\alpha_0$ approach the real line from the upper or lower half plane as we did, while $g_\mbox{cos}$ is the auxiliary cosine function Abramowitz and Stegun 1964 which may be written as

$g_\mbox{cos}(w)=\int_0^\infty\frac{\cos t}{w+t}\mbox{d} t=\frac12\big(\mbox{e}^{\mbox{i} w}E_1(\mbox{i} w)+\mbox{e}^{-\mbox{i} w}E_1(-\mbox{i} w)\big), \quad \mathfrak{Re}[w]\gt 0. \qquad (C.37)$

Since the first summation in (C.36) is obviously $g_2(x)$, the second sum must be $g_3(x)$. In light of the definition of $g_\mbox{cos}$, the result presented by Dixon and Squire 2001 clearly agrees with (C.35).