A mathematical approach to the derivation of the theoretical optical potential