limit

Green’s function for the 3D wave equation.

October 22, 2025 math and physics play , , , , , , , ,

[Click here for a PDF version of this and related posts]

We’ve now evaluated the 1D Green’s function and 2D Green’s function for the wave equation.

For the sake of completeness, now let’s evaluate the Green’s function for the 3D wave equation operator. Again with \( \Br = \Bx – \Bx’, \tau = t – t’ \) we want the \( \epsilon \rightarrow 0 \) limit of
\begin{equation}\label{eqn:waveEquationGreens:1480}
G_\epsilon(\Br, \tau)
=
\inv{\lr{2 \pi}^4} \int d^3 \Bk d\omega \frac{e^{j \Bk \cdot \Br + j \omega \tau}}{(\omega/c – j \epsilon/c)^2 – \Bk^2}.
\end{equation}
For \(\epsilon > 0 \) this will presumably give us the retarded solution, with advanced for \( \epsilon < 0 \). We are using the nice pole displacement that leaves both poles on the same side of the upper or lower half plane, depending on the sign of \( \epsilon \). Let’s only do the \( \epsilon > 0 \) case by hand. Evaluating the \( \omega \) integral first with an upper half plane contour, we have
\begin{equation}\label{eqn:waveEquationGreens:1500}
\begin{aligned}
G_\epsilon(\Br, \tau)
&=
\frac{c^2}{\lr{2 \pi}^4} \int d^3 \Bk e^{j \Bk \cdot \Br}
\frac{e^{j \omega \tau}}{
\lr{\omega – \lr{ j \epsilon – \Abs{\Bk} c}}
\lr{\omega – \lr{ j \epsilon + \Abs{\Bk} c}}
} \\
&=
\frac{j c^2}{\lr{2 \pi}^3} \Theta(\tau) \int d^3 \Bk e^{j \Bk \cdot \Br}
\lr{
\evalbar{\frac{e^{j \omega \tau}}{\omega – \lr{ j \epsilon – \Abs{\Bk} c}}}{\omega = j \epsilon + \Abs{\Bk} c}
+
\evalbar{\frac{e^{j \omega \tau}}{\omega – \lr{ j \epsilon + \Abs{\Bk} c}}}{\omega = j \epsilon – \Abs{\Bk} c}
} \\
&=
\frac{j c^2}{\lr{2 \pi}^3} \Theta(\tau) e^{-\epsilon \tau} \int d^3 \Bk e^{j \Bk \cdot \Br}
\lr{
\frac{e^{j \Abs{\Bk} c \tau}}{2 \Abs{\Bk} c}

\frac{e^{-j \Abs{\Bk} c \tau}}{2 \Abs{\Bk} c}
} \\
&=
-\frac{c}{\lr{2 \pi}^3} \Theta(\tau) e^{-\epsilon \tau} \int \frac{d^3 \Bk}{\Abs{\Bk}} e^{j \Bk \cdot \Br}
\sin\lr{ \Abs{\Bk} c \tau }.
\end{aligned}
\end{equation}
We can evaluate the \( \epsilon \rightarrow 0 \) limit, and switch to spherical coordinates in k-space. Let \( \Br = r \Be_3 \)
\begin{equation}\label{eqn:waveEquationGreens:1520}
G(\Br, \tau)
=
-\frac{c}{\lr{2 \pi}^3} \Theta(\tau)
\int_{k = 0}^\infty \frac{k^2 dk}{k}
\int_{\phi = 0}^{2 \pi} d\phi
\int_{\theta = 0}^{\pi} \sin\theta d\theta
e^{j k r \cos\theta} \sin\lr{ k c \tau }.
\end{equation}
With \( u = \cos\theta \), this gives
\begin{equation}\label{eqn:waveEquationGreens:1540}
\begin{aligned}
G(\Br, \tau)
&=
\frac{c}{\lr{2 \pi}^2} \Theta(\tau)
\int_{k = 0}^\infty k dk \sin\lr{ k c \tau }
\int_{u = -1}^{1} du
e^{j k r u} \\
&=
\frac{c}{\lr{2 \pi}^2} \Theta(\tau)
\int_{k = 0}^\infty k dk \sin\lr{ k c \tau }
\lr{ \frac{e^{-j k r }}{j k r} – \frac{e^{j k r }}{j k r} } \\
&=
-\frac{c}{2 \pi^2 r} \Theta(\tau) \int_{k = 0}^\infty dk \sin\lr{ k c \tau } \sin\lr{ k r} \\
&=
-\frac{c}{4 \pi^2 r} \Theta(\tau) \int_{k = 0}^\infty dk
\lr{
\cos\lr{ k( c \tau – r ) }

\cos\lr{ k( c \tau + r ) }
} \\
&=
-\frac{c}{8 \pi^2 r} \Theta(\tau) \int_{k = -\infty}^\infty dk
\lr{
\cos\lr{ k( c \tau – r ) }

\cos\lr{ k( c \tau + r ) }
} \\
&=
-\frac{c}{8 \pi^2 r} \Theta(\tau) \int_{-\infty}^\infty dk
\lr{
e^{ j k( c \tau – r ) } – e^{ j k( c \tau + r ) }
} \\
&=
-\frac{c}{4 \pi r} \Theta(\tau)
\lr{
\delta( c \tau – r )

\delta( c \tau + r )
} \\
&=
-\frac{1}{4 \pi r} \Theta(\tau)
\lr{
\delta( \tau – r/c )

\delta( \tau + r/c )
}.
\end{aligned}
\end{equation}
Observe that the second delta function only has a value when \( \tau = -r/c \), but \( \Theta(-r/c) = 0 \). Similarly, the first delta function only has a value for \( \tau = r/c \ge 0 \), where the Heaviside step function is unity. That means we can simplify this to just
\begin{equation}\label{eqn:waveEquationGreens:1560}
\boxed{
G(\Br, \tau) = -\frac{1}{4 \pi \Abs{\Br}} \delta( \tau – \Abs{\Br}/c ),
}
\end{equation}
as expected.

Again, sort of sadly, we can skip all the fun and evaluate most of this in Mathematica. It needs only minor hand-holding to extract the delta function semantics. The retarded derivation is shown in fig. 1, and the advanced derivation in fig. 2.

fig. 1. Retarded 3D Green’s function for the wave equation.

fig. 2. Advanced 3D Green’s function for the wave equation.

Correcting the errors: Green’s functions for the 1D Helmholtz and Laplacian operators.

September 28, 2025 math and physics play , , , , , , , , , , , , , , , ,

[Click here for a PDF version of this post, and others in this series]

The following recent posts explored 1D Green’s functions for the Helmholtz and Laplacian operators.  There was a sign error (wrong residue sign for a negatively oriented contour) that I made near the beginning that caused a lot of trouble.  Having found the error, I’ve now reworked all that exploratory content into a more coherent form.  That reworked content can be found in today’s blog post below (or in the PDF above, which includes all of this, plus the 2D and 3D derivations.)

Part 1. Green’s functions for the Helmholtz (wave equation) operator in various dimensions.

 

A trilogy in five+ parts: Confirming an error in the derived 1D Helmholtz Green’s function.

 

A trilogy in six+ parts: 1D Laplacian Green’s function

A trilogy in 7+ parts: A better check of the 1D Helmholtz Green’s function.

 

 

Helmholtz Green’s function in 1D.

Evaluating the integral.

For the one dimensional case, we want to evaluate
\begin{equation}\label{eqn:helmholtzGreensV2:200}
G(r) = -\inv{2 \pi} \int \inv{p^2 – k^2} e^{j p r} dp,
\end{equation}
an integral which is unfortunately non-convergent. Since we are dealing with delta functions, it is not surprising that we have convergence problems. The technique used in the book is to displace the pole slightly by a small imaginary amount, and then take the limit.

That is
\begin{equation}\label{eqn:helmholtzGreensV2:220}
G(r) = \lim_{\epsilon \rightarrow 0} G_\epsilon(r),
\end{equation}
where
\begin{equation}\label{eqn:helmholtzGreensV2:240}
\begin{aligned}
G_\epsilon(r)
&= -\inv{2 \pi} \int_{-\infty}^\infty \inv{p^2 – \lr{k + j \epsilon}^2} e^{j p r} dp \\
&= -\inv{2 \pi} \int_{-\infty}^\infty \frac{e^{j p r}}{\lr{ p – k -j \epsilon}\lr{p + k + j \epsilon}} dp.
\end{aligned}
\end{equation}
Our contours, for \( \epsilon > 0 \), are illustrated in fig 1.

fig 1. Contours for 3D Green’s function evaluation

For \( r > 0 \) we can use an upper half plane infinite semicircular contour integral, with \( R \rightarrow \infty \).

The residue calculation for this contour gives
\begin{equation}\label{eqn:helmholtzGreensV2:260}
\begin{aligned}
G_\epsilon(r)
&= -\frac{(+2 \pi j)}{2 \pi} \evalbar{\frac{e^{j p r}}{p + k + j \epsilon} }{p = k + j \epsilon} \\
&= -j \frac{e^{j \lr{k + j \epsilon} r}}{2\lr{k + j \epsilon}} \\
&= -j \frac{e^{j k r} e^{-\epsilon r}}{2\lr{k + j \epsilon}} \\
&\rightarrow -\frac{j}{2k} e^{j k r}.
\end{aligned}
\end{equation}

For \( r < 0 \) we use the lower half plane infinite semicircular contour For this contour, we find \begin{equation}\label{eqn:helmholtzGreensV2:280} \begin{aligned} G_\epsilon(r) &= -\frac{2 \pi j}{(-2 \pi)} \evalbar{\frac{e^{j p r}}{p – k – j \epsilon} }{p = -k – j \epsilon} \\ &= -j \frac{e^{-j \lr{k + j \epsilon} r}}{2\lr{k + j \epsilon}} \\ &= -j \frac{e^{-j k r} e^{\epsilon r}}{2\lr{k + j \epsilon}} \\ &\rightarrow -\frac{j}{2k} e^{-j k r}. \end{aligned} \end{equation} Combining both results, our Green’s function, after a positive pole displacement \( \epsilon > 0 \), is
\begin{equation}\label{eqn:helmholtzGreensV2:300}
G(r) = \frac{1}{2 j k} e^{j k \Abs{r}}.
\end{equation}

Similarly, should we pick \( \epsilon < 0 \), the same sort of calculation yields an incoming wave solution \begin{equation}\label{eqn:helmholtzGreensV2:2240} G(r) = -\frac{1}{2 j k} e^{-j k \Abs{r}}. \end{equation} Allowing for either, we have Green’s functions for both the incoming and outgoing wave cases \begin{equation}\label{eqn:helmholtzGreensV2:2260} \boxed{ G_{\pm}(x – x’) = \pm \frac{1}{2 j k} e^{ \pm j k \Abs{x – x’}}. } \end{equation} With two Green’s functions, we can also make a linear combination. Specifically \begin{equation}\label{eqn:helmholtzGreensV2:2280} \begin{aligned} G(r) &= \inv{2}\lr{ G_{+}(r) + G_{-}(r) } \\ &= \inv{4 j k}\lr{ e^{ j k \Abs{r}} – e^{ – j k \Abs{r}} } \\ &= \inv{2 k} \sin\lr{ k \Abs{r} } \end{aligned} \end{equation} This real valued Green’s function is plotted in fig. 2.

fig. 2. Green’s function for 1D Helmholtz operator.

The convolution is now fully specified, providing a specific solution to the non-homogeneous equation \begin{equation}\label{eqn:helmholtzGreensV2:400} U(x) = \inv{2k} \int_{-\infty}^\infty \sin( k\Abs{r} ) V(x + r) dr. \end{equation}

The general solution may also include any solutions to the homogeneous Helmholtz equation \begin{equation}\label{eqn:helmholtzGreensV2:2300} U(x) = A e^{j k x} + B e^{-j k x} + \inv{2k} \int_{-\infty}^\infty \sin( k\Abs{r} ) V(x + r) dr. \end{equation}

A strictly causal solution.

We can split the convolution kernel a “causal” part, where only the spatially-“past” values of \( V \) contribute, and an “acausal” part \begin{equation}\label{eqn:helmholtzGreensV2:2320} U(x) = \inv{2k} \int_{-\infty}^0 \sin( k\Abs{r} ) V(x + r) dr + \inv{2k} \int_{0}^\infty \sin( k\Abs{r} ) V(x + r) dr. \end{equation} In a sense, we are averaging causal and acausal portions of the convolution. Suppose that we form a convolution with a built in cut-off, so that values of \( V(x’), x’ > x \) do not contribute to \( U(x) \). That is
\begin{equation}\label{eqn:helmholtzGreensV2:440}
f(x) = \int_{-\infty}^x \frac{\sin\lr{k \lr{x – x’}}}{k} V(x’) dx’.
\end{equation}
Here the one-half factor has been dropped, since we are no longer performing a QFT like average of causal and acausal terms.

Intuition suggests this should be a solution to the Helmholtz equation, but let’s test that guess. We start with the identity
\begin{equation}\label{eqn:helmholtzGreensV2:460}
\frac{d}{dx} \int_a^x g(x, x’) dx’
=
\evalbar{g(x, x’) }{x’ = x} + \int_a^x \frac{\partial g(x,x’)}{dx} dx’.
\end{equation}
Taking the first derivative of \( f(x) \), we find
\begin{equation}\label{eqn:helmholtzGreensV2:480}
\begin{aligned}
\frac{df}{dx}
&= \evalbar{ \frac{\sin\lr{k \lr{x – x’}}}{k} V(x’) }{x’ = x} + k \int_{-\infty}^x \frac{\cos\lr{k \lr{x – x’}}}{k} V(x’) dx’ \\
&= k \int_{-\infty}^x \frac{\cos\lr{k \lr{x – x’}}}{k} V(x’) dx’,
\end{aligned}
\end{equation}
where we have, somewhat lazily, treated the infinite limit as a constant. Effectively, this requires that the forcing function \( V(x) \) is zero at \( -\infty \). Taking the second derivative, we have
\begin{equation}\label{eqn:helmholtzGreensV2:500}
\begin{aligned}
\frac{d^2f}{dx^2}
&=
\evalbar{ k \frac{\cos\lr{k \lr{x – x’}}}{k} V(x’) }{x’ = x} – k^2 \int_{-\infty}^x \frac{\sin\lr{k \lr{x – x’}}}{k} V(x’) dx’ \\
&= V(x) – k^2 f(x),
\end{aligned}
\end{equation}
or
\begin{equation}\label{eqn:helmholtzGreensV2:520}
\frac{d^2}{dx^2} f(x) + k^2 f(x) = V(x).
\end{equation}
This verifies that \ref{eqn:helmholtzGreensV2:440} is also a specific solution to the wave equation, as expected and desired.

It appears that the general solution is likely of the following form
\begin{equation}\label{eqn:helmholtzGreensV2:380b}
U(x) =
A’ \cos\lr{ k x } +
B’ \sin\lr{ k x }
+\alpha \int_{-\infty}^x \frac{\sin\lr{k \lr{x – x’}}}{k} V(x’) dx’
+(1-\alpha)\int_x^\infty \frac{\sin\lr{k \lr{x – x’}}}{k} V(x’) dx’,
\end{equation}
with \( \alpha \in [0,1] \).

It’s pretty cool that we can completely solve the 1D forced wave equation, for any forcing function, from first principles. Yes, I took liberties that would make a mathematician cringe, but we are telling a story, and leaving the footnotes to somebody else.

Verification of the 1D Helmholtz Green’s function.

Let’s show that the outgoing Green’s function has the desired delta function semantics. That is
\begin{equation}\label{eqn:helmholtzGreensV2:2060}
\lr{ \spacegrad^2 + k^2 } G(x, x’) = \delta(x – x’),
\end{equation}
where
\begin{equation}\label{eqn:helmholtzGreensV2:2080}
G(x, x’) = \frac{e^{j k \Abs{x – x’}}}{2 j k}.
\end{equation}
Making a \( r = x – x’ \) change of variables gives
\begin{equation}\label{eqn:helmholtzGreensV2:2120}
\spacegrad^2 e^{j k \Abs{x – x’}} = \frac{d^2}{dr^2} e^{j k \Abs{r}}
\end{equation}

The function \( \Abs{r} \) formally has no derivative at the origin, but we may use the physics trick, rewriting the absolute in terms of the Heaviside theta function
\begin{equation}\label{eqn:helmholtzGreensV2:2340}
\Abs{r} = r \Theta(r) – r \Theta(-r).
\end{equation}
We then use the delta function identification for the derivative
\begin{equation}\label{eqn:helmholtzGreensV2:2360}
\Theta'(r) = \delta(r).
\end{equation}
In particular
\begin{equation}\label{eqn:helmholtzGreensV2:2380}
\begin{aligned}
\frac{d}{dr} \Abs{r}
&= \Theta(r) – \Theta(-r) + r \delta(r) – (-1)\delta(-r) \\
&= \Theta(r) – \Theta(-r) + 2 r \delta(r),
\end{aligned}
\end{equation}
using the symmetric property of the delta function \( \delta(-r) = \delta(r) \). The delta function contribution to this derivative is actually zero, as seen when we operate with \( r \delta(r) \) against a test function
\begin{equation}\label{eqn:helmholtzGreensV2:2400}
\begin{aligned}
\int r \delta(r) f(r) dr
&=
\evalbar{r f(r)}{r = 0} \\
&= 0.
\end{aligned}
\end{equation}
We’ve now found that
\begin{equation}\label{eqn:helmholtzGreensV2:2420}
\frac{d}{dr} \Abs{r} = \Theta(r) – \Theta(-r) = \mathrm{sgn}(r),
\end{equation}
the sign function. The derivative of the sign function is
\begin{equation}\label{eqn:helmholtzGreensV2:2440}
\begin{aligned}
\mathrm{sgn}'(r)
&= \lr{ \Theta(r) – \Theta(-r) }’ \\
&= \delta(r) -(-1)\delta(-r) \\
&= 2 \delta(r).
\end{aligned}
\end{equation}

The derivatives are
\begin{equation}\label{eqn:helmholtzGreensV2:2140}
\begin{aligned}
\frac{d}{dr} e^{j k \Abs{r} }
&=
j k e^{j k \Abs{r} } \frac{d\Abs{r}}{dr} \\
&=
j k e^{j k \Abs{r} } \mathrm{sgn}(r).
\end{aligned}
\end{equation}
and
\begin{equation}\label{eqn:helmholtzGreensV2:2160}
\frac{d^2}{dr^2} e{j k \Abs{r}}
=
\lr{ j k \mathrm{sgn}(r) }^2 e^{j k \Abs{r} } + 2 j k e^{j k \Abs{r} } \delta(r).
\end{equation}

We can identify \( e^{j k \Abs{r} } \delta(r) = \delta(r) \), just as we identified \( r \delta(r) = 0 \), by application to a test function. That is
\begin{equation}\label{eqn:helmholtzGreensV2:2180}
\begin{aligned}
\int e^{j k \Abs{r} } \delta(r) f(r) dr
&=
\evalbar{e^{j k \Abs{r} } f(r)}{r = 0} \\
&=
f(0) \\
&=
\int \delta(r) f(r) dr.
\end{aligned}
\end{equation}
With that identification
\begin{equation}\label{eqn:helmholtzGreensV2:2200}
\spacegrad^2 e^{j k \Abs{r} } = -k^2 e^{j k \Abs{r} } + 2 j k \delta(r),
\end{equation}
or
\begin{equation}\label{eqn:helmholtzGreensV2:2220}
\boxed{
\lr{ \spacegrad^2 + k^2 } \frac{e^{j k \Abs{x – x’} }}{2 j k} = \delta(x – x’).
}
\end{equation}

Verifying the Green’s function with convolution.

Avoiding the physics tricks, we may use a limiting argument to validate our Green’s function.

We first want to show that at points \( x’ \ne x \) the Helmholtz operator applied to the Green’s function is zero:
\begin{equation}\label{eqn:helmholtzGreensV2:1220}
\lr{ \spacegrad^2 + k^2} G(x,x’) = 0,
\end{equation}
Since we are avoiding the origin
\begin{equation}\label{eqn:helmholtzGreensV2:1240}
\lr{ k^2 + \frac{d^2}{dx^2} } e^{j k \Abs{x – x’}}.
\end{equation}
We expect that this will be zero. Making a change of variables \( r = x’ – x \), we want to evaluate
\begin{equation}\label{eqn:helmholtzGreensV2:1260}
\lr{ k^2 + \frac{d^2}{dr^2} } e^{j k \Abs{r}},
\end{equation}
assuming that we are omitting a neighbourhood around \( r = 0 \) where the absolute value causes trouble. For \( r > 0 \)
\begin{equation}\label{eqn:helmholtzGreensV2:1280}
\begin{aligned}
\frac{d}{dr} e^{j k \Abs{r}}
&= \frac{d}{dr} e^{j k r} \\
&= j k e^{j k r},
\end{aligned}
\end{equation}
and
\begin{equation}\label{eqn:helmholtzGreensV2:1300}
\begin{aligned}
\frac{d^2}{dr^2} e^{j k \Abs{r}}
&= \frac{d}{dr} j k e^{j k r} \\
&= (j k)^2 e^{j k r}.
\end{aligned}
\end{equation}
Similarly, for \( r < 0 \), we have
\begin{equation}\label{eqn:helmholtzGreensV2:1320}
\frac{d^2}{dr^2} e^{j k \Abs{r}} = (-jk)^2 e^{j k \Abs{r}}.
\end{equation}
In both cases, provided we are in a neighbourhood that omits \( r \ne 0 \), we have
\begin{equation}\label{eqn:helmholtzGreensV2:1340}
\lr{ k^2 + \frac{d^2}{dr^2} } e^{j k \Abs{r}} = 0,
\end{equation}
as desired.

The takeaway is that we have
\begin{equation}\label{eqn:helmholtzGreensV2:1360}
\begin{aligned}
\lr{ \spacegrad^2 + k^2 }\int_{-\infty}^\infty G(x, x’) V(x’) dx’
&=
\int_{\Abs{x’ – x} \le \epsilon} V(x’) \lr{ \frac{d^2}{d{x’}^2} + k^2 } G(x, x’) dx’ \\
&=
\int_{-\epsilon}^\epsilon V(x + r) \lr{ \frac{d^2}{dr^2} + k^2 } G(r) dr \\
\end{aligned}
\end{equation}
for some arbitrarily small value of \( \epsilon \). Observe that after bringing the operator into the integral, we also made a change of variables, first to \( x’ \) for the Laplacian, and then to \( r = x’ – x \).

We’d like the 1D equivalent of Green’s theorem to reduce this, so let’s work that out first.
\begin{equation}\label{eqn:helmholtzGreensV2:1380}
\begin{aligned}
\int dx\, v \frac{d^2 u}{dx^2} – \int dx\, u \frac{d^2 v}{dx^2}
&=
\int dx\,
\lr{
\frac{d}{dx} \lr{
v \frac{du}{dx}
}
– \frac{dv}{dx} \frac{du}{dx}
}

\int dx\,
\lr{
\frac{d}{dx} \lr{
u \frac{dv}{dx}
}

\frac{du}{dx} \frac{dv}{dx}
}
\\
&=
\int dx\,
\frac{d}{dx}
\lr{
v \frac{du}{dx}
}

\int dx\,
\frac{d}{dx} \lr{
u \frac{dv}{dx}
}
\\
&=
v \frac{du}{dx}

u \frac{dv}{dx},
\end{aligned}
\end{equation}
so
\begin{equation}\label{eqn:helmholtzGreensV2:1400}
\boxed{
\int_a^b dx\, v \frac{d^2 u}{dx^2}
=
\int_a^b dx\, u \frac{d^2 v}{dx^2}
+
\evalrange{v \frac{du}{dx}}{a}{b}

\evalrange{u \frac{dv}{dx}}{a}{b}.
}
\end{equation}

This gives us
\begin{equation}\label{eqn:helmholtzGreensV2:1420}
\begin{aligned}
\lr{ \spacegrad^2 + k^2 }\int_{\Abs{x’- x} \le \epsilon} e^{j k \Abs{x – x’}} V(x’) dx’
&=
\int_{-\epsilon}^\epsilon e^{j k \Abs{r}} \lr{ k^2 + \frac{d^2}{dr^2} } V(x + r) dr \\
&\quad +
\evalrange{ V(x + r) \frac{d}{dr} e^{j k \Abs{r}} }{-\epsilon}{\epsilon}

\evalrange{ e^{j k \Abs{r}} \frac{d}{dr} V(x+r) }{-\epsilon}{\epsilon}.
\end{aligned}
\end{equation}
If we can assume that \( V \) and it’s first and second derivatives are all continuous over this small interval, then the first integral is approximately
\begin{equation}\label{eqn:helmholtzGreensV2:1440}
\begin{aligned}
\int_{-\epsilon}^\epsilon e^{j k \Abs{r}} \lr{ k^2 + \frac{d^2}{dr^2} } V(x + r) dr
&\sim
\lr{ \lr{ k^2 + \frac{d^2}{dr^2} } V(x + r) }
\int_{-\epsilon}^\epsilon e^{j k \Abs{r}} dr \\
&=
\frac{2 j}{k} \lr{ 1 – e^{ j k \epsilon} }
\lr{ \lr{ k^2 + \frac{d^2}{dr^2} } V(x + r) } \\
&\rightarrow 0.
\end{aligned}
\end{equation}
Similarly, with \( dV/dr \) continuity condition, that last term is also zero. We are left, for \( \epsilon \) sufficiently small, we are left with
\begin{equation}\label{eqn:helmholtzGreensV2:1460}
\lr{ \spacegrad^2 + k^2 }\int_{\Abs{x’- x} \le \epsilon} e^{j k \Abs{x – x’}} V(x’) dx’
=
V(x)
\evalrange{ \frac{d}{dr} e^{j k \Abs{r}} }{-\epsilon}{\epsilon}.
\end{equation}
Because we are evaluating this derivative only at points \( r = \pm \epsilon \ne 0 \), that derivative is
\begin{equation}\label{eqn:helmholtzGreensV2:2460}
\frac{d}{dr} e^{j k \Abs{r}}
=
j k e^{j k \Abs{r}} \mathrm{sgn}(r),
\end{equation}
leaving us with
\begin{equation}\label{eqn:helmholtzGreensV2:2480}
\begin{aligned}
\evalrange{ \frac{d}{dr} e^{j k \Abs{r}} }{-\epsilon}{\epsilon}
&=
j k e^{j k \Abs{\epsilon}} \mathrm{sgn}(\epsilon) – j k e^{j k \Abs{-\epsilon}} \mathrm{sgn}(-\epsilon) \\
&=
j k e^{j k \Abs{\epsilon}} \lr{ 1 – (-1) } \\
2 j k e^{j k \Abs{\epsilon}}.
\end{aligned}
\end{equation}
or
\begin{equation}\label{eqn:helmholtzGreensV2:2500}
\lr{ \spacegrad^2 + k^2 }\int_{-\infty}^\infty e^{j k \Abs{x – x’} } V(x’) dx’
=
2 j k e^{j k \Abs{\epsilon}} V(x).
\end{equation}
Taking limits and dividing through by \( 2 j k \) proves the result.

1D Laplacian Green’s function.

Having blundered our way to what appears to be the correct Green’s function for the 1D Helmholtz operator, let’s further validate that by deriving the Green’s function for the 1D Laplacian. We should also be able to verify that it has the correct delta function semantics.

Expansion in series and taking the limit.

Expanding the Helmholtz Green’s function in series around \( k \Abs{r} \) we have
\begin{equation}\label{eqn:helmholtzGreensV2:1780}
\begin{aligned}
G(r)
&= -\frac{j}{2k} \lr{ 1 + j k \Abs{r} + O((k \Abs{r})^2) } \\
&= -\frac{j}{2} \lr{ \inv{k} + j \Abs{r} + \inv{k} O((k \Abs{r})^2) } \\
\end{aligned}
\end{equation}
This means that to first order in \( k \), we have
\begin{equation}\label{eqn:helmholtzGreensV2:1800}
G(r) + \frac{j}{2k} = \frac{\Abs{r}}{2}.
\end{equation}
As before, we are free to add constant terms to the Green’s function for the Laplacian, and we conclude that the 1D Green’s function for the Laplacian is
\begin{equation}\label{eqn:helmholtzGreensV2:1820}
\boxed{
G(r) = \frac{\Abs{r}}{2}.
}
\end{equation}

Alternatively, we may use the real sine form of the Green’s function, which has a nice expansion around \( k = 0 \), and arrive at the same result.

Observe that
\begin{equation}\label{eqn:helmholtzGreensV2:2520}
\frac{d^2}{dr^2} \frac{\Abs{r}}{2} =
\frac{d}{dr} \frac{\mathrm{sgn}(r)}{2} =
\delta(r),
\end{equation}
which verifies that this is a valid Green’s function for the 1D Laplacian.

Verifying the Green’s function with convolution.

We can also operate on the convolution with the Laplacian, to verify correctness. We are interested in evaluating
\begin{equation}\label{eqn:helmholtzGreensV2:1840}
\spacegrad^2 \int \frac{\Abs{x – x’}}{2} V(x’) dx’ = \int V(x + r) \frac{d^2}{dr^2} \frac{\Abs{r}}{2} dr.
\end{equation}
If all goes well, this should evaluate to \( V(x) \), indicating that \( \spacegrad^2 \Abs{x – x’}/2 = \delta(x – x’) \). As a first step, we expect \( \spacegrad^2 G = 0 \), for \( x \ne x’ \). Consider first \( r > 0 \), where
\begin{equation}\label{eqn:helmholtzGreensV2:1860}
\frac{d}{dr} \Abs{r}
=
\frac{d}{dr} r
= 1,
\end{equation}
and for \( r < 0 \) where
\begin{equation}\label{eqn:helmholtzGreensV2:1880}
\frac{d}{dr} \Abs{r}
=
\frac{d}{dr} (-r)
= -1.
\end{equation}
This means that, away from the origin \( d\Abs{r}/dr = \mathrm{sgn}(r) \), and \( d^2 \Abs{r}/dr^2 = 0\). We can conclude that, for some non-zero positive epsilon that we will eventually let approach zero, we have
\begin{equation}\label{eqn:helmholtzGreensV2:1900}
\begin{aligned}
\spacegrad^2 \int \frac{\Abs{x – x’}}{2} V(x’) dx’
&= \int_{-\epsilon}^\epsilon V(x + r) \frac{d^2}{dr^2} \frac{\Abs{r}}{2} dr \\
&= \int_{-\epsilon}^\epsilon \lr{
\frac{d}{dr} \lr{ V(x + r) \frac{d}{dr} \frac{\Abs{r}}{2} }
– \frac{dV(x + r)}{dr} \frac{d}{dr} \frac{\Abs{r}}{2}
}
dr \\
&=
\evalrange{ V(x + r) \frac{d}{dr} \frac{\Abs{r}}{2} }{-\epsilon}{\epsilon}
– \int_{-\epsilon}^\epsilon
\lr{
\frac{d}{dr} \lr{ \frac{dV(x + r)}{dr} \frac{\Abs{r}}{2} }

\frac{d^2V(x + r)}{dr^2} \frac{\Abs{r}}{2}
} dr \\
&=
\evalrange{ V(x + r) \frac{d}{dr} \frac{\Abs{r}}{2} }{-\epsilon}{\epsilon}
-\evalrange{ \frac{dV(x + r)}{dr} \frac{\Abs{r}}{2} }{-\epsilon}{\epsilon}
+
\int_{-\epsilon}^\epsilon \frac{d^2V(x + r)}{dr^2} \frac{\Abs{r}}{2} dr \\
&=
\inv{2} \lr{ V(x + \epsilon) + V(x – \epsilon) } \\
&-\quad \frac{\epsilon}{2}\lr{
\frac{dV(x + \epsilon)}{dr}

\frac{dV(x – \epsilon)}{dr}
} \\
&+
\frac{\epsilon^2}{2} \lr{
\frac{d^2V(x + \epsilon)}{dr^2}
+
\frac{d^2V(x + \epsilon)}{dr^2}
}.
\end{aligned}
\end{equation}
In the limit we have
\begin{equation}\label{eqn:helmholtzGreensV2:1920}
\boxed{
\spacegrad^2 \int G(x, x’) V(x’) dx’ = \inv{2} \lr{ V(x^+) + V(x^-) }.
}
\end{equation}

If the test (or driving) function is continuous at \( x’ = x \), then this is exactly the delta-function semantics that we expect of a Green’s function. It’s interesting that this check provides us with precise semantics for the Green’s function for discontinuous functions too.

A trilogy in five+ parts: Confirming an error in the derived 1D Helmholtz Green’s function.

September 24, 2025 math and physics play , , , , , , , ,

[Click here for a PDF version of this, and previous, posts in this series].

The discontinuity in the derived 1D Helmholtz Green’s function is somewhat surprising. Let’s try to verify that this works or find what does. The first thing to check is that
\begin{equation}\label{eqn:helmholtzGreens:1220}
\lr{ \spacegrad^2 + k^2} G(x,x’) = 0,
\end{equation}
at locations where \( x \ne x’ \). Since we are avoiding the origin (where the annoying sign function kicks in), means that we want to evaluate:
\begin{equation}\label{eqn:helmholtzGreens:1240}
\lr{ k^2 + \frac{d^2}{dx^2} } e^{j k \Abs{x – x’}},
\end{equation}
and expect that this will be zero. Let’s make a change of variables \( r = x’ – x \), and evaluate
\begin{equation}\label{eqn:helmholtzGreens:1260}
\lr{ k^2 + \frac{d^2}{dr^2} } e^{j k \Abs{r}},
\end{equation}
assuming that we are omitting a neighbourhood around \( r = 0 \) where the absolute value causes trouble. For \( r > 0 \)
\begin{equation}\label{eqn:helmholtzGreens:1280}
\begin{aligned}
\frac{d}{dr} e^{j k \Abs{r}}
&= \frac{d}{dr} e^{j k r} \\
&= j k e^{j k r},
\end{aligned}
\end{equation}
and
\begin{equation}\label{eqn:helmholtzGreens:1300}
\begin{aligned}
\frac{d^2}{dr^2} e^{j k \Abs{r}}
&= \frac{d}{dr} j k e^{j k r} \\
&= (j k)^2 e^{j k r}.
\end{aligned}
\end{equation}
Similarly, for \( r < 0 \), we have \begin{equation}\label{eqn:helmholtzGreens:1320} \frac{d^2}{dr^2} e^{j k \Abs{r}} = (-jk)^2 e^{j k \Abs{r}}. \end{equation} In both cases, provided we are in a neighbourhood that omits \( r \ne 0 \), we have \begin{equation}\label{eqn:helmholtzGreens:1340} \lr{ k^2 + \frac{d^2}{dr^2} } e^{j k \Abs{r}} = 0, \end{equation} as desired. The takeaway is that we have \begin{equation}\label{eqn:helmholtzGreens:1360} \begin{aligned} \lr{ \spacegrad^2 + k^2 }\int_{-\infty}^\infty G(x, x’) V(x’) dx’ &= \int_{\Abs{x’ – x} \le \epsilon} V(x’) \lr{ \frac{d^2}{d{x’}^2} + k^2 } G(x, x’) dx’ \\ &= \int_{-\epsilon}^\epsilon V(x + r) \lr{ \frac{d^2}{dr^2} + k^2 } G(r = x’ – x) dr \\ \end{aligned} \end{equation} for some arbitrarily small value of \( \epsilon \). Observe that after bringing the operator into the integral, we also made a change of variables, first to \( x’ \) for the Laplacian, and then to \( r = x’ – x \). We’d like the 1D equivalent of Green’s theorem to reduce this, so let’s work that out first. \begin{equation}\label{eqn:helmholtzGreens:1380} \begin{aligned} \int dx\, v \frac{d^2 u}{dx^2} – \int dx\, u \frac{d^2 v}{dx^2} &= \int dx\, \lr{ \frac{d}{dx} \lr{ v \frac{du}{dx} } – \frac{dv}{dx} \frac{du}{dx} } – \int dx\, \lr{ \frac{d}{dx} \lr{ u \frac{dv}{dx} } – \frac{du}{dx} \frac{dv}{dx} } \\ &= \int dx\, \frac{d}{dx} \lr{ v \frac{du}{dx} } – \int dx\, \frac{d}{dx} \lr{ u \frac{dv}{dx} } \\ &= v \frac{du}{dx} – u \frac{dv}{dx}, \end{aligned} \end{equation} so \begin{equation}\label{eqn:helmholtzGreens:1400} \boxed{ \int_a^b dx\, v \frac{d^2 u}{dx^2} = \int_a^b dx\, u \frac{d^2 v}{dx^2} + \evalrange{v \frac{du}{dx}}{a}{b} – \evalrange{u \frac{dv}{dx}}{a}{b}. } \end{equation} Let’s try applying that to the function \( G(r) = e^{j k \Abs{r} } \), and see what happens. That is \begin{equation}\label{eqn:helmholtzGreens:1420} \begin{aligned} \lr{ \spacegrad^2 + k^2 }\int_{\Abs{x’- x} \le \epsilon} e^{j k \Abs{x – x’}} V(x’) dx’ &= \int_{-\epsilon}^\epsilon e^{j k \Abs{r}} \lr{ k^2 + \frac{d^2}{dr^2} } V(x + r) dr \\ &\quad + \evalrange{ V(x + r) \frac{d}{dr} e^{j k \Abs{r}} }{-\epsilon}{\epsilon} – \evalrange{ e^{j k \Abs{r}} \frac{d}{dr} V(x+r) }{-\epsilon}{\epsilon}. \end{aligned} \end{equation} If we can assume that \( V \) and it’s first and second derivatives are all continuous over this small interval, then the first integral is approximately \begin{equation}\label{eqn:helmholtzGreens:1440} \begin{aligned} \int_{-\epsilon}^\epsilon e^{j k \Abs{r}} \lr{ k^2 + \frac{d^2}{dr^2} } V(x + r) dr &\sim \lr{ \lr{ k^2 + \frac{d^2}{dr^2} } V(x + r) } \int_{-\epsilon}^\epsilon e^{j k \Abs{r}} dr \\ &= \frac{2 j}{k} \lr{ 1 – e^{ j k \epsilon} } \lr{ \lr{ k^2 + \frac{d^2}{dr^2} } V(x + r) } \\ &\rightarrow 0. \end{aligned} \end{equation} Similarly, with \( dV/dr \) continuity condition, that last term is also zero. We are left, for \( \epsilon \) sufficiently small, we are left with \begin{equation}\label{eqn:helmholtzGreens:1460} \lr{ \spacegrad^2 + k^2 }\int_{\Abs{x’- x} \le \epsilon} e^{j k \Abs{x – x’}} V(x’) dx’ = V(x) \evalrange{ \frac{d}{dr} e^{j k \Abs{r}} }{-\epsilon}{\epsilon}. \end{equation} but this is an extremely problematic derivative around the origin. The core problem is evaluating \begin{equation}\label{eqn:helmholtzGreens:1480} \frac{d}{dr} e^{j k \Abs{r}} = j k e^{j k \Abs{r} } \frac{d\Abs{r}}{dr}. \end{equation} In conventional mathematics, we’d have to say that this is undefined at the origin. In physics, on the other hand, where we play fast and loose with the mathematics, we express the absolute value in terms of Heavyside theta functions \begin{equation}\label{eqn:helmholtzGreens:1500} \Abs{r} = r \Theta(r) – r \Theta(-r). \end{equation} We may now take derivatives \begin{equation}\label{eqn:helmholtzGreens:1520} \begin{aligned} \Abs{r}’ &= \Theta(r) – \Theta(-r) + r \delta(r) + r \delta(-r) \\ &= \mathrm{sgn}(r) + 2 r \delta(r). \end{aligned} \end{equation} Evaluating \( e^{j k \Abs{r} } \Abs{r}’ \) over the \( [-\epsilon, \epsilon] \) range, we have \begin{equation}\label{eqn:helmholtzGreens:1540} \begin{aligned} \evalrange{ e^{j k \Abs{r} } \Abs{r}’ }{-\epsilon}{\epsilon} &= e^{j k \epsilon} \lr{ \evalrange{ \mathrm{sgn}(r) + 2 r \delta(r) }{-\epsilon}{\epsilon} } \\ &= e^{j k \epsilon} \lr{ 2 + 2 \epsilon \delta(\epsilon) }. \end{aligned} \end{equation} Again, playing fast and loose, we evaluate this range before taking the limit, where \( \delta(\epsilon) = 0 \) for \( \epsilon > 0 \). We are left with
\begin{equation}\label{eqn:helmholtzGreens:1560}
\lim_{\epsilon \rightarrow 0} \lr{ \spacegrad^2 + k^2 }\int_{\Abs{x’- x} \le \epsilon} e^{j k \Abs{x – x’}} V(x’) dx’
=
2 j k V(x),
\end{equation}
provided \( V \) and its first and second derivatives are continuous.

Under those constraints, the implication is that one valid Green’s function for the 1D Helmholtz operator is
\begin{equation}\label{eqn:helmholtzGreens:1580}
G(r) = -\frac{j}{2k} e^{j k \Abs{r} }.
\end{equation}
The \( \mathrm{sgn}(r) \) scale factor that was part of the Green’s function that we derived using contour integration does not appear to be required.

What happens if we retain the sign function factor? Doing so, we have
\begin{equation}\label{eqn:helmholtzGreens:1600}
\begin{aligned}
\lr{ \spacegrad^2 + k^2 }\int_{\Abs{x’- x} \le \epsilon} \mathrm{sgn}(x – x’) e^{j k \Abs{x – x’}} V(x’) dx’
&=
-\int_{-\epsilon}^\epsilon \mathrm{sgn}(r) e^{j k \Abs{r}} \lr{ k^2 + \frac{d^2}{dr^2} } V(x + r) dr \\
&\quad

\evalrange{ V(x + r) \frac{d}{dr} \mathrm{sgn}(r) e^{j k \Abs{r}} }{-\epsilon}{\epsilon}
+
\evalrange{ \mathrm{sgn}(r) e^{j k \Abs{r}} \frac{d}{dr} V(x+r) }{-\epsilon}{\epsilon}.
\end{aligned}
\end{equation}
This time, we note that
\begin{equation}\label{eqn:helmholtzGreens:1620}
\int_{-\epsilon}^\epsilon \mathrm{sgn}(r) e^{j k \Abs{r}} dr = 0, \quad \forall \epsilon \ne 0,
\end{equation}
even without evaluating the limit. However, we have problems with the other two terms. The last term doesn’t zero out as desired, instead
\begin{equation}\label{eqn:helmholtzGreens:1640}
\evalrange{ \mathrm{sgn}(r) e^{j k \Abs{r}} \frac{d}{dr} V(x+r) }{-\epsilon}{\epsilon} \rightarrow 2 V'(x).
\end{equation}
To evaluate the \( V(x) \) factor, we write
\begin{equation}\label{eqn:helmholtzGreens:1660}
\mathrm{sgn}(r) = \Theta(r) – \Theta(-r),
\end{equation}
so
\begin{equation}\label{eqn:helmholtzGreens:1680}
\begin{aligned}
\mathrm{sgn}(r)’
&= \delta(r) + \delta(-r) \\
&= 2 \delta(r).
\end{aligned}
\end{equation}
That means that
\begin{equation}\label{eqn:helmholtzGreens:1700}
\begin{aligned}
\frac{d}{dr} \lr{ \mathrm{sgn}(r) e^{j k \Abs{r}} }
&=
2 \delta(r) e^{j k \Abs{r}} + j k \mathrm{sgn}(r) e^{j k \Abs{r}} \lr{ \mathrm{sgn}(r) + 2 r \delta(r) } \\
&=
e^{j k \Abs{r}} \lr{ 2 \delta(r) + j k \lr{ 1 + 2 r \mathrm{sgn}(r) \delta(r)} } \\
&=
j k e^{j k \Abs{r}},
\end{aligned}
\end{equation}
for \( r \ne 0 \), so
\begin{equation}\label{eqn:helmholtzGreens:1760}

\evalrange{ V(x + r) \frac{d}{dr} \mathrm{sgn}(r) e^{j k \Abs{r}} }{-\epsilon}{\epsilon}
\rightarrow V(x) j k \lr{ e^{j k \epsilon} – e^{j k \epsilon} } = 0.
\end{equation}

All in, we are left with
\begin{equation}\label{eqn:helmholtzGreens:1720}
\lim_{\epsilon \rightarrow 0} \lr{ \spacegrad^2 + k^2 }\int_{\Abs{x’- x} \le \epsilon} \frac{-j}{2k} \mathrm{sgn}(x – x’) e^{j k \Abs{x – x’}} V(x’) dx’
= -\frac{j}{k} V'(x),
\end{equation}
but for a Green’s function, we expected just \( V(x) \).

It seems that the sign factor in the contour integration result is definitively wrong. That result was
\begin{equation}\label{eqn:helmholtzGreens:300b}
G(u) = -\frac{j \mathrm{sgn}(u)}{2k} e^{j k \Abs{u}},
\end{equation}
but what we really want is
\begin{equation}\label{eqn:helmholtzGreens:1740}
\boxed{
G(u) = -\frac{j}{2k} e^{j k \Abs{u}}.
}
\end{equation}

Unfortunately, I don’t see any errors in the original contour integration, so I’m at a loss where things went wrong.

Part 2. 3D Green’s function for the Helmholtz (wave equation) operator

September 20, 2025 math and physics play , , , , , , , ,

[Click here for a PDF version of this post]

This is a continuation of yesterday’s post on wave function Green’s functions. We derived the 1D Green’s function, now it’s time for the 3D.

Next up after this will be the 2D Green’s function, which looks harder to evaluate than the 1D or 3D versions.

3D Green’s function.

The 3D Green’s function that we wish to try to evaluate is
\begin{equation}\label{eqn:helmholtzGreens:540}
G(\Br) = -\inv{(2 \pi)^3} \int \frac{e^{j \Bp \cdot \Br}}{\Bp^2 – k^2} d^3 p.
\end{equation}
We will have to displace the pole again, but we will get to that in a bit. First let’s make a spherical change of variables to evaluate the integral, with
\begin{equation}\label{eqn:helmholtzGreens:560}
\begin{aligned}
\Bp &= p \lr{ \sin\alpha \cos\phi, \sin\alpha \sin\phi, \cos\alpha } \\
\Br &= \Abs{\Br} \Be_3.
\end{aligned}
\end{equation}
This gives
\begin{equation}\label{eqn:helmholtzGreens:580}
G(\Br)
= -\inv{(2 \pi)^3} \int_0^\infty p^2 dp \int_0^\pi \sin\alpha d\alpha \int_0^{2 \pi} d\phi \frac{e^{j p \Abs{\Br} \cos\alpha}}{p^2 – k^2}.
\end{equation}
Let \( t = \cos\alpha \), to find
\begin{equation}\label{eqn:helmholtzGreens:600}
\begin{aligned}
G(\Br)
&= -\inv{(2 \pi)^2} \int_0^\infty p^2 dp \int_1^{-1} (-dt) \frac{e^{j p \Abs{\Br} t}}{p^2 – k^2} \\
&= \inv{(2 \pi)^2} \int_0^\infty p^2 dp \evalrange{\frac{e^{j p \Abs{\Br} t}}{\lr{p^2 – k^2} j p \Abs{\Br}}}{1}{-1} \\
&= \inv{j (2 \pi)^2 \Abs{\Br}} \int_0^\infty p dp \frac{e^{-j p \Abs{\Br}} – e^{j p \Abs{\Br}} }{p^2 – k^2} \\
&= -\inv{j (2 \pi)^2 \Abs{\Br}} \int_{-\infty}^\infty p dp \frac{e^{j p \Abs{\Br}} }{p^2 – k^2} \\
&\sim -\inv{j (2 \pi)^2 \Abs{\Br}} \int_{-\infty}^\infty p dp \frac{e^{j p \Abs{\Br}} }{p^2 – \lr{k + j \epsilon}^2}.
\end{aligned}
\end{equation}
In the last step, we’ve displaced the pole so that we can evaluate it using an infinite upper half plane semicircular contour, as illustrated in fig 3.

fig 3. Contours for 3D Green’s function evaluation

Which pole we choose depends on the sign we pick for the “small” pole displacement \( \epsilon \). For the \( \epsilon > 0 \) case, we find
\begin{equation}\label{eqn:helmholtzGreens:620}
\begin{aligned}
G(\Br)
&= -\inv{j (2 \pi)^2 \Abs{\Br}} \int_{-\infty}^\infty p dp \frac{e^{j p \Abs{\Br}} }{\lr{p – (k + j \epsilon)}\lr{p – (-k – j \epsilon)}} \\
&= -\frac{2 \pi j}{j (2 \pi)^2 \Abs{\Br}} \evalbar{\frac{p e^{j p \Abs{\Br}} }{p + k + j \epsilon}}{p = k + j \epsilon} \\
&= -\frac{1}{2 \pi \Abs{\Br}} (k + j \epsilon) \frac{e^{j (k + j \epsilon) \Abs{\Br}} }{2 (k + j \epsilon)} \\
&= -\frac{1}{4 \pi \Abs{\Br}} e^{j k \Abs{\Br}} e^{-\epsilon \Abs{\Br}} \\
&\rightarrow -\frac{e^{j k \Abs{\Br}} }{4 \pi \Abs{\Br}}.
\end{aligned}
\end{equation}
whereas for \( \epsilon < 0 \), we have
\begin{equation}\label{eqn:helmholtzGreens:640}
\begin{aligned}
G(\Br)
&= -\inv{j (2 \pi)^2 \Abs{\Br}} \int_{-\infty}^\infty p dp \frac{e^{j p \Abs{\Br}} }{\lr{p – (k + j \epsilon)}\lr{p – (-k – j \epsilon)}} \\
&= -\frac{2 \pi j}{j (2 \pi)^2 \Abs{\Br}} \evalbar{\frac{p e^{j p \Abs{\Br}} }{p – k – j \epsilon}}{p = -k – j \epsilon} \\
&= -\frac{1}{2 \pi \Abs{\Br}} (-k – j \epsilon) \frac{e^{j (-k – j \epsilon) \Abs{\Br}} }{2 (-k – j \epsilon)} \\
&= -\frac{1}{4 \pi \Abs{\Br}} e^{-j k \Abs{\Br}} e^{\epsilon \Abs{\Br}} \\
&\rightarrow -\frac{e^{-j k \Abs{\Br}} }{4 \pi \Abs{\Br}}.
\end{aligned}
\end{equation}

The Green’s function has the structure of either an outgoing or incoming spherical wave, with inverse radial amplitude:
\begin{equation}\label{eqn:helmholtzGreens:660}
\boxed{
G(\Bx, \Bx’) = -\frac{e^{\pm j k \Abs{\Br}} }{4 \pi \Abs{\Br}}.
}
\end{equation}

Exploring 0^0, x^x, and z^z.

May 10, 2020 math and physics play , , , , , , ,

My Youtube home page knows that I’m geeky enough to watch math videos.  Today it suggested Eddie Woo’s video about \(0^0\).

Mr Woo, who has great enthusiasm, and must be an awesome teacher to have in person.  He reminds his class about the exponent laws, which allow for an interpretation that \(0^0\) would be equal to 1.  He points out that \(0^n = 0\) for any positive integer, which admits a second contradictory value for \( 0^0 \), if this was true for \(n=0\) too.

When reviewing the exponent laws Woo points out that the exponent law for subtraction \( a^{n-n} \) requires \(a\) to be non-zero.  Given that restriction, we really ought to have no expectation that \(0^{n-n} = 1\).

To attempt to determine a reasonable value for this question, resolving the two contradictory possibilities, neither of which we actually have any reason to assume are valid possibilities, he asks the class to perform a proof by calculator, computing a limit table for \( x \rightarrow 0+ \). I stopped at that point and tried it by myself, constructing such a table in Mathematica. Here is what I used

griddisp[labelc1_, labelc2_, f_, values_] := Grid[({
({{labelc1}, values}) // Flatten,
({ {labelc2}, f[#] & /@ values} ) // Flatten
}) // Transpose,
Frame -> All]
decimalFractions[n_] := ((10^(-#)) & /@ Range[n])
With[{m = 10}, griddisp[x, x^x, #^# &, N[decimalFractions[m], 10]]]
With[{m = 10}, griddisp[x, x^x, #^# &, -N[decimalFractions[m], 10]]]

Observe that I calculated the limits from both above and below. The results are

and for the negative limit

Sure enough, from both below and above, we see numerically that \(\lim_{\epsilon\rightarrow 0} \epsilon^\epsilon = 1\), as if the exponent law argument for \( 0^0 = 1 \) was actually valid.  We see that this limit appears to be valid despite the fact that \( x^x \) can be complex valued — that is ignoring the fact that a rigorous limit argument should be valid for any path neighbourhood of \( x = 0 \) and not just along two specific (real valued) paths.

Let’s get a better idea where the imaginary component of \((-x)^{-x}\) comes from.  To do so, consider \( f(z) = z^z \) for complex values of \( z \) where \( z = r e^{i \theta} \). The logarithm of such a beast is

\begin{equation}\label{eqn:xtox:20}
\begin{aligned}
\ln z^z
&= z \ln \lr{ r e^{i\theta} } \\
&= z \ln r + i \theta z \\
&= e^{i\theta} \ln r^r + i \theta z \\
&= \lr{ \cos\theta + i \sin\theta } \ln r^r + i r \theta \lr{ \cos\theta + i \sin\theta } \\
&= \cos\theta \ln r^r – r \theta \sin\theta
+ i r \lr{ \sin\theta \ln r + \theta \cos\theta },
\end{aligned}
\end{equation}
so
\begin{equation}\label{eqn:xtox:40}
z^z =
e^{ r \lr{ \cos\theta \ln r – \theta \sin\theta}} \times
e^{i r \lr{ \sin\theta \ln r + \theta \cos\theta }}.
\end{equation}
In particular, picking the \( \theta = \pi \) branch, we have, for any \( x > 0 \)
\begin{equation}\label{eqn:xtox:60}
(-x)^{-x} = e^{-x \ln x – i x \pi } = \frac{e^{ – i x \pi }}{x^x}.
\end{equation}

Let’s get some visual appreciation for this interesting \(z^z\) beastie, first plotting it for real values of \(z\)


Manipulate[
Plot[ {Re[x^x], Im[x^x]}, {x, -r, r}
, PlotRange -> {{-r, r}, {-r^r, r^r}}
, PlotLegends -> {Re[x^x], Im[x^x]}
], {{r, 2.25}, 0.0000001, 10}]

From this display, we see that the imaginary part of \( x^x \) is zero for integer values of \( x \).  That’s easy enough to verify explicitly: \( (-1)^{-1} = -1, (-2)^{-2} = 1/4, (-3)^{-3} = -1/27, \cdots \).

The newest version of Mathematica has a few nice new complex number visualization options.  Here’s two that I found illuminating, an absolute value plot that highlights the poles and zeros, also showing some of the phase action:

Manipulate[
ComplexPlot[ x^x, {x, s (-1 – I), s (1 + I)},
PlotLegends -> Automatic, ColorFunction -> "GlobalAbs"], {{s, 4},
0.00001, 10}]

We see the branch cut nicely, the tendency to zero in the left half plane, as well as some of the phase periodicity in the regions that are in the intermediate regions between the zeros and the poles.  We can also plot just the phase, which shows its interesting periodic nature


Manipulate[
ComplexPlot[ x^x, {x, s (-1 – I), s (1 + I)},
PlotLegends -> Automatic, ColorFunction -> "CyclicArg"], {{s, 6},
0.00001, 10}]

I’d like to take the time to play with some of the other ComplexPlot ColorFunction options, which appears to be a powerful and flexible visualization tool.