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

Theorem
Let $\mathbf p$ be continuously differentiable.

The boundary conditions


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

are self-adjoint :


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

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

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


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

Because $\mathbf p \in C^1$:
 * $g \in C^2$

Differentiate both sides $y_k$:


 * $\dfrac {\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} = \dfrac {\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:


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

Then:


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

In other words:
 * $\bigvalueat {p_i} {x \mathop = a} = \valueat {\dfrac {\partial g} {\partial y_i} } {x \mathop = a}$

Hence, the boundary conditions are self-adjoint.