Question: -Write a C++ program that calculates the area under a curve. -Must use LEFT RIEMANN SUM -Here is the curve equation: f(x) = x^2 +1.5x

-Write a C++ program that calculates the area under a curve.

-Must use LEFT RIEMANN SUM

-Here is the curve equation: f(x) = x^2 +1.5x + 4

-You must prompt the user for the beginning and the ending x values that represent the limits/range of the function.

-Error check for correct range for each input.

-The units used are inches.

-The program input/output should look something like this:

This program calculates the area under a curve between two points on the x axis.

The equation is: XXXXXXXX

Please Enter the min x value (Positive Whole Numbers Only):

1

Please Enter in the max x value (Positive While Numbers Only:

4

The area under the curve between min x and max x is: XXXXX square inches.

(Note,1 and 4 are user inputs)

-You should calculate the area using the basic rectangular slice method.

-For this part of the project, set your x axis intervals at 1 inch.

-For example, if the user input the x range from 1 inch to 4 inches, you would have three

x ranges: from 1 to 2, from 2 to 3 and 3 to 4 in which you calculate the area and make a

sum of the total.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!