Problem 1197. Numerical Integration
Solution Stats
Problem Comments
-
2 Comments
Please, add to the problem description that for values smaller than one, we should use 1 + x^2/2 for approximating the integrand. For instance, the answer provided by vpaintegral (Symbolic Math Toolbox; commented in my solution) is not accepted by the 4th test case: I believe that vpaintegral returns the exact solution*. The precision for the 4th test should be way smaller, 1e-2/1e-3, or the problem description needs to be changed.
* vpaintegral can handle values that cause the MATLAB integral function to overflow or underflow.
As a sanity check, I even did Monte Carlo Integration for the 4th case, and it still did not work, because the problem is not asking for the exact solution, but an approximation of an approximation (and that's why the requested precision should be smaller).
Solution Comments
-
1 Comment
Is it cheating if the test suite appeals to the same approximation, claiming it to be "good enough"?
Problem Recent Solvers32
Suggested Problems
-
21704 Solvers
-
1799 Solvers
-
383 Solvers
-
680 Solvers
-
Create an n-by-n null matrix and fill with ones certain positions
476 Solvers
More from this Author7
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!