US Navy Interview Question

How to integrate a function