% vim: tw=50
% 28/11/2022 10AM

\subsection{Forced heat (diffusion) equation}

Consider
\[ \pfrac{}{t} \theta(x, t) - D \pfrac[2]{}{x}
\theta(x, t) = f(x, t) \tag{10.6} \]
with homogeneous boundary conditions $\theta(x, 0)
= 0$. Construct a 2D Green's function $G(x, t;
\xi, \tau)$ such that
\[ \pfrac{G}{t} - D \pfrac[2]{G}{x} = \delta(x,
\xi) \delta(t - \tau) \tag{10.7} \]
with $G(x, 0; \xi, \tau) = 0$. Take Fourier
Transform with respect to $x$ using (8.23)
\[ \pfrac{\tilde{G}}{t} + Dk^2 \tilde{G} =
e^{-ik\xi} \delta(t - \tau) \]
Using multiplicative factor $e^{Dk^2 t}$
\[ \pfrac{}{t} [e^{Dk^2t} \tilde{G}] = e^{ik\xi +
Dk^2 t} \delta(t - \tau) \]
Integrate with respect to $t$ using $G = 0$, at $t
= 0$
\begin{align*}
    e^{Dk^2 t} \tilde{G}
    &= e^{-ik\xi} \int_0^t e^{Dk^2 t'} \delta(t' -
    \tau) \dd t'
    &&\text{by (6.7)} \\
    &= e^{-ik\xi} e^{Dk^2 \tau} H(t - \tau)
\end{align*}
\[ G(x, t; \xi, \tau) = H(t - \tau) e^{-ik\xi}
e^{-Dk^2(t - \tau)} \]
So inverting we get Green's function
\begin{align*}
    G(x, t; \xi, \tau)
    &= \frac{H(t - \tau)}{2\pi}
    \int_{-\infty}^\infty e^{-k(x - \xi)} e^{-Dk^2
    (t - \tau)} \dd k \\
    &= \frac{H(t')}{2\pi} \int_{-\infty}^\infty
    e^{ikx'} e^{-D k^2 t'} \dd k
    &&t' = t - \tau, x' = x - \xi \\
    &= \frac{H(t')}{\sqrt{4\pi Dt'}} e^{-x^2/4Dt'}
    &&\text{see section 8.1} \\
    &= H(t - \tau) S_d(x - \xi), t - \tau)
    \tag{10.8}
\end{align*}
where $S_d$ is the fundamental solution (10.3).
General solution is
\begin{align*}
    \theta(x, t)
    &= \int_0^\infty \int_{-\infty}^\infty G(x, t;
    \xi, \tau) f(\xi, \tau) \dd \xi \dd \tau \\
    &= \int_0^t \int_{-\infty}^\infty f(u, \tau)
    S_d(x - u, t - \tau) \dd u \dd \tau \tag{10.9}
\end{align*}
This is an example of Duhamel's principle relating
(i) solution of forced PDE with homogeneous
boundary conditions (10.6) to (ii) solutions of
homogeneous PDE with inhomogeneous boundary
conditions (10.1). \\
Recall solutions of (10.1) with initial conditions
at $t = \tau$
\[ \theta(x, t) = \int_{-\infty}^\infty f(u) S_d(x
- u, t - \tau) \dd u \qquad (t > \tau) \]
So forcing term $f(x, t)$ at $t = \tau$ acts as an
initial condition for subsequential evolution. The
integral (10.9) is a superposition of all these
initial condition effects for $0 < \tau < t$.

\begin{hiddenflashcard}[Green-function-for-forced-heat-equation]
\prompt{Green's function for the forced heat
equation?}
\[ G(x, t; \xi, \tau) = \cloze{
H(t - \tau) S_d(x - \xi, t - \tau)} \]
\prompt{\cloze{this is constructed to satisfy
$(\partial_t - D\partial_x^2) G = \delta(x -
\xi)\delta(t - \tau)$, with $G = 0$ for $t = 0$.}}
\end{hiddenflashcard}

\begin{flashcard}[Duhamels-principle]
\subsubsection*{Duhamel's principle}

Let $\mathcal{L}$ be a linear differential operator
\fcemph{involving no time derivatives}, and $D$ a spatial
domain $D$ in $\RR^n$. Let $P^s f$ denote
the solution to the \cloze{homogeneous problem}:
\[ \begin{cases}
    \cloze{u_t - \mathcal{L}u = 0} &
    \cloze{(x, t) \in D \times (s, \infty)} \\
    \cloze{u = 0} & \cloze{\text{on $\partial D$}} \\
    \cloze{u(x, s) = f(x, s)} & \cloze{x \in D}
\end{cases} \]
Then the solution to the \cloze{forced problem}:
\[ \begin{cases}
    \cloze{u_t - \mathcal{L} u = 0} &
    \cloze{(x, t) \in D \times (0, \infty)} \\
    \cloze{u = 0} & \cloze{\text{on $\partial D$}} \\
    \cloze{u(x, 0) = 0} & \cloze{x \in D}
\end{cases} \]
is given by
\[ u(x, t) = \cloze{\int_0^t (P^s f)(x, t) \dd s} \]
\end{flashcard}

\subsection{Forced wave equation}

Consider
\[ \pfrac[2]{\phi}{t} - c^2 \pfrac[2]{\phi}{x} =
f(x, t) \tag{10.10} \]
with $\phi(x, 0) = 0$, $\phi_t(x, 0) = 0$.
Construct Green's function
\[ \pfrac[2]{G}{t} - c^2 \pfrac[2]{G}{x} =
\delta(x - \xi) \delta(t - \tau) \]
with $G = 0$, $G_t = 0$ at $t = 0$. Take Fourier
transform with respect to $x$
\[ \pfrac[2]{\tilde{G}}{t} + c^2 k^2 \tilde{G} =
e^{-ik\xi} \delta(t - \tau) \]
Recall section 7.4 for IVP Green's function (7.26)
\[ \tilde{G} = \begin{cases}
    0 & t < \tau \\
    e^{-ik\xi} \frac{\sin kc(t - \tau)}{kc} & t >
    \tau
\end{cases} = e^{-ik\xi} \frac{\sin kc(t -
\tau)}{kc} H(t - \tau) \]
Invert Fourier Transform
\begin{align*}
    G(x, t; \xi, \tau)
    &= \int_{-\infty}^\infty \frac{e^{ik\ob{(x -
    \xi)}^A} \sin k\ob{c(t - \tau)}^B}{k} \dd
    k \\
    &= \frac{H(t - \tau)}{2\pi c} \cdot 2
    \int_0^\infty \frac{\cos kA \sin kB}{k} \dd k
    \\
    &= \frac{H(t - \tau)}{2\pi c} \int_0^\infty
    \frac{\sin k(A + B) - \sin (A - B)}{k} \dd k
    \\
    &= \frac{H(t - \tau)}{4c} [\sgn(A + B) -
    \sgn(A - B)] \\
    &= \frac{H(t - \tau)}{4c} [2H(B - |A|)]
\end{align*}
Now with $H(t - \tau) \implies B = c(t - \tau) >
0$ so only non-zero if $|A| < B$, i.e. $|x - \xi|
< c(t - \tau)$. So Green's function or
\emph{causal fundamental solution} is
\begin{flashcard}[Green-function-for-forced-wave-equation]
\prompt{Green's function for the forced wave
equation?}
\[ G(x, t; \xi, \tau) = \cloze{\frac{1}{2c} H(c(t - \tau)
- |x - \xi|)} \tag{10.11} \]
\prompt{\cloze{this is constructed to satisfy
$(\partial_t^2 - c^2 \partial_x^2)G = \delta(x -
\xi) \delta(t - \tau)$ with $G = 0$, $G_t = 0$ at
$t = 0$.}}
\end{flashcard}
\begin{center}
    \includegraphics[width=0.6\linewidth]
    {images/a2a26f386f5011ed.png}
\end{center}
The solution is
\begin{align*}
    \phi(x, t)
    &= \int_0^\infty \int_{-\infty}^\infty f(\xi,
    \tau) G(x, t; \xi, \tau) \dd \xi \dd \tau \\
    &= \frac{1}{2c} \int_0^t \int_{x - c(t -
    \tau)}^{x + c(t - \tau)} f(\xi, \tau) \dd \xi
    \dd \tau \tag{10.12}
\end{align*}
Exercise: relation (10.12) to D'Alembert's
solution with initial conditions (9.18) at $t =
0$, $\phi = 0$, $\phi_t = g(x)$ as an example of
Duhamel's principle.

\subsection{Poisson's Equation}

\[ \nabla^2 \phi = -\rho(\bf{x}) \tag{10.13} \]
on domain $\mathcal{D}$ with Dirichlet boundary
conditions $\phi = 0$ on $\partial D$. \\
Fundamental solution: The $\delta(\bf{x})$
function in $\RR^3$ has the following properties:
\[\delta(\bf{x} - \bf{x}') = 0, \quad \forall
\bf{x} \neq \bf{x}'  \]
\[ \int_{\partial \mathcal{D}} \delta(x - \bf{x}')
\dd \bf{x} = \begin{cases}
    1 & \bf{x}' \in \mathcal{D} \\
    0 & \text{otherwise}
\end{cases} \tag{10.14} \]
Sampling property
\[ \int_{\mathcal{D}} f(\bf{x}) \delta(\bf{x} -
\bf{x}') \dd \bf{x} = f(\bf{x}') \]
The \emph{free-sapce Green's function} is defined
to be
\[ \nabla^2 G(\bf{x}; \bf{x}') = \delta(\bf{x} -
\bf{x}') \tag{10.15} \]
with homogeneous boundary conditions on $\RR^3$,
$G \to 0$ as $\bf{x} \to \infty$.
\begin{center}
    \includegraphics[width=0.3\linewidth]
    {images/5346c3986f5111ed.png}
\end{center}
This is spherically symmetric about $\bf{x}'$, so
the fundamental solution can only depend on the
scalar distance $G(\bf{x}; \bf{x}') = G(|\bf{x} -
\bf{x}'|) = G(r)$. WLOG $\bf{x}' = 0$. Integrate
(10.15) over ball $B$ radius $r$ around $\bf{x}' =
0$.
