The closed-form integration of arbitrary functions