Use numerical integration to calculate pi