Variational Optimization for Constructing Inverse Potentials of Proton-Proton Scattering: A Phase Function Method Study