FAQ: Why do nuclei have the sizes they do? Is the nuclear force always attractive?
The strong nuclear force, unlike the electric and gravitational interactions, can't be expressed by any simple equation. The reason is that nucleons are not fundamental particles. They're actually clusters of quarks. All we have are models of the nucleon-nucleon force, and just because two models differ, we can't conclude that one is right and one is wrong. They are simply fits to the data, with their forms chosen for convenience for a certain purpose, and often with lots of adjustable parameters. The description of the strong nuclear force is also complicated because it depends on both the spins of the nucleons and on the particular combination of neutrons and protons (although it stays the same when the identities of neutrons and protons are swapped).
Since nuclei are bound, and the electrical interactions in a nucleus are repulsive, we conclude that the nuclear force is at least sometimes attractive. It is not possible, however, to infer simply from the fact that nuclei don't collapse that the nuclear force is sometimes repulsive. In fact the main reason that nuclei don't collapse is the zero-point motion required by the Heisenberg uncertainty principle; this is exactly analogous to the reason that the hydrogen atom doesn't collapse, even though the interaction between the proton and electron is purely attractive. The smaller the space you pack the particles into, the faster they have to move, and the greater their kinetic energy. The system's ground state has a size that minimizes the sum of its kinetic and potential energies.
Relatively sophisticated models of the nucleon-nucleon interaction do usually include repulsion under certain circumstances, e.g., there may be a "hard core" in the potential at short ranges. However, quite good global descriptions of the sizes and binding energies of nuclei can also be achieved with interactions such as the Skyrme interaction, which do not have any such hard core.[Chamel 2010, Stone 2006]
Chamel and Pearson, 2010, "The Skyrme-Hartree-Fock-Bogoliubov method: its application to finite nuclei and neutron-star crusts,"
http://arxiv.org/abs/1001.5377
Stone and Reinhard, 2006, "The Skyrme Interaction in finite nuclei and nuclear matter,"
http://arxiv.org/abs/nucl-th/0607002