Nonparametric inference of a trend using functional data