I need to resolve a few queries on beta decay. The standard explanation given in most texts is during beta decay, a neutron decays into a proton, an electron(or a positron) and a neutrino(or anti-neutrino). This explanation however isn't completely correct since it can be easily shown using Heisenberg's uncertainity principle that it is not possible for an electron to exist in the nucleus. So where are the emitted electron/positrons and the neutrinos coming from coming from? Are they somehow formed during emission? Another query on beta decay regarding electron capture. How is an electron captured by the nucleus since electrons can exist only in discrete energy levels, how does quantum mechanics permit an electron to be captured by the nucleus?