Question: Construct a ( mathrm { C } + + ) program that numerically evaluates the integral of a specific function (
Construct a mathrmC program that numerically evaluates the integral of a specific function f
Your program must fulfil the following requirements:
The user should be allowed to choose any one of the three methods Simpsons Rule, Trapezoidal Rule and Reimann Sum, then reads in the limits a b and n
Your program must check whether a
Numerical Integration Using Trapezoidal Rule
Enter lower limit of integral:
Enter upper limit of integral:
Enter number of intervals:
The computed value of integral is
Do you want to continue processing? Type y if yes, y if no:
If the Trapezoidal Rule is chosen, the sample inputoutput is as follows:
Given fx x xxx There are ways to numerically
evaluate the function:
Press for Riemann Sum
Press for Trapezoidal Rule
Press for Simpson's Rule
Please enter the method of your choice:
Numerical Integration Using Trapezoidal Rule
Enter lower limit of integral:
Enter upper limit of integral:
Enter number of intervals:
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:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
