Calculate Elasticity Using Midpoint Method