Let $\varphi$ be a smooth function of $k + 2$ variables. We shall investigate in this paper the rates of convergence of estimators of $T(f) = \int\varphi(f(x), f'(x), \ldots, f^{(k)}(x), x) dx$ when $f$ belongs to some class of densities of smoothness $s$. We prove that, when $s \geq 2k + \frac{1}{4}$, one can define an estimator $\hat{T}_n$ of $T(f)$, based on $n$ i.i.d. observations of density $f$ on the real line, which converges at the semiparametric rate $1/ \sqrt n$. On the other hand, when $s < 2k + \frac{1}{4}, T(f)$ cannot be estimated at a rate faster than $n^{-\gamma}$ with $\gamma = 4(s - k)/\lbrack 4s + 1\rbrack$. We shall also provide some extensions to the multidimensional case. Those results extend previous works of Levit, of Bickel and Ritov and of Donoho and Nussbaum on estimation of quadratic functionals.