Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results for interpolationpointssubdivision
Search options not deleted
1 vote
0 answers
61 views

Why does the InterpolationPointsSubdivision method fails to calculate this integral correctly?

", ySpectrum["InterpolationPointsSubdivision",0.2,0.3] gives zero, while ySpectrum["AdaptiveMonteCarlo",0.2,0.3] is non-zero (as it should be, if looking at the initial data). … But how to make "InterpolationPointsSubdivision" work correctly? It does not work properly with non-rectangular regions of integration. …
John Taylor's user avatar
  • 5,963
0 votes
0 answers
1k views

Interpolation function and numerical integration

Now, using "InterpolationPointsSubdivision" and "MaxSubregions: NIntegrate[F02000200L[q],{q,0,1},Method->{"InterpolationPointsSubdivision","MaxSubregions"-> 202,"SymbolicProcessing"-> 0}]//AbsoluteTiming … {23.8689, 0.0670531} NIntegrate[F01200L[q],{q,0,1},Method->{"InterpolationPointsSubdivision","MaxSubregions"->202}]//AbsoluteTiming {0.00181735, 0.0670531} NIntegrate[F011000L[q],{q,0,1},Method->{"InterpolationPointsSubdivision
Pierre's user avatar
  • 193
1 vote
0 answers
84 views

Speeding up a minimisation involving Numeric integral and Interpolating function

Log[k])^2 Log[ 0.41623309053069724` (-4.440892098500626`*^-16 + 0.25` w^2)] Log[ 0.4152917725412687` (2.407945608651872` + Log[k])])), {k, 1, (w^2 - MJpsi^2)/4}, Method -> {"InterpolationPointsSubdivision … ", "MaxSubregions" -> 25000}])) I used method InterpolationPointsSubDivision as suggested in a post by @J.M f52[w_? …
CAF's user avatar
  • 510
15 votes

How to integrate functions of linearly interpolated data?

A relatively obvious but poorly documented and probably still not optimal choice for integrands containing interpolating functions is the preprocessor method "InterpolationPointsSubdivision". … Edit: as Alexey has found the improvement in precision is actually independent of the method setting "InterpolationPointsSubdivision", it's rather the combination of "LocalAdaptive", "Partitioning" and …
Albert Retey's user avatar
  • 23.6k
-1 votes
3 answers
925 views

Problem with NIntegrate over a highly-oscillatory integrand

To do that, I the function Si2[a_, b_] := NIntegrate[Sin[x - y]/(x y), {x, a, b}, {y, x, b}, AccuracyGoal -> 25, PrecisionGoal -> 25, WorkingPrecision -> 40, MaxRecursion -> 1000000, Method -> "InterpolationPointsSubdivision … Note that I use the InterpolationPointsSubdivision method because I saw in various answers that it is a good method to evaluate numerically a highly-oscillatory integrand. …
EZLearner's user avatar
  • 295
13 votes
Accepted

How to speed up integration of interpolation function?

The way to deal with this is to use the special setting Method -> "InterpolationPointsSubdivision" of NIntegrate[], which will automagically split the integrand so that an integration rule (by default, … "]] // AbsoluteTiming {0.0798281, {-0.00929476, -0.00291246}} Options[NIntegrate`InterpolationPointsSubdivision] displays the suboptions that can be fed to this method. …
J. M.'s missing motivation's user avatar
3 votes

Integral of a Wavelet function

Verify how many interpolation points are used in the integration interval of interest: Count[Flatten[derPhi["Grid"]], x_ /; 1/4 < x < 1/2] 63 We can then use the "InterpolationPointsSubdivision" … The count above is well within the default setting of "MaxSubregions", so that doesn't need to be adjusted: NIntegrate[derPhi[x], {x, 1/4, 1/2}, Method -> {"InterpolationPointsSubdivision" …
4 votes

Integrating an empirical probability density function

With this, the PDF is just cdfEmpirical'[x], which we can now use with NIntegrate[] NIntegrate[x cdfEmpirical'[x], {x, 0, xdat[[-1]]}, Method -> "InterpolationPointsSubdivision"] 1.99802 … where the preprocessor method "InterpolationPointsSubdivision" allows NIntegrate[] to split the function internally into sections NIntegrate[] can easily handle. …
J. M.'s missing motivation's user avatar
1 vote

How to deal with highly oscillatory integrand when using "NIntegrate" and have a precise result

This has similar oscillatory characteristics as the OP's and can be integrated (after a couple of minutes) with "InterpolationPointsSubdivision": ifn = NDSolveValue[ {y'[x] + (1/2 + 2 Sin[10 x]) y[ … x] == Exp[-Sin[x/100]^2], y[0] == 10}, y, {x, 0, 500}] ListLinePlot@ifn Length[ifn@"Grid"] (* 34655 *) NIntegrate[ifn[x] Exp[10 I x], {x, 0, 500}, Method -> {"InterpolationPointsSubdivision
Michael E2's user avatar
  • 245k
3 votes
Accepted

Interpolation works slowly

weak singularities, which require dense sampling to get an accurate estimate or require the integration region to be broken up according to the pieces of the piecewise interpolation, which is what the "InterpolationPointsSubdivision … i1 = NIntegrate[ DistrToyInterpolated[thh, Eh], {thh, 0, Pi}, {Eh, 125, 3000}, Method -> {"InterpolationPointsSubdivision", "MaxSubregions" -> 315*3000/5, (* slight overestimate from interpolation …
Michael E2's user avatar
  • 245k
3 votes
Accepted

Integrating over colors

From here, we can use the sRGB conversion functions from this answer, and then use NIntegrate[] with the setting Method -> "InterpolationPointsSubdivision": (* gamma correction *) sRGBGamma = Function … 12.92 z, z <= 0.0031308}}, 1.055 z^(1/2.4) - 0.055]], Listable]; NIntegrate[Clip[#, {0, 1}]/λ^4, {λ, 385, 700}, Method -> "InterpolationPointsSubdivision
3 votes

NIntegrate not working after interpolation

Yet another way to tell Mathematica to automatically split the integrand before integrating is to use the option setting Method -> "InterpolationPointsSubdivision", like so: With[{T = 1, w = 0.05, num … {x, -T/2, T/2, T/(num - 1)}], InterpolationOrder -> 1]]]; With[{T = 1}, Table[NIntegrate[funINT[t] Exp[-2 π I k t/T]/T, {t, -T/2, T/2}, Method -> "InterpolationPointsSubdivision
J. M.'s missing motivation's user avatar
6 votes

Integrating a function containing a wavelet

If, after all that, you still want to use NIntegrate[], the right Method setting to use is "InterpolationPointsSubdivision", which will split the InterpolatingFunction[] at its grid points, and integrate … With all these considerations: NIntegrate[(10 x - x^2) dw6[x], {x, 0, 10}, Method -> {"InterpolationPointsSubdivision", "MaxSubregions" -> 3000, …
J. M.'s missing motivation's user avatar
9 votes
Accepted

How to integrate functions of linearly interpolated data?

Update: After identifying and fixing a problem with data, we show that the setting the "MaxSubregions" option of "InterpolationPointsSubdivision" to the number intervals created by the interpolation points … First answer To get a complete "InterpolationPointsSubdivision", a sufficient number of subregions needs to be allowed with the "MaxSubregions" option. …
Michael E2's user avatar
  • 245k
8 votes
Accepted

Numerical Integration different in Mathematica version 9 and 10 with same options

In V9, this is done only if Method -> "InterpolationPointsSubdivision" is used. … samplePlot[ myIntegrationFunction[interpFunc, 8, Method -> {"InterpolationPointsSubdivision", "MaxSubregions" -> 1}] ] NIntegrate::slwcon: Numerical integration converging too slowly; suspect …
Michael E2's user avatar
  • 245k

15 30 50 per page