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

\subsection{Constructing $G(x, \xi)$: Boundary
Value Problems}

Solve
\[ \mathcal{L} G(x, \xi) = \delta(x - \xi) \]
on $a \le x \le b$ with $G(a, \xi) = G(b, \xi) =
0$.

\subsubsection*{1 \& 2 Solves homogeneous equation
with homogeneous boundary conditions}

Assume 2 independent homogeneous solutions
$y_1(x)$, $y_2(x)$ known. \\
For $a \le x < \xi$: $G_1(x, \xi) = Ay_1(x) +
By_2(x)$ such that $Ay_1(a) + By_2(a) = 0$ (i.e.
choose suitable $A$, $B$). This defines a
complementary function (2.3) $y_-(x)$ such that
$y_-(a) = 0$
\[ \boxed{G_1 = C y_-(x) \text{ with $y_-(a) =
0$}} \tag{7.14} \]
For $\xi < x \le b$: Similarly find
\[ \boxed{G_2 = Dy_+(x) \text{ with $y_+(b) = 0$}}
\tag{7.15} \]
where $y_+(x)$ is a complementary function (2.3).

\subsubsection*{3. Why is $G$ continuous at $x =
\xi$?}

Suppose $G$ were discontinuous locally, so $G
\propto H(x, \xi) + \cdots$ (6.7)
\begin{center}
    \includegraphics[width=0.6\linewidth]
    {images/3e3d06d0601811ed.png}
\end{center}
Then we would have $G' \propto \delta(x, \xi)$ and
$G'' \propto \delta'(x - \xi)$. So LHS
\[ \mathcal{L} G \propto \alpha(x) \delta'(x -
\xi) + \beta(x) \delta(x - \xi) + \gamma(x) H(x,
\xi) \]
there is no term $\propto \delta'(x - \xi)$. So
$G$ isn't discontinuous. Hence we have
$[G]_{\xi_-}^{\xi^+} = 0$, so
\[ \boxed{Cy_-(\xi) = Dy_+(\xi)} \tag{7.16} \]

\subsubsection*{4. Why the jump condition for $G'$
at $x = \xi$?}

Integrate $\mathcal{L} G = \delta(x, \xi)$ across
$x = \xi$:
\begin{align*}
    LHS
    &+ \int_{\xi_-}^{\xi^+} \mathcal{L} G \dd x
    &= \int_{\xi_-}^{\xi^+} (\alpha G'' + \beta G'
    + \gamma G) \dd x \\
    &= \alpha(\xi) [G']_{\xi_-}^{\xi^+} + \ub{(\beta -
    \alpha')[G]_{\xi_-}^{\xi^+}}_{=0 \text{by
    continuity (7.16)}} +
    \ub{\int_{\xi_-}^{\xi^+} (\gamma - \beta' +
    \alpha'') G \dd x}_{=0 \text{by continuity}}
    \\
    RHS
    &= \int_{\xi_-}^{\xi^+} \delta(x - \xi) \dd x
    \\
    &= 1
\end{align*}
So $[G']_{\xi_-}^{\xi^+} = \frac{1}{\alpha(\xi)}$
so
\[ \boxed{Dy_+'(\xi) - Cy_-'(\xi) =
\frac{1}{\alpha(\xi)}} \tag{7.17} \]

\subsubsection*{Wronskian $W(\xi)$}

Solving (7.16) and (7.17) we find
\[ C(\xi) = \frac{y_+(\xi)}{\alpha(\xi) W(\xi)},
\quad D(\xi) = \frac{y_-(\xi)}{\alpha(\xi) W(\xi)} \]
where $W(\xi) = y_-(\xi) y_+'(\xi) - y_+(\xi)
y_-'(\xi) \neq 0$ if $y_+, y_-$ are linearly
independent. Hence
\[ \boxed{G(x, \xi) = \begin{cases}
    \frac{y_-(x)y_+(\xi)}{\alpha(\xi) W(\xi)} & a
    \le x < \xi \\
    \frac{y_+(x) y_-(\xi)}{\alpha(\xi) W(\xi)} &
    \xi < x \le b
\end{cases}} \tag{7.20} \]
So the solution to (7.6) with $y(a) = y(b) = 0$
\begin{center}
    \includegraphics[width=0.6\linewidth]
    {images/28123392601a11ed.png}
\end{center}
\begin{align*}
    y(x)
    &= \int_a^b G(x, \xi) f(\xi) \dd \xi \\
    &= \int_a^x G_2(x, \xi) f(\xi) \dd \xi +
    \int_x^b G_1(x, \xi) f(\xi) \dd \xi \\
    y(x)
    &= y_+(x) \int_a^x \frac{y_-(\xi)
    f(\xi)}{\alpha(\xi) W(\xi)} \dd \xi + y_-(x)
    \int_a^b \frac{y_+(\xi) f(\xi)}{\alpha(\xi)
    W(\xi)} \dd \xi \tag{7.21}
\end{align*}
Notes:
\begin{enumerate}[(1)]
    \item If $\mathcal{L}$ is in Sturm Liouville
        form (2.7) i.e. $\beta = \alpha'$ then
        denominator $\alpha(\xi) W(\xi)$ is a
        constant and $G$ is \emph{symmetric},
        $G(x, \xi) = G(\xi, x)$. Exercise: show
        $\dfrac{}{x} (\alpha(x) W(x)) = 0$ if
        $\alpha' = \beta$ and using (2.10)
        (self-adjoint form).
    \item Often take $\alpha = 1$ (but Sturm
        Liouville form $\alpha < 0$).
    \item Indefinite integrals $\int_x$ in (7.21)
        are particular integral in general
        solution (2.5).
\end{enumerate}
Exercise: For $-y'' = f(x)$, $y(0) = y(1) = 0$
directly construct the Green's function (7.4)
(i.e. with $y_1 = x$, $y_2 = \text{constant}$). \\

\begin{example*}
    Solve $y'' - y = f(x)$ with $y(0) = y(1) = 0$.
    Construct $G(x, \xi)$:
    \begin{enumerate}
        \item[1\&2] Homogeneous solutions $y_1 =
            e^x$ and $y_2 = e^{-x}$ so with
            homogeneous boundary conditions (by
            inspection):
            \[ G = \begin{cases}
                C \sinh x & 0 \le x < \xi \\
                D \sinh (1 - x) & \xi < x \le 1
            \end{cases} \]
        \item[3] Continuity at $\xi$ implies $C \sinh
            \xi = D \sinh(1 - \xi)$
            \[ C = \frac{D \sinh(1 - \xi)}{\sinh
            \xi} \]
        \item[4] $[G'] = 1$ implies
            \[ -D \cosh(1 - \xi) - C \cosh \xi = 1 \]
            ($\alpha = 1$) so
            \[ -D [\cosh(1 - \xi) \sinh \xi +
            \sinh(1 - \xi) \cosh \xi] = \sinh \xi
            \tag{$*$} \]
            \[ -D[\sinh 1] = \sinh \xi \]
            \[ D = -\frac{\sinh \xi}{\sinh 1},
            \quad C = -\frac{\sinh(1 - \xi)}{\sinh
            1} \]
            so the solution is
            \[ y = -\frac{\sinh(1 - x)}{\sinh 1}
            \int_0^x \sinh \xi f(\xi) \dd \xi -
            \frac{\sinh x}{\sinh 1} \int_x^1
            \sinh(1 - \xi) f(\xi) \dd \xi \tag{7.22} \]
    \end{enumerate}
\end{example*}

\subsubsection*{Inhomogeneous Boundary conditions}

Find $y_p$ solution to $\mathcal{L} y = 0$
satisfying boundary conditions ($y(a) \neq 0$,
$y(b) \neq 0$). Find Green's function for
$\mathcal{L} y_g = f$ with $y_a(a) = y_g(b) = 0$
where $y_g = y - y_p$. For example
\[ y'' - y = f(x) \]
with $y(0) = 0$ and $y(1) = 1$.
\[ y_p = A \sinh x + B \cosh x \]
$y_p(0) = 0$ implies $B = 0$, $y_p(1) = 1$ implies
$A = \frac{1}{\sinh 1}$. Solve for $y_g = y - y_p$
with homogeneous boundary conditions. Solution is
\[ y(x) = \frac{\sinh x}{\sinh 1} + y_g(x) \]
(i.e. equation (7.22))

\subsubsection*{Higher-order ODEs (BVP)}

If $\mathcal{L} y = f(x)$ to $n$-th order
(coefficient $\alpha(x) \dfrac[n]{y}{x}$) with
homogeneous boundary conditions then we generalize
Green's function $\mathcal{L}(x, \xi) = \delta(x -
\xi)$ with properties:
\begin{enumerate}
    \item[1\&2] $G_1, G_2$ homogeneous solutions
        satisfying homogeneous boundary
        conditions.
    \item[3] Continuity: $G_1 = G_2$, $G_1' =
        G_2'$, \dots, $G_1^{(n - 2)} = G_2^{(n -
        2)}$ at $x = \xi$.
    \item[4] Jump in $(n - 1)$ derivative:
        \[ [G^{(n - 1)}]_{\xi_-}^{\xi^+} = G_2^{(n
        - 1)} |_{\xi^+} - G_1^{(n - 1} |_{\xi_-} =
        \frac{1}{\alpha(\xi)} \]
\end{enumerate}
