A new generalization of the trapezoid formula for N-time differentiable mappings and applications