(Just an intermediate save)
Integrate using function and parameters (1/2) + optimize midpoint