[Click here for a PDF version of this (and previous) post]
Having had trouble verifying the 2D Green’s function, let’s try deriving them ourselves.
Setup.
Let’s try solving the forced wave equation
\begin{equation}\label{eqn:waveEquationGreens:860}
\lr{ \spacegrad^2 – \inv{c^2}\frac{\partial^2}{\partial t^2} } f(x,t) = g(x,t),
\end{equation}
using Fourier transform pairs
\begin{equation}\label{eqn:waveEquationGreens:880}
\begin{aligned}
F(\Bx, t) &= \inv{\lr{\sqrt{2 \pi}}^{N+1}} \int e^{j \Bk \cdot \Bx + j \omega t} \hat{F}(\Bk, \omega) d^N \Bk d\omega \\
\hat{F}(\Bk, \omega) &= \inv{\lr{\sqrt{2 \pi}}^{N+1}} \int e^{-j \Bk \cdot \Bx – j \omega t} F(\Bx, t) d^N \Bx dt.
\end{aligned}
\end{equation}
We can now transform \ref{eqn:waveEquationGreens:860}, expressing \(f, g\) in terms of their transforms
\begin{equation}\label{eqn:waveEquationGreens:900}
\lr{ \lr{ j \Bk}^2 – \lr{ j \omega }^2/c^2 } \hat{f} = \hat{g},
\end{equation}
or
\begin{equation}\label{eqn:waveEquationGreens:920}
\hat{f} = \frac{\hat{g}}{(\omega/c)^2 – \Bk^2},
\end{equation}
or
\begin{equation}\label{eqn:waveEquationGreens:940}
\begin{aligned}
f(\Bx, t)
&= \inv{\lr{\sqrt{2 \pi}}^{N+1}} \int e^{j \Bk \cdot \Bx + j \omega t} \frac{\hat{g}(\Bk, \omega)}{(\omega/c)^2 – \Bk^2} d^N \Bk d\omega \\
&= \inv{\lr{2 \pi}^{N+1}} \int e^{j \Bk \cdot \Bx + j \omega t} \frac{g(\Bx’, t’)}{(\omega/c)^2 – \Bk^2} d^N \Bk d\omega e^{-j \Bk \cdot \Bx’ – j \omega t’} d^N \Bx’ dt’ \\
&=
\int d^N \Bx’ dt’ g(\Bx’, t’) G(\Bx, \Bx’, t, t’),
\end{aligned}
\end{equation}
where
\begin{equation}\label{eqn:waveEquationGreens:960}
G(\Bx, \Bx’, t, t’)
=
\inv{\lr{2 \pi}^{N+1}} \int d^N \Bk d\omega \frac{e^{j \Bk \cdot (\Bx-\Bx’) + j \omega (t- t’)}}{(\omega/c)^2 – \Bk^2}.
\end{equation}
Evaluating the 1D Green’s function
For the 1D case we have
\begin{equation}\label{eqn:waveEquationGreens:980}
G(\Bx, \Bx’, t, t’)
=
\inv{\lr{2 \pi}^2} \int dk d\omega \frac{e^{j k (x-x’) + j \omega (t- t’)}}{(\omega/c)^2 – k^2}
\end{equation}
Let’s write \( u = x – x’ \), and \( \tau = t – t’ \), and displace the poles by an imaginary offset \( j \epsilon \)
\begin{equation}\label{eqn:waveEquationGreens:1000}
G_\epsilon(u, \tau)
=
-\inv{\lr{2 \pi}^2} \int dk d\omega \frac{e^{j k u + j \omega \tau }}{\lr{ k – \lr{ \omega/c + j \epsilon}}\lr{ k + \lr{ \omega/c + j \epsilon }}}.
\end{equation}
Let’s start by assuming that \( \epsilon > 0 \). When \( u > 0 \), we can use a upper half plane contour in the k-plane, enclosing \( \omega/c + j \epsilon \), to find
\begin{equation}\label{eqn:waveEquationGreens:1020}
\begin{aligned}
G_\epsilon(u, \tau)
&=
-\frac{2 \pi j}{\lr{2 \pi}^2} \int d\omega \evalbar{\frac{e^{j k u + j \omega \tau }}{k + \lr{ \omega/c + j \epsilon }}}{k = \omega/c + j \epsilon} \\
&=
\frac{1}{4 \pi j} \int d\omega \frac{e^{j \omega (\tau + u/c)}}{\omega/c + j \epsilon }.
\end{aligned}
\end{equation}
However, for \( u < 0 \) we need the lower half plane contour that encloses \( -\omega/c - j \epsilon \). Our residue calculation is
\begin{equation}\label{eqn:waveEquationGreens:1040}
\begin{aligned}
G_\epsilon(u, \tau)
&=
-\frac{-2 \pi j}{\lr{2 \pi}^2} \int d\omega \evalbar{\frac{e^{j k u + j \omega \tau }}{k - \lr{ \omega/c + j \epsilon }}}{k = -\omega/c - j \epsilon} \\
&=
\frac{1}{4 \pi j} \int d\omega \frac{e^{j \omega (\tau - u/c)}}{\omega/c + j \epsilon }.
\end{aligned}
\end{equation}
Merging the two cases, we have
\begin{equation}\label{eqn:waveEquationGreens:1060}
\begin{aligned}
G_\epsilon(u, \tau)
&=
\frac{1}{4 \pi j} \int d\omega \frac{e^{j \omega (\tau + \Abs{u}/c)}}{\omega/c + j \epsilon } \\
&=
\frac{c}{4 \pi j} \int d\omega \frac{e^{j \omega (\tau + \Abs{u}/c)}}{\omega + j \epsilon c } \\
\end{aligned}
\end{equation}
This can be integrated in the \(\omega\)-plane, with the pole at \( -j \epsilon c \). For \( \tau + \Abs{u}/c > 0 \), we need an upper half plane infinite semicircular contour, but have no enclosed pole. For \( \tau + \Abs{u}/c < 0 \), we have
\begin{equation}\label{eqn:waveEquationGreens:1080}
\begin{aligned}
G_\epsilon(u, \tau)
&=
\frac{c (-2 \pi j)}{4 \pi j} \evalbar{ e^{j \omega (\tau + \Abs{u}/c)}}{\omega = -j \epsilon c} \\
&=
-\frac{c}{2},
\end{aligned}
\end{equation}
(in the limit.)
Putting both pieces together, we have found the advanced Green's function for the 1D wave equation
\begin{equation}\label{eqn:waveEquationGreens:1100}
\boxed{
G(u, \tau) = -\frac{c}{2} \Theta(-\tau - \Abs{u}/c).
}
\end{equation}
Having found the advanced solution with a positive pole displacement, it is reasonable to assume that we will get the retarded solution, with a negative pole displacement \( \epsilon < 0 \). This time, the upper half plane infinite semicircular contour encloses the \( -\omega/c -j \epsilon \) pole, and the lower half plane contour encloses the \( \omega/c + j \epsilon \) pole. This gives, us, for \( u > 0 \)
\begin{equation}\label{eqn:waveEquationGreens:1120}
\begin{aligned}
G_\epsilon(u, \tau)
&=
-\frac{2 \pi j}{\lr{2 \pi}^2} \int d\omega \evalbar{\frac{e^{j k u + j \omega \tau }}{k – \lr{ \omega/c + j \epsilon }}}{k = -\omega/c – j \epsilon} \\
&=
-\frac{1}{4 \pi j} \int d\omega \frac{e^{j \omega (\tau – u/c)}}{\omega/c + j \epsilon } \\
&=
-\frac{c}{4 \pi j} \int d\omega \frac{e^{j \omega (\tau – u/c)}}{\omega – (-j \epsilon c) } \\
&=
-\frac{2 \pi j c}{4 \pi j} \evalbar{e^{j \omega (\tau – u/c)}}{\omega = -j \epsilon c } \Theta(\tau – u/c) \\
&=
-\frac{c}{2} \Theta(\tau – u/c),
\end{aligned}
\end{equation}
and for \( u < 0 \)
\begin{equation}\label{eqn:waveEquationGreens:1140}
\begin{aligned}
G_\epsilon(u, \tau)
&=
-\frac{-2 \pi j}{\lr{2 \pi}^2} \int d\omega \evalbar{\frac{e^{j k u + j \omega \tau }}{k + \lr{ \omega/c + j \epsilon }}}{k = \omega/c + j \epsilon} \\
&=
\frac{1}{4 \pi j} \int d\omega \frac{e^{j \omega (\tau + u/c)}}{\omega/c + j \epsilon } \\
&=
\frac{c}{4 \pi j} \int d\omega \frac{e^{j \omega (\tau + u/c)}}{\omega - (-j \epsilon c) } \\
&=
-\frac{-2 \pi j c}{4 \pi j} \evalbar{e^{j \omega (\tau + u/c)}}{\omega = -j \epsilon c } \Theta(\tau + u/c) \\
&=
-\frac{c}{2} \Theta(\tau + u/c).
\end{aligned}
\end{equation}
Combining the two cases, we've found the retarded solution
\begin{equation}\label{eqn:waveEquationGreens:1160}
\boxed{
G(u, \tau) = -\frac{c}{2} \Theta(\tau - \Abs{u}/c).
}
\end{equation}
This matches Grok's claim (which we also verified.)
The convolution integrals.
Let’s write out the convolution integrals for fun. They are
\begin{equation}\label{eqn:waveEquationGreens:1180}
f(x,t) = -\frac{c}{2}
\int_{-\infty}^\infty dt’
\int_{-\infty}^\infty dx’
\Theta(\pm(t – t’) – \Abs{x – x’}/c) g(x’, t’).
\end{equation}
For the retarded case, we need only evaluate the step over the region
\begin{equation}\label{eqn:waveEquationGreens:1220}
t – t’ – \Abs{x – x’}/c > 0,
\end{equation}
or
\begin{equation}\label{eqn:waveEquationGreens:1240}
t – \Abs{x – x’}/c > t’.
\end{equation}
For the advanced case, we want the restriction
\begin{equation}\label{eqn:waveEquationGreens:1260}
-t + t’ – \Abs{x – x’}/c > 0,
\end{equation}
or
\begin{equation}\label{eqn:waveEquationGreens:1280}
t’ > t + \Abs{x – x’}/c,
\end{equation}
so the retarded convolution is
\begin{equation}\label{eqn:waveEquationGreens:1300}
f(x,t) = -\frac{c}{2}
\int_{-\infty}^\infty dx’
\int_{-\infty}^{t – \Abs{x – x’}/c} dt’
g(x’, t’),
\end{equation}
and the advanced convolution is
\begin{equation}\label{eqn:waveEquationGreens:1320}
f(x,t) = -\frac{c}{2}
\int_{-\infty}^\infty dx’
\int_{t + \Abs{x – x’}/c}^\infty dt’
g(x’, t’).
\end{equation}
TODO.
Next up will be an attempt to find the 2D Green’s function, and then for good measure, we should try to find the 3D case ourselves.