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

Theorem
Let $ \mathbf p $ be continuously differentiable.

The boundary conditions


 * $ \displaystyle \mathbf y \left ( { a } \right ) \vert_{ x = a } = \boldsymbol \psi \left ( { \mathbf y } \right ) \vert_{ x = a} $

are self-adjoint iff


 * $ \displaystyle \frac{ \partial p_i \left [ { x, \mathbf y, \boldsymbol \psi \left ( { \mathbf y } \right ) } \right ] }{ \partial y_k } \Big \vert_{ x = a } = \frac{ \partial p_k \left [ { x, \mathbf y, \boldsymbol \psi \left ( { \mathbf y } \right ) } \right ] }{ \partial y_i } \Big \vert_{ x = a } : \forall i, k \in \N : 1 \le i, k \le N$

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

Then exists $ g \left ( { x, \mathbf y } \right ) $ such that:


 * $ \displaystyle p_i \left ( { x, \mathbf y, \boldsymbol \psi \left ( { \mathbf y } \right ) } \right ) = \frac{ \partial g \left ( { x, \mathbf y } \right ) }{ \partial y_i } $

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

Differentiate both sides by $ y_k $:


 * $ \displaystyle \frac{\partial p_i \left ( { x, \mathbf y, \boldsymbol \psi \left ( { \mathbf y } \right ) } \right ) }{ \partial y_k } = \frac{ \partial^2 g \left ( { x, \mathbf y } \right ) }{ \partial y_k \partial y_i } $

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


 * $ \displaystyle \frac{\partial p_i \left ( { x, \mathbf y, \boldsymbol \psi \left ( { \mathbf y } \right ) } \right ) }{ \partial y_k } = \displaystyle \frac{\partial p_k \left ( { x, \mathbf y, \boldsymbol \psi \left ( { \mathbf y } \right ) } \right ) }{ \partial y_i } $

Fixing $ x = a $ provides the result.

Sufficient condition
By assumption:


 * $ \displaystyle \frac{ \partial p_i }{ \partial y_j } \Big \vert_{ x = a } = \frac{ \partial p_j }{ \partial y_i } \Big \vert_{ x = a } $

Then


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

In other words, $ \displaystyle p_i \vert_{ x = a }= \frac{ \partial g }{ \partial y_i } \Big \vert_{ x = a } $.

Hence, the boundary conditions are self-adjoint.