  The Euclid mission of the European Space Agency will deliver weak
gravitational lensing and galaxy clustering surveys that can be used to
constrain the standard cosmological model and extensions thereof. We present
forecasts from the combination of these surveys on the sensitivity to
cosmological parameters including the summed neutrino mass $M_\nu$ and the
effective number of relativistic species $N_{\rm eff}$ in the standard
$\Lambda$CDM scenario and in a scenario with dynamical dark energy ($w_0
w_a$CDM). We compare the accuracy of different algorithms predicting the
nonlinear matter power spectrum for such models. We then validate several
pipelines for Fisher matrix and MCMC forecasts, using different theory codes,
algorithms for numerical derivatives, and assumptions concerning the non-linear
cut-off scale. The Euclid primary probes alone will reach a sensitivity of
$\sigma(M_\nu)=$56meV in the $\Lambda$CDM+$M_\nu$ model, whereas the
combination with CMB data from Planck is expected to achieve
$\sigma(M_\nu)=$23meV and raise the evidence for a non-zero neutrino mass to at
least the $2.6\sigma$ level. This can be pushed to a $4\sigma$ detection if
future CMB data from LiteBIRD and CMB Stage-IV are included. In combination
with Planck, Euclid will also deliver tight constraints on $\Delta N_{\rm eff}<
0.144$ (95%CL) in the $\Lambda$CDM+$M_\nu$+$N_{\rm eff}$ model, or $\Delta
N_{\rm eff}< 0.063$ when future CMB data are included. When floating $(w_0,
w_a)$, we find that the sensitivity to $N_{\rm eff}$ remains stable, while that
to $M_\nu$ degrades at most by a factor 2. This work illustrates the
complementarity between the Euclid spectroscopic and imaging/photometric
surveys and between Euclid and CMB constraints. Euclid will have a great
potential for measuring the neutrino mass and excluding well-motivated
scenarios with additional relativistic particles.
