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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started