I have the following integral that I wish to evaluate using Mathematica:
Assuming[{x > 0, y > 0}, NIntegrate[(x - d)/(2 σ^2)Exp[(I k x^2)/(2 R)- (x - d)^2/(4 σ^2)] NIntegrate[Exp[(I k y^2)/(2 R) - (I k y x)/R], {y, -0.5, 0.5}], {x, -0.01, 0.01}]]
For which Mathematica returns with the error: 'The integrand $e^\left({\frac{-I x y}{10} + \frac{I y^2}{20}}\right)$ has evaluated to non-numerical values for all sampling points in the region with boundaries {{-0.5,0.0}}'
All coefficients have been initialised to values: $d = 1, R = 10, k=1$. Are there any tips that I could try to evaluate this?
i
is notI
which is (Sqrt[-1]
) $\endgroup$Assuming[]
is useless here; apart from @chuy's prescription, you need to specify numerical values for your parameters to get something out ofNIntegrate[]
. $\endgroup$@Guess who it is
I already have all of the values specified:$d = 1$, $R = 10$, $k=1$
. The only variables not initialised are x and y since these are the integration variables. Also in the script, I have:ii:
which suitably yields the imaginary unit,I
. The error still persists. $\endgroup$NIntegrate[]
? Like,NIntegrate[(* stuff *), {x, -0.01, 0.01}, {y, -0.5, 0.5}]
? $\endgroup$NIntegrate[ x NIntegrate[x y, {y, 0, 1}], {x, 0, 1}]
$\endgroup$