I tried to make numerical integration of function for continuous (7.nb) and discrete times (9.nb). I have the following questions concerning discrete time:
- with logarithmic scale values of time more than 4?? are not shown, but I need to get less than 1???.
- with linear scale, on the contrary there appears ??? 2us, although in the original array the maximum value is 1us
- while calculating coefficient (at the bottom of file) the program says about dixision by 0. But it is not possible, as in Mathcad I get the result of about 10^-12
- function z is not calculated, but it exists analytically
http://zalil.ru/34911397/5efb62f5.52dc96a8/9.nb
9.nb
c = 3*10^8;H = 7.2*10^5;\[Tau] = 47*10^-6;Fd = 7200;Tp = 50*10^-6;f = 3.5*10^8;
v = 7500;Q = 18000;L = 100;s2 = 0.003;s1 = 2; \[CapitalTheta]0 = 0.018;m = 256;
\[Lambda] = 0.022;n = 3;lm = 25;d = 1.2;\[Lambda] = 0.022;n = 3;P0 = 25;\[Eta] = 0.8;
KIP = 0.4;kf = Sqrt[0.5];\[CapitalTheta]s = 1;
t = Sort@{-10^-8, -20^-9, -10^-9, 0, 10^-11, 10^-10, 10^-9, 10^-8, 20*10^-7, 2*10^-6, 10^-6};
p = Sum[NIntegrate[ Exp[(\[Pi] Fd^2 Tp^2 (m - Abs[k])^2 x^2)/H^2 - (n^2 \[Pi]^2 d^2 y^2)/
(\[CapitalTheta]0^2 \[Lambda]^2 \H^2*141^2) - (100 lm^2 x^2 s1^2)/(H^2 L^2 \[Pi]^2 s2^2) -
(100 lm^2 \y^2*s1^2)/(H^2 L^2 \[Pi]^2 s2^2) - (5.55 (y^2 + x^2))/(H^2 \[CapitalTheta]0^2) -
\[Pi] (f^2 (t - k Tp - x^2/(c H) - y^2/(c H))^2 + 2 Q (v k Tp)/(H d) + \[Tau]^2 ((v k Tp)/(H d))^2)],
{x, \-Infinity, Infinity}, {y, -Infinity, Infinity}, MaxRecursion -> 40,
AccuracyGoal -> 60, Method -> "AdaptiveMonteCarlo"],
{k, -255, 255}];
ListLogPlot[Transpose[{t, p}], Joined -> True, PlotRange -> All]
ListPlot[Transpose[{t, p}], Joined -> True, PlotRange -> All]
(P0*((4*\[Pi] (\[Pi]* d^2)/^4)/\[Lambda]^2)^2*\[Lambda]^2*f*\[Tau]*KIP*\[Eta]*kf^2)/(64*\\[Pi]^2*H^2)
Exp[-((16*\[Pi]^2*s2^2)/\[Lambda]^2)](d^4 f kf^2 KIP P0 \[Pi]^2 \[Eta] \[Tau])/
(4 H^2 Null^8 \[Lambda]^2)E^(-((16 \[Pi]^2 s2^2)/\[Lambda]^2))(P0*((4*\[Pi] (\[Pi]* d^2)/^4)/
\[Lambda]^2)^2*\[Lambda]^2*f*\[Tau]*KIP*\[Eta]*kf^2*c)/
(\32*\[Pi]^2*H^3*s1^2)(c d^4 f kf^2 KIP P0 \[Pi]^2 \[Eta] \[Tau])/(2 H^3 Null^8 s1^2 \\[Lambda]^2)
z = Sum[NIntegrate[ Exp[-(5.55* r^2)/(H^2 *\[CapitalTheta]0^2) - (11.1* r*\[CapitalTheta]s^2*Cos[\[Phi]])/
(H *\[CapitalTheta]0^2) - r^2/(H^2 *s1^2) - \[Pi]* f^2*(t - k Tp - r^2/(c H) - \[Eta])^2],
{\[Eta], -Infinity, Infinity}, {r, 0, Infinity}, {\[Phi], 0, 2*\[Pi]}, MaxRecursion -> 40,
AccuracyGoal -> 60, Method -> "AdaptiveMonteCarlo"],
{k, -255, 255}];
ListPlot[Transpose[{t, z}], Joined -> True, PlotRange -> All]
Questions concerning continuous time:
- Why doesn’t the graph show anything?
http://zalil.ru/34911400/5efb62f5.52dc96a8/7.nb
7.nb
c = 3*10^8;
H = 7.2*10^5;
\[Tau] = 47*10^-6;
Fd = 7200;
Tp = 50*10^-6;
f = 3.5*10^8;
v = 7500;
Q = 18000;
L = 100;
s2 = 0.003;
s1 = 2;
\[CapitalTheta]0 = 0.018;
m = 256;
\[Lambda] = 0.022;
n = 3;
lm = 25;
d = 1.2;
\[Lambda] = 0.022;
n = 3;
p[t] := Sum[
NIntegrate[
Exp[(\[Pi]*Fd^2*Tp^2*(m - Abs[k])^2*x^2)/
H^2 - (n^2*\[Pi]^2*d^2*y^2)/(\[CapitalTheta]0^2*\[Lambda]^2*
H^2*141^2) - (100*lm^2*x^2*s1^2)/(H^2*L^2*\[Pi]^2*
s2^2) - (100*lm^2*y^2*s1^2)/(H^2*L^2*\[Pi]^2*
s2^2) - (5.55*(y^2 +
x^2))/(H^2*\[CapitalTheta]0^2) - \[Pi]*(f^2*(tt - k*Tp -
x^2/(c*H) - y^2/(c*H))^2 +
2*Q*(v*k*Tp)/(H*
d) + \[Tau]^2*((v*k*Tp)/(H*d))^2)], {x, -Infinity,
Infinity}, {y, -Infinity, Infinity}, MaxRecursion -> 40,
AccuracyGoal -> 60, Method -> "AdaptiveMonteCarlo"], {k, -255,
255}];
Plot[p[t_], {t, -10^(-8), 10^(-6)}, PlotPoints -> 30,
MaxRecursion -> 0]
I would like to correct it with your help.