Connect with users of Wolfram technologies to learn, solve problems and share ideas
Mark as an Answer
1 Total Likes
Follow this post
Share this post:
Accuracy and Precision in NIntegrate
10 years ago
I have two functions that I numerically integrate: NIntegrate[f1] and NIntegrate[f2]. I expect these to be equal and they are until I insert an accuracy goal and working precision requirement. Now they are not equal and the sizes of AccuracyGoal and WorkingPrecision do not change the value of the intergral of f1 but they do change the integrated value of f2, and the new value of f2 is independent of the size of the accuracy and precision values. The difference between the integral values of f1 and f2 is always about 5% and constant.
One consultant has indicated that the results may be rounding errors or noise but I contend that the difference is real because it does not act like noise.
How can you tell?
Thanks for the help.
Anton Antonov, Accendo Data LLC
10 years ago
May be you have numerical computation cancelation errors. Have you tried the comparison computations with your functions having the signatures f1[x_?NumberQ] and f2[x_?NumberQ] ?
Jason Grigsby, Wolfram Research Inc.
10 years ago
Without seeing the definitions of f1 and f2, no-one is going to be able to say for sure what is going on. However, on many occasions, numerical round-off error has appeared systematic when I have worked on solving differential equations. For one thing, the precision tracking used in Mathematica is fundamentally different than the simple round-off used in machine precision. If you examine the following:
You can see that in order to achieve 20 digits of accuracy in pi, Mathematica forces itself to use far more digits. This is fundamentally different than simply rounding off machine precision and hoping for the best. This could also yield apparently systematic differences for certain computations.
Reply to this discussion
in reply to
Community posts can be styled and formatted using the
Tag limit exceeded
Note: Only the first five people you tag will receive an email notification; the other tagged names will appear as links to their profiles.
Add a file to this post
Follow this discussion
Be respectful. Review our
to understand your role and responsibilities.
Wolfram|Alpha Notebook Edition
Volume & Site Licensing
Enterprise Private Cloud
Service Plans Benefits
Wolfram Language Documentation
Wolfram Language Introductory Book
Get Started with Wolfram
Fast Introduction for Programmers
Fast Introduction for Math Students
Webinars & Training
Connected Devices Project
Wolfram Data Drop
Wolfram + Raspberry Pi
. All rights reserved.
Learn how »