Boundary-matrix construction of an ordinary differential Green function (source code)

= Boundary-matrix construction of an ordinary differential Green function
{title2=$G=G_0-h^TM^{-1}b$}

Let $h_1,\ldots,h_n$ be a <basis> of <homogeneous solutions> of a linear ordinary <differential operator> $L$ of order $n$. Let $B_1,\ldots,B_n$ be independent homogeneous linear <boundary conditions>, which may be coupled. Suppose a <fundamental solution> $G_0(x,\xi)$ satisfies $L_xG_0=\delta(x-\xi)$. Define the boundary <matrix> $M_{ij}=B_i h_j$ and $b_i(\xi)=B_iG_0(\cdot,\xi)$. If $M$ is invertible, then
$$
G(x,\xi)=G_0(x,\xi)-\sum_{j=1}^n h_j(x)\bigl[M^{-1}b(\xi)\bigr]_j.
$$
The added terms are <homogeneous solutions>, so the <Dirac delta> source is preserved. Applying the boundary operators gives $b-MM^{-1}b=0$. Any two such <Green functions> differ, for fixed source position, by a <homogeneous solution> with <coefficient> vector in the <null space> of $M$; invertibility therefore proves <uniqueness>. A singular boundary <matrix> signals a nontrivial <homogeneous solution> satisfying the endpoint conditions, where a compatibility condition and a nonunique inverse may arise. For $L=D^2$, one convenient <fundamental solution> is $(x-\xi)H(x-\xi)$.