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

Theorem
The boundary conditions


 * $ \displaystyle \mathbf y \left ( { a } \right ) \vert_{ x = a } = \boldsymbol \psi \left ( { 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 } $

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 } $

Since $ F $ is smooth, partial derivatives commute, hence indeces can be switched:


 * $ \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.