Problem 1261. Find the definite integral of various linear functions
Solution Stats
Problem Comments
-
3 Comments
Bruce, please check the answers to your test suite. Granted, it has been a while since I took calculus in college, but I'm pretty sure the answers aren't all zero. :-)
Never mind...just noticed you were looking for the error differences, and not the actual values. It's been a while since I took a Reading Comprehension class as well...
This is an "honor system" test suite. For the last case, quad('2*x',0,2) gives 3.9999999999999996, while trapz([0:1/n:2],[0:2/n:4]) gives the exact answer 4 for all values of n from 1 to 100, except n=35, 44, 51, 69, 92, or 100, which all give the same answer as quad.
Problem Recent Solvers50
Suggested Problems
-
Find the sum of all the numbers of the input vector
42402 Solvers
-
Back to basics 21 - Matrix replicating
1260 Solvers
-
Convert from Base 10 to base 5
245 Solvers
-
Given a matrix, swap the 2nd & 3rd columns
846 Solvers
-
312 Solvers
More from this Author16
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!