Calculating slopes of secant lines