// Numerical integration via the Extended Simpson's Formula (ESF)
#include <cmath>
#include <iostream>
using namespace std;

double f(double x) {
  double y = 1.76 + 3.21*x*x;
  return 894.*x / (y*y*y);
}

int main() {

  const int n=100;
  const double a=0.0, b=1.61;
  const double h = (b-a)/n;

  double esf = f(a)+f(b);

  for (int i=1; i<=n-1; i++)
    esf += 2.0 * pow(2.0,double(i%2)) * f(a+i*h);

  esf *= h/3;

  cout.precision(9);
  cout << "The integral = " << esf << endl;

}
