return 0;
}
/*————————————————————————*/
double integrate(double a, double b, int n)
{
// Declare objects.
double sum = 0, x, base, area;
base = (b-a)/n;
for(int k=2; k<=n; k++)
}
/*———————————————————————–*/
double f(double x)
{
return (3*x – 2*pow(x,2));
}
/*———————————————————————–*/
/*————————————————————————*/
/* Program chapter6_44 */
/* */
/* This program estimates the area under a given curve */
/* using trapezoids with equal bases. The x– and y-coordinates of the */