According to my textbook they simply say an electron is decelerated by a nuclei and this means it loses KE. The difference in KE is given off as a photon. But an electron is always being pulled back to the nuclei and hence decelerated when it is leaving the nuclei. So how do we find the difference in KE? Also at what point in its trajectory will the electron give off the photon? When it is closest to the nuclei?
Edit: This question is not talking about electrons in orbiting a nuclei, rather electrons passing around a nuclei and the radiation they emit.

