On the validity of averaging techniques for nonlinear systems