The key to the evaluation of oscillatory integrals is to truncate integral at the right point. For this example you need to choose upper limit of the form
πN+π2
Before explaining why it should work, let me at first show that it actually produces good results.
Asymptotics
It is easy to guess that asymptotic series has the form
I(λ)∼2πλ−−−√[cos(λ−π4)+c1sin(λ−π4)λ+c2cos(λ−π4)λ2+c3sin(λ−π4)λ3+…]
In order to check numerically that c1=18 it is enough to plot difference between an integral and leading asymptotic expression.
int := NIntegrate[Cos[l*Cos[x]]*Sinc[x], {x, 0, 20.5*Pi}];
Plot[{l*(Sqrt[2*l/Pi]*int - Cos[l-Pi/4]), Sin[l-Pi/4]/8}, {l, Pi/4, 20}]
As an output you get quite a nice sine which coincides with the one you derived above.
यदि आप निम्नलिखित गुणांक ढूंढना चाहते हैं, तो आवश्यकता होने पर कोड का थोड़ा अधिक परिष्कृत टुकड़ा। नीचे दिए गए कोड का विचार कई उच्च-स्तरीय ऊपरी मानों को लेना और उनके परिणामों को "औसत" करना है।
J[l_?NumericQ] := Block[{n=500},
f[k_] := NIntegrate[Cos[l*Cos[x]]*Sinc[x], {x,0,(n+k)*Pi+Pi/2},
Method->{"DoubleExponential"}, AccuracyGoal->14, MaxRecursion->100];
1/2*((f[0]+f[1])/2+(f[1]+f[2])/2)
]
t = Table[{l, l^2*(Sqrt[2*l/Pi]*J[l] - Cos[l-Pi/4] - 1/8*Sin[l-Pi/4]/l)},
{l, 4*Pi+Pi/4, 12*Pi+Pi/4, Pi/36}];
Fit[t, Table[Cos[l-Pi/4+Pi/2*n]/l^n, {n, 0, 10}], l]
जो निम्न उत्तर उत्पन्न करता है।
सी2= - ९128,सी3= - 751024,सी4= 367532768,...
व्याख्या
सरल उदाहरण है
चित्रण के लिए मैं साइन के अधिक सरल उदाहरण का उपयोग करने जा रहा हूं - अभिन्न
एस( x ) = ∫एक्स0पाप( y)yघy।
मुझे लगता है कि मैं मूल्य में रुचि रखते हैं कल्पना करते हैं एस( ∞ ) = π2, लेकिन मैं यह नहीं जानता।
आपने देखा एस( x ) oscillates around its limiting value similarly to how partial sums of alternating in sign series oscillate with upper cut-off.
SN=∑n=1N(−1)nn.
When you want to estimate such sum, according to Euler series acceleration method you should take
S≈SN+12(−1)N+1N+1.
Or in terms of sine--integral function, you should integrate it up to the point between maximum and minimum of oscillations. As it is clearly seen from the plot such point are approximately given by
S(x)≈∫πN+π20sinxxdx
for large values of argument. More generally, such point is the one where max|S′(x)| occurs.
Your problem
Coming back to integral from Konstantin and Yaroslav's course you can see that it behaves exactly the same way as sine--integral as a function of upper limit. That means you only need to calculate values
Ix0(λ)=2∫x00cos(λcos(x))sinc(x)dx
with x0=πN+π2. Below is the plot of several such values with λ=12π.
tab = Table[{x0, 2*NIntegrate[Cos[12*Pi*Cos[x]]*Sinc[x], {x, 0, x0},
Method->{"DoubleExponential"}, AccuracyGoal->12, MaxRecursion->100]},
{x0, 10*Pi+Pi/2, 30*Pi+Pi/2, Pi}];
tab1 = Table[(tab[[i]] + tab[[i+1]])/2, {i,1,Length[tab]-1}];
ListPlot[{tab, tab1}]
Here you can see the result of another acceleration method. I rearrange partial sums in the following manner
S′N=12(SN+SN+1)
and obtain new sequence S′N which converges much faster. That trick also happens to be useful if you want to evaluate integral with high precision.