We analyze the spectrum of magnetic excitations as observed by neutron
diffraction and NMR experiments in YBa2Cu3O6+x, in the framework of t
he single-band t-t'-J model in which the next-nearest-neighbor hopping
term has been introduced in order to fit the shape of the Fermi surfa
ce revealed by photoemission. Within the slave-boson approach, we have
as well examined the d-wave superconducting state, and the singlet-re
sonating-valence-bond phase appropriate to describe the normal state o
f heavily doped systems. Our calculations show a smooth evolution of t
he spectrum from one phase to the other, with the existence of a spin
gap in the frequency dependence of chi''(Q, omega). The value of the t
hreshold of excitations E(G) is found to increase with doping, while t
he characteristic temperature scale T(m) at which the spin gap opens e
xhibits a regular decrease, reaching T(c) only in the overdoped regime
. This very atypical combined variation of E(G) and T(m) with doping r
esults from strong-correlation effects in the presence of the realisti
c band structure considered here. We point out that the presence of a
resonance in the spectrum chi''(Q, omega) is in good agreement with th
e neutron-diffraction results obtained at x = 0.92 and 1.0. This reson
ance is analyzed as a Kohn anomaly of the second kind in the Cooper ch
annel. Finally, we examine the evolution of the Knight shift and of ch
i''(q, omega) at any q, allowing one to study the magnetic correlation
length xi as a function of doping, frequency, and temperature.