New automatic non interpolatory quadrature and cubature formulas