MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: more questions about NIntegrate

  • To: mathgroup at
  • Subject: [mg124995] Re: more questions about NIntegrate
  • From: Alexei Boulbitch <Alexei.Boulbitch at>
  • Date: Fri, 17 Feb 2012 06:22:31 -0500 (EST)
  • Delivered-to:


I need to use NIntegrate to obtain highly accurate values

of some integral. The relative error should be 1.E-16 or smaller.

Is this possible? I am not sure how to proceed. NIntegrate has

a number of confusing options: AccuracyGoal, PrecisionGoal and

WorkingPrecision. I am playing with these, trying to set them

to various values, but whatever I do I obtain results which do not

seem to have an error smaller than 1.E-7 or so.

I would appreciate an advice.


Hi, Leslaw,

From your post it is not unequivocal, what do you need.

1.       The result of numerical integration depends upon the integrand and the numerical method applied as well as some options.

If this is your question, check Menu/Help/tutorial/NIntegrateOverview.

2.       Your question may be also understood in such a way, that you have already chosen an adequate method, and now you simply need to optimize the result within this method and, therefore, you play with PrecisionGoal etc.

You may want to apply to your integral the procedure I applied below to an example integral,  just to estimate, what do you gain by increasing the PrecisionGoal. Note that its default value is half of the WorkingPrecision, that gives us 8.



You may want to have look at a list:


Now it is up to you to decide, where to stop. For the reason I do not understand I could not go beyond PrecisionGoal->16 here.

3.       The third possibility is that you only need to visualize the output of NIntegrate up to the 16th figure after comma.

In this case NumberForm may help. For example:



Have fun, Alexei

Alexei BOULBITCH, Dr., habil.


ZAE Weiergewan,

11, rue Edmond Reuter,

L-5326 Contern, LUXEMBOURG

Office phone :  +352-2454-2566

Office fax:       +352-2454-3566

mobile phone:  +49 151 52 40 66 44

e-mail: alexei.boulbitch at<mailto:alexei.boulbitch at>

  • Prev by Date: Re: How to layout a planar graph so that it doesn't have any intersecting edges?
  • Next by Date: Re: Running MathematicaScript in Mac Terminal
  • Previous by thread: NDSolve slow when using generic function definition
  • Next by thread: Re: more questions about NIntegrate