Script on investigating the P2 basis at the center of gravities that is used in Newton-Cotes quadrature