Solved
Area under a curve
Posted on 1997-08-05
Area of a region under the curve can be described by taking the integral of the function, given the limits of the curve. My problem is to write a program in C, using "Functions" to calculate the area of the region under the curve. The formula/equation to be used to solve is:
Area=Delta*[ {f(a)/2} + {f(a+delta)} + {f(a+2*delta)} + {f(a+3*delta)} + ............. + {f(a+(n-1)*delta)} + {f(b)/2} ] , where delta=((b-a)/n), a=(-1.0) and b=(1.0) and are REAL.
The equation of the curved line is given by:
y = e^ ((-x^2)/2)
Your quick response will be greatly appreciated. Thank you very much.
Sincerely,
Abdul
<batla@msn.com>
<batla@hotmail.com>