This program is woth 100 points of homework.

Write a program to estimate the area under the curve of a polynomial expression between two given points.

In this case, we will limit ourselves to fourth degree polynomials

f(x) = a*x4+b*x3+c*x2+d*x+e

The user will give us the starting and ending points, and the number of subdivisions.

To solve the problem, we will find the area of a series of rectangles that "fit" under the curve, and sum these areas to give us the total area under the curve.

For example if the function is f(x) = x2+x and we wish to find the area under the curve from 0 to 2, in two intervals, we would do something like this:

If we wanted to break it into four intervals, we would do something like this:

You are to write a program that

In this case, I am using the left endpoint to find the area of the rectangle, different results can be found by using the right endpoint or the middle of the range.

You may assume that all input is correct and error free.

The correct answer can be found by:

If you take calculus, you will deal with this problem again.

When you complete this assingment, email the source code to me. If the file is called foo.C you can accomplish this by the unix command line:

mail -s "homework 2" dbennett < foo.C