Necessary and Sufficient Condition for Boundary Conditions to be Self-adjoint

Theorem
Let $\mathbf p$ be continuously differentiable.

The boundary conditions


 * $\map {\mathbf y} a \Big \vert_{x \mathop = a} = \map {\boldsymbol \psi} {\mathbf y} \Big \vert_{x \mathop = a}$

are self-adjoint :


 * $\forall i, k \in \N: 1 \le i, k \le N: \dfrac {\partial p_i \sqbrk {x,\mathbf y, \map {\boldsymbol\psi} {\mathbf y} } } {\partial y_k} \Big \vert_{x \mathop = a} = \dfrac {\partial p_k \sqbrk {x, \mathbf y, \map {\boldsymbol \psi} {\mathbf y} } } {\partial y_i} \Big\vert_{x \mathop = a}$

Necessary Condition
By assumption the boundary conditions are self-adjoint.

Then exists $\map g {x,\mathbf y}$ such that:


 * $\map{p_i} {x,\mathbf y,\map{\boldsymbol\psi} {\mathbf y} }=\frac{\partial \map g {x\mathbf y} } {\partial y_i}$

Since $\mathbf p\in C^1$, $g\in C^2$.

Differentiate both sides $y_k$:


 * $\frac{\partial\map{p_i} {x,\mathbf y,\map{\boldsymbol\psi} {\mathbf y} } } {\partial y_k}=\dfrac {\partial^2 \map g {x,\mathbf y} } {\partial y_k\partial y_i}$

By the Schwarz-Clairaut Theorem, partial derivatives commute, hence indices can be mutually replaced:


 * $\dfrac{\partial\map {p_i} {x,\mathbf y,\map{\boldsymbol\psi} {\mathbf y} } } {\partial y_k}=\frac {\partial\map{p_k} {x,\mathbf y,\map{\boldsymbol\psi} {\mathbf y} } } {\partial y_i}$

Fixing $x=a$ provides the result.

Sufficient condition
By assumption:


 * $\intlimits {\dfrac {\partial p_i} {\partial y_j} } {x \mathop = a} {} = \intlimits {\dfrac {\partial p_j} {\partial y_i} } {x \mathop = a} {}$

Then


 * $\displaystyle\exists\map g {x,\mathbf y}\in C^2:\frac{\partial p_i}{\partial y_j}\Big\vert_{x\mathop=a}={\frac{\partial p_j} {\partial y_i} }\Big\vert_{x\mathop=a}=\frac{\partial^2 g} {\partial y_i\partial y_j}\Big\vert_{x\mathop=a}$

In other words:
 * $\displaystyle p_i\Big\vert_{x\mathop=a}=\frac{\partial g} {\partial y_i} \Big\vert_{x\mathop=a}$

Hence, the boundary conditions are self-adjoint.