from scipy.integrate import quad

value, estimated_error = quad(lambda x: x*x, 0, 1)
print(f"Integral of x squared on [0, 1]: {value:.6f}")
print("Within 1e-12 of one third:", abs(value - 1/3) < 1e-12)
assert abs(value - 1/3) < 1e-12
