Hi:
Actually, you can follow This Example. I modify the function a little and you can defile a function like:
double dU = PI;
double dL = 0.0;
double b = dL;
int nSteps = 100;
double db = (dU-dL)/nSteps;
double dF;
double dFF;
double dInteg = 0.0;
for (int ii = 0; ii < nSteps; ii++)
{
if (ii == 0)
dF = a * ( sin(2*b*x*sin(b)) * sin(2*b*x*sin(b)) ) * sin(b);
else
dF = dFF;
b += db;
dFF = a * ( sin(2*b*x*sin(b)) * sin(2*b*x*sin(b)) ) * sin(b);
dInteg += 0.5*(dF + dFF)*db;
}
y = dInteg;
Larry
OriginLab Technical Services