Timeline for NIntegrate versus Newton-Cotes or Gauss quadrature or other quadrature rules
Current License: CC BY-SA 4.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 27, 2020 at 16:37 | answer | added | Michael E2 | timeline score: 1 | |
Oct 27, 2020 at 13:57 | history | edited | Anton Antonov | CC BY-SA 4.0 |
added 24 characters in body
|
Jan 9, 2017 at 17:12 | comment | added | Michael E2 |
(1) If you mean that the singularity is a little outside the interval, then, yes, that is what I was talking about. You have to expect slow convergence in that case. The further outside the singularity (relatively), the better the convergence, which is why in part recursive subdivision succeeds. (2) If you mean that the true singularity is at r == 1 (exactly) and not a little outside the interval, then you cannot assign a numeric value to the integral. It is a simple pole at the end point of the interval, and AFAIK, no regularization or principal value can be applied to yield a value.
|
|
Jan 9, 2017 at 16:43 | comment | added | ashu sharma | @MichaelE2 The slow convergence is due to singularity and NIntegrate is applying either some transformation or some other quadrature rule to avoid this singularity. I didn't specify the precision while using NIntegrate so I do not think that rounding off error would play major role. | |
Jan 9, 2017 at 16:35 | answer | added | george2079 | timeline score: 3 | |
Jan 9, 2017 at 16:29 | comment | added | george2079 |
Be aware the result is extremely sensitive to the difference between 80.50305990274495 and (1+79.50305988978158 ), which is ~10^-8. You are really pushing things trying to do this with machine precision.
|
|
Jan 9, 2017 at 16:27 | comment | added | Michael E2 |
Your integrand has a value of 3.50774*10^9 at r -> 1 , which contributes to the slow convergence of a straightforward rule application. NIntegrate overcomes this by subdividing the interval several times near r == 1. . You seem to appreciate this, but the implication is that the sampling has to be very high near r == 1. You might also need to increase the working precision to avoid roundoff error.
|
|
Jan 9, 2017 at 16:08 | history | edited | Mariusz Iwaniuk | CC BY-SA 3.0 |
improved formatting
|
Jan 9, 2017 at 15:59 | history | edited | ashu sharma | CC BY-SA 3.0 |
added 96 characters in body
|
Jan 9, 2017 at 15:35 | answer | added | Stratus | timeline score: 0 | |
Jan 9, 2017 at 15:23 | comment | added | ashu sharma | How can I prove that ? Is there a way to calculate this using any other quadrature rules? | |
Jan 9, 2017 at 14:53 | history | asked | ashu sharma | CC BY-SA 3.0 |