Mathematica integration test
Former-commit-id: 810941fd93cdf9d26668f74f9e2e5941e5102201
This commit is contained in:
parent
3b89f6fbfc
commit
2b0a16f56c
|
@ -0,0 +1,12 @@
|
||||||
|
SigmaIntegrand[n_, k_, R_, x_] := Exp[-(R x)^2 + (k/(2 x))^2] x^(2 n) ;
|
||||||
|
l:= ReadList["values.in", Table[Number, {4}]];
|
||||||
|
For[i = 1, i <= Length[l], i++,
|
||||||
|
p := l[[i]];
|
||||||
|
n := p[[1]];
|
||||||
|
k := p[[2]];
|
||||||
|
r := p[[3]];
|
||||||
|
eta := p[[4]];
|
||||||
|
res := NIntegrate[SigmaIntegrand[n, k, r, x], {x,eta,Infinity}];
|
||||||
|
Print[InputForm[n], " ", CForm[k], " ", CForm[r], " ", CForm[res]]
|
||||||
|
];
|
||||||
|
|
Loading…
Reference in New Issue