1D

Deriving the Green’s functions for the 1D wave equation.

October 13, 2025 math and physics play , , , , , , , , ,

[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.

1D SHO linear superposition that maximizes expectation

October 7, 2015 phy1520 , , , , , ,

[Click here for a PDF of this post with nicer formatting]

Question: 1D SHO linear superposition that maximizes expectation ([1] pr. 2.17)

For a 1D SHO

(a)

Construct a linear combination of \( \ket{0}, \ket{1} \) that maximizes \( \expectation{x} \) without using wave functions.

(b)

How does this state evolve with time?

(c)

Evaluate \( \expectation{x} \) using the Schrodinger picture.

(d)

Evaluate \( \expectation{x} \) using the Heisenberg picture.

(e)

Evaluate \( \expectation{(\Delta x)^2} \).

Answer

(a)

Forming

\begin{equation}\label{eqn:shoSuperposition:20}
\ket{\psi} = \frac{\ket{0} + \sigma \ket{1}}{\sqrt{1 + \Abs{\sigma}^2}}
\end{equation}

the position expectation is

\begin{equation}\label{eqn:shoSuperposition:40}
\bra{\psi} x \ket{\psi}
=
\inv{1 + \Abs{\sigma}^2} \lr{ \bra{0} + \sigma^\conj \bra{1} } \frac{x_0}{\sqrt{2}} \lr{ a^\dagger + a } \lr{ \ket{0} + \sigma \ket{1} }.
\end{equation}

Evaluating the action of the operators on the kets, we’ve got

\begin{equation}\label{eqn:shoSuperposition:60}
\lr{ a^\dagger + a } \lr{ \ket{0} + \sigma \ket{1} }
=
\ket{1} + \sqrt{2} \sigma \ket{2} + \sigma \ket{0}.
\end{equation}

The \( \ket{2} \) term is killed by the bras, leaving

\begin{equation}\label{eqn:shoSuperposition:80}
\begin{aligned}
\expectation{x}
&=
\inv{1 + \Abs{\sigma}^2} \frac{x_0}{\sqrt{2}} \lr{ \sigma + \sigma^\conj} \\
&=
\frac{\sqrt{2} x_0 \textrm{Re} \sigma}{1 + \Abs{\sigma}^2}.
\end{aligned}
\end{equation}

Any imaginary component in \( \sigma \) will reduce the expectation, so we are constrained to picking a real value.

The derivative of

\begin{equation}\label{eqn:shoSuperposition:100}
f(\sigma) = \frac{\sigma}{1 + \sigma^2},
\end{equation}

is

\begin{equation}\label{eqn:shoSuperposition:120}
f'(\sigma) = \frac{1 – \sigma^2}{(1 + \sigma^2)^2}.
\end{equation}

That has zeros at \( \sigma = \pm 1 \). The second derivative is

\begin{equation}\label{eqn:shoSuperposition:140}
f”(\sigma) = \frac{-2 \sigma (3 – \sigma^2)}{(1 + \sigma^2)^3}.
\end{equation}

That will be negative (maximum for the extreme value) at \( \sigma = 1 \), so the linear superposition of these first two energy eigenkets that maximizes the position expectation is

\begin{equation}\label{eqn:shoSuperposition:160}
\psi = \inv{\sqrt{2}}\lr{ \ket{0} + \ket{1} }.
\end{equation}

That maximized position expectation is

\begin{equation}\label{eqn:shoSuperposition:180}
\expectation{x}
=
\frac{x_0}{\sqrt{2}}.
\end{equation}

(b)

The time evolution is given by

\begin{equation}\label{eqn:shoSuperposition:200}
\begin{aligned}
\ket{\Psi(t)}
&= e^{-iH t/\Hbar} \inv{\sqrt{2}}\lr{ \ket{0} + \ket{1} } \\
&= \inv{\sqrt{2}}\lr{ e^{-i(0+ \ifrac{1}{2})\Hbar \omega t/\Hbar} \ket{0} +
e^{-i(1+ \ifrac{1}{2})\Hbar \omega t/\Hbar} \ket{1} } \\
&= \inv{\sqrt{2}}\lr{ e^{-i \omega t/2} \ket{0} + e^{-3 i \omega t/2} \ket{1} }.
\end{aligned}
\end{equation}

(c)

The position expectation in the Schrodinger representation is

\begin{equation}\label{eqn:shoSuperposition:220}
\begin{aligned}
\expectation{x(t)}
&=
\inv{2}
\lr{ e^{i \omega t/2} \bra{0} + e^{3 i \omega t/2} \bra{1} } \frac{x_0}{\sqrt{2}} \lr{ a^\dagger + a }
\lr{ e^{-i \omega t/2} \ket{0} + e^{-3 i \omega t/2} \ket{1} } \\
&=
\frac{x_0}{2\sqrt{2}}
\lr{ e^{i \omega t/2} \bra{0} + e^{3 i \omega t/2} \bra{1} }
\lr{ e^{-i \omega t/2} \ket{1} + e^{-3 i \omega t/2} \sqrt{2} \ket{2} + e^{-3 i \omega t/2} \ket{0} } \\
&=
\frac{x_0}{\sqrt{2}} \cos(\omega t).
\end{aligned}
\end{equation}

(d)

\begin{equation}\label{eqn:shoSuperposition:240}
\begin{aligned}
\expectation{x(t)}
&=
\inv{2}
\lr{ \bra{0} + \bra{1} } \frac{x_0}{\sqrt{2}}
\lr{ a^\dagger e^{i\omega t} + a e^{-i \omega t} }
\lr{ \ket{0} + \ket{1} } \\
&=
\frac{x_0}{2 \sqrt{2}}
\lr{ \bra{0} + \bra{1} }
\lr{ e^{i\omega t} \ket{1} + \sqrt{2} e^{i\omega t} \ket{2} + e^{-i \omega t} \ket{0} } \\
&=
\frac{x_0}{\sqrt{2}} \cos(\omega t),
\end{aligned}
\end{equation}

matching the calculation using the Schrodinger picture.

(e)

Let’s use the Heisenberg picture for the uncertainty calculation. Using the calculation above we have

\begin{equation}\label{eqn:shoSuperposition:260}
\begin{aligned}
\expectation{x^2}
&=
\inv{2} \frac{x_0^2}{2}
\lr{ e^{-i\omega t} \bra{1} + \sqrt{2} e^{-i\omega t} \bra{2} + e^{i \omega t} \bra{0} }
\lr{ e^{i\omega t} \ket{1} + \sqrt{2} e^{i\omega t} \ket{2} + e^{-i \omega t} \ket{0} } \\
&=
\frac{x_0^2}{4} \lr{ 1 + 2 + 1} \\
&=
x_0^2.
\end{aligned}
\end{equation}

The uncertainty is
\begin{equation}\label{eqn:shoSuperposition:280}
\begin{aligned}
\expectation{(\Delta x)^2}
&=
\expectation{x^2} – \expectation{x}^2 \\
&=
x_0^2 – \frac{x_0^2}{2} \cos^2(\omega t) \\
&=
\frac{x_0^2}{2} \lr{ 2 – \cos^2(\omega t) } \\
&=
\frac{x_0^2}{2} \lr{ 1 + \sin^2(\omega t) }
\end{aligned}
\end{equation}

References

[1] Jun John Sakurai and Jim J Napolitano. Modern quantum mechanics. Pearson Higher Ed, 2014.