Trapezoidal Method Python Example