Do you know the Weierstrass approximation theorem? Facing problem in solving questions on polynomial…