Re: Calculate a numerical integral with enough precision
- To: mathgroup at smc.vnet.net
- Subject: [mg114726] Re: Calculate a numerical integral with enough precision
- From: Andrew Moylan <amoylan at wolfram.com>
- Date: Tue, 14 Dec 2010 06:56:05 -0500 (EST)
This is a tricky one. I don't know any automatic methods for these kind of integrals. I found one manual method which works however: The new "LevinRule" method for NIntegrate in Mathematica 8 can efficiently handle integer powers of oscillatory functions. Therefore you can try replacing Exp with its power series: Exp[Sin[1/x]] = Sin[1/x] + Sin[1/x]^2 / 2! + ... In[104]:= terms = Table[NIntegrate[Sin[1/x]^n / n!, {x, 0, 2 \[Pi]}], {n, 0, 20}] Out[104]= {6.28319, 2.26277, 0.706044, 0.135229, 0.0326695, \ 0.00439035, 0.000818095, 0.0000821659, 0.0000121744, 9.68476*10^-7, 1.18363*10^-7, 7.7766*10^-9, 8.07019*10^-10, 4.51197*10^-11, 4.06465*10^-12, 1.97691*10^-13, 1.57263*10^-14, 6.76684*10^-16, 4.81812*10^-17, 1.85861*10^-18, 1.19749*10^-19} The terms shrink fast: ListLogPlot[terms] Therefore I suspect all the digits shown here are correct: In[106]:= Total[terms] // InputForm Out[106]//InputForm= 9.425202795524033 A different way may be to use a contour integral if you can find the right contour. ----- Original Message ----- From: "Alexei Boulbitch" <alexei.boulbitch at iee.lu> To: mathgroup at smc.vnet.net Sent: Monday, December 13, 2010 10:34:34 PM Subject: [mg114726] [mg114709] Re: Calculate a numerical integral with enough precision NIntegrate[Exp[Sin[1/x]], {x, 0, \[Pi]/2}, WorkingPrecision -> 12, Exclusions -> (x == 0), PrecisionGoal -> 15] // Quiet 3.09892833696 * /Subject/: [mg114668] Calculate a numerical integral with enough precision * /From/: alphatest <iliurarfwpuap at mailinator.com> * /Date/: Sun, 12 Dec 2010 05:45:17 -0500 (EST) ------------------------------------------------------------------------ How can we calculate the following integral up to 10-12 decimal places? integrate exp(sin(1/x)) , x=0..pi/2 It's as if no integration method or precision option lets you calculate more than 5-6 decimal places. Is it possible? -- Alexei Boulbitch, Dr. habil. Senior Scientist Material Development IEE S.A. ZAE Weiergewan 11, rue Edmond Reuter L-5326 CONTERN Luxembourg Tel: +352 2454 2566 Fax: +352 2454 3566 Mobile: +49 (0) 151 52 40 66 44 e-mail: alexei.boulbitch at iee.lu www.iee.lu -- This e-mail may contain trade secrets or privileged, undisclosed or otherwise confidential information. If you are not the intended recipient and have received this e-mail in error, you are hereby notified that any review, copying or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal from your system. Thank you for your co-operation.