2
$\begingroup$

I am trying to evaluate a limit:

gamma[w_] = Sqrt[-(u*e)w^2 + I*(u*s)w];
Limit[Re[gamma[x]], {x -> DirectedInfinity[1]}]

I calculated the limit by hand, and the correct answer is (I also checked numerically for some examples of $\{u,e,s\}$ using the software):

$\qquad \frac s2 \sqrt{\frac ue}$

But for some reason, when using Limit, I get

{DirectedInfinity[(Sign[e]^2 Sign[u]^2)^(1/4)]}

So my questions are:

What is going here?
What issues should I be aware of when using Limit?

$\endgroup$
1

2 Answers 2

6
$\begingroup$

I think it's worth reporting the issue to support. If you give appropriate assumptions, then you get your expected result:

Limit[Re[gamma[x]], {x -> Infinity}, Assumptions -> u>0 && e>0]

(s u)/(2 Sqrt[e u])

$\endgroup$
2
  • $\begingroup$ Thank you, it worked. $\endgroup$
    – Villa
    Commented Apr 28, 2019 at 22:43
  • $\begingroup$ Using Assumptions -> u >= 0 && e > 0 gives the same form as the OP's hand calculation. $\endgroup$
    – Bob Hanlon
    Commented Apr 28, 2019 at 23:32
2
$\begingroup$

The biggest difference between your hand calculation and the computation performed by Mathematica is that your hand calculation assumes $u$ and $e$ are nonnegative reals. Examples of how this produces different results:

  • $u = 1$ and $e = -1$: The limit of Re[gamma[x]] is $\infty$, but your formula gives an imaginary number. A similar thing happens with $u = -1$ and $e = 1$.
  • $u = 1$ and $e = 0$: The limit of Re[gamma[x]] is a directed infinity, directed along $\mathrm{Re} \sqrt{\mathrm{i}s}$, which could be $-\infty$, $0$, or $\infty$, depending on the complex argument of $s$. (Mathematica misses this case in the answer you are seeing. Some insight comes from looking at the leading order term in ComplexExpand[Re[Sqrt[-(u*e)w^2 + I*(u*s)s]]], which is $(e^2 u^2 w^4)^{1/4}$. Of course, when $e = 0$, this term is suppressed and then the leading term is $(s^2 u^2 w^2)^{1/4}$. Note that ComplexExpand assumes variables are real unless it is explicitly told otherwise, so it assumes more than we have explicitly established.)
  • $u = e = -1$: The limit of Re[gamma[x]] is $-s/2$, but your formula gives $s/2$.
  • $u = e = \mathrm{i}$: The limit of Re[gamma[x]] is $\infty$, but your formula gives $s/2$.
  • $u = \mathrm{i}, e = 0, s = 1$: The limit of Re[gamma[x]] is $0$, but your formula involves division by zero.
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.