How to calculate an area under a curve in origin?