0
$\begingroup$

I have the following Green's function that I am trying to evaluate for several different values on a defined mesh. The mesh and Green's function is defined below. The mesh runs from values -w/2 to w/2.

n = 100
w = 1*10^-4;
\[CapitalDelta] = w/n;
L = 30*10^-7;
p = L/w;


y[i_] := Piecewise[{{-(w/2) + \[CapitalDelta]/
 2 + (i - 1)*\[CapitalDelta], 
1 <= i <= n - 1}, {w/2 - \[CapitalDelta]/2, i >= n}}, 0]
swv = Table[y[i], {i, n}];
mesh = Table[Abs[y[1] - y[j]], {j, n}];
x[i_] := mesh[[i]]


Gxx[s_, k_?NumericQ] := NIntegrate[(( t^2 ((s)^2 + t^2 + p^2) - p^2 (s)^2)/(
 Sqrt[(s)^2 + t^2 + p^2] ((s)^2 + t^2)^2) - 
 t^2/(Sqrt[(s)^2 + t^2])^3) Cos[k t]/(\[Pi] p) , {t,  0, \[Infinity]}, Method -> {"GlobalAdaptive", "SymbolicProcessing" -> 0}]

s takes the values from x[i]. The parameter k physically speaking is the wavenumber and I'm interested in its values up to about the order of 10^5. I've tried adjusting the the method in Nintegrate and does not help alot with convergence. Any ideas?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.