Question: Construct a ( mathrm { C } + + ) program that numerically evaluates the integral of a specific function (

Construct a \(\mathrm{C}++\) program that numerically evaluates the integral of a specific function \( f \).
Your program must fulfil the following requirements:
1. The user should be allowed to choose any one of the three methods (Simpson's Rule, Trapezoidal Rule and Reimann Sum, then reads in the limits \( a, b \) and \( n \).
2. Your program must check whether \( a
Numerical Integration Using Trapezoidal Rule
Enter lower limit of integral: 0
Enter upper limit of integral: 10
Enter number of intervals: 20
The computed value of integral is 16345.81250
Do you want to continue processing? Type 'y' if yes, 'y' if no:
```
If the Trapezoidal Rule is chosen, the sample input/output is as follows:
```
Given f(x)= x^4- x^3-3x^2-4x -3. There are 3 ways to numerically
evaluate the function:
Press 1 for Riemann Sum
Press 2 for Trapezoidal Rule
Press 3 for Simpson's Rule
Please enter the method of your choice: 3
Numerical Integration Using Trapezoidal Rule
Enter lower limit of integral: 10
Enter upper limit of integral: 0
Enter number of intervals: 20
Computation cannot be done. The upper limit must be greater than the
lower limit.
Do you want to continue processing? Type 'y' if yes, 'y' if no:
```
Construct a \ ( \ mathrm { C } + + \ ) program

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 Programming Questions!