Numerical integration in parallel

  • The code example computes \( \pi \) using the trapezoidal rules.
  • The trapezoidal rule
$$ I=\int_a^bf(x) dx\approx h\left(f(a)/2 + f(a+h) +f(a+2h)+\dots +f(b-h)+ f(b)/2\right). $$ Click on this link for the full program.