I have the following quantity
$$ f = \frac{\exp(\sqrt{-k^2-i\epsilon}d)}{\sqrt{-k^2-i\epsilon}} $$
and form the limit as $\epsilon\to0$. Mathematica does not produce the correct result.
Code:
f = -(E^(Sqrt[-k^2 - I ϵ] d)/Sqrt[-k^2 - I ϵ]);
g1 = Limit[f, ϵ -> 0, Direction -> "FromAbove",
Assumptions -> Element[{k}, Reals] && ϵ >= 0];
g2 = Limit[f, ϵ -> 0, Direction -> "FromAbove",
Assumptions -> Element[{k}, Reals] && ϵ >= 0 && k > 0];
The second one gives the correct result for positive $k$, the first one yields the complex conjugate. Of course this is related to various branch cut things, but I am very surprised that the assumption $k>0$ would yield any difference, since only $k^2$ appears in the equation.
By "correct result" I mean the limit as $\epsilon\to0^+$. I can take e.g. $\epsilon=10^{-10}$ and get a result that agrees with the $g_2$ up to errors of $\mathcal O(10^{-10})$, but not with $g_1$.
\[Epsilon] >= 0
(because "Limit::alimv: Warning: Assumptions that involve the limit variable are ignored.") The resultsg1 , g2
are both correct. $\endgroup$Direction->"FromAbove"
is in contradiction with\[Epsilon\>0
. $\endgroup$