Best way to integrate a function

What concerns “intergration”, see for example: