Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(e) Suppose we are given a number of discrete points (ai, yi). (2,2 (X yn) read from a curve y x), where x is bounded
(e) Suppose we are given a number of discrete points (ai, yi). (2,2 (X yn) read from a curve y x), where x is bounded between x andxn We wish to approximate the area under the curve by breaking up the curve into a number of small rectangles and calculating the area of these rectangles. (This is known as the the cing the area of thee retsin trapezoidal rule.) The appropriate formula is Notice that the average height of each rectangle is given by (v, +y-)/2 and the width of each rectangle is equal to (xi+l-ri); i = 1,2, . . . , n-1 Write a C program to implement this strategy, using a function to evaluate the formula yx). Use the program to calculate the area under the curve y - x3 between the limits x -1 and x -4. Solve this problem first with 16 evenly spaced points, then with 61 points, and finally with 301 points. Note that the accuracy of the solution will improve as the number of points increases. (The exact answer to this problem is 63.75.)
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