On the evaluation of the response of nonlinear systems by functional series expansion of forced and free responses