
In the above section, the definition of the RS integral seems to be an approximation that ignores 1/R terms compared to the ik term. It seems to me that the code implementation is correct and it follows the definition of the kernal. So I suggest maybe it is better to keep it to exact all the time, including the first time defining the RS integral.