The differential cross-section for the inclusive production of psi(2S) mesons in pp collisions at &RADIC s = 7 TeV has been measured with the LHCb detector. The data sample corresponds to an integrated luminosity of 36 pb(-1). The psi(2S) mesons are reconstructed in the decay channels psi(2S)-> mu(+)mu(-) and psi(2S) -> J/psi&PI+&PI-, with the J/psi meson decaying into two muons. Results are presented both for promptly produced psi(2S) mesons and for those originating from b-hadron decays. In the kinematic range pT(psi(2S)) <= 16 GeV/c and 2 < y(psi(2S)) <= 4.5 we measuresigma(prompt)(psi(2S))= 1.44 +/- 0.01 (stat) +/- 0.12 (syst)(-0.40)(+0.20) (pol) mu b, &SIGMA(b)(psi(2S)) = 0.25 +/- 0.01 (stat) +/- 0.02 (syst) mu b,where the last uncertainty on the prompt cross-section is due to the unknown psi(2S) polarization. Recent QCD calculations are found to be in good agreement with our measurements. Combining the present result with the LHCb J/psi measurements we determine the inclusive branching fractionB (b ->psi(2S)X)= (2.73 +/- 0.06 (stat) +/- 0.16 (syst) +/- 0.24 (BF))* 10(-3),where the last uncertainty is due to the B(b -> J/psi X), B(J/psi -> mu(+)mu(-) and B(psi(2S) -> e(+)e(-)) branching fraction uncertainties.