This is a problem confusing me for years.
AccuracyGoal and PrecisionGoal are two options that I never truly understand and, to be honest, always avoid touching. Let's first look at the descriptions for them in the document:
AccuracyGoalis an option for various numerical operations which specifies how many effective digits of accuracy should be sought in the final result.
PrecisionGoalis an option for various numerical operations which specifies how many effective digits of precision should be sought in the final result.
Reading this, one will probably consider these two options as something that efficiently control the accuracy and precision of numerical results, but sadly, it's not true. Numerous examples coming out in this site have proved that the option controlling precision and accuracy is WorkingPrecision. Just a few examples:
Funny behaviour when plotting a polynomial of high degree and large coefficients
singularity in NDSolve for some values of parameter
NIntegrate fails while Integrate works
NSolve gives additional solutions that don't satisfy the equations!
As far as I can tell, none of the examples above can be solved by merely adjusting PrecisionGoal and AccuracyGoal. You can find more by searching WorkingPrecision.
Indeed, the behavior of PrecisionGoal and AccuracyGoal isn't against the description in the document. Just look at the description carefully:
…should be sought in the final result.
and check the Details:
Even though you may specify
PrecisionGoal -> n, the results you get may sometimes have much less than n‐digit precision.
Even though you may specify
AccuracyGoal -> n, the results you get may sometimes have much less than n‐digit accuracy.
These words can be interpreted as "The option values of AccuracyGoal and PrecisionGoal are merely goals i.e. they may not be achieved".
However, if the effect of AccuracyGoal and PrecisionGoal is really that uncontrollable, can I say these options are useless, at least for manual adjustment?
Or, if the root of all evil is just another piece of vague description in the document, what's the accurate usage of these options? Is there a clear enough principle for setting them?