Question: Write a program to solve the following integral: ( 5 . 0 Points ) I = 1 3 sin ( x 2 ) cos (
Write a program to solve the following integral: Points
I sinx cosxdx
Using the Simpson rule. The program should:
a Start with number of intervals N equal to
b Automatically triple the number of subintervals.
c At each iteration step the program must show the iteration step, subinterval number, integral value and the difference between a result and the preceding one.
d Stop when convergence is reached when the difference between a result and thepreceding one is smaller than a threshold given by the user Choose a thresholdvalue of
Using the GaussLegendre method
Compare the performance in terms of timing and precision of both methods
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
