# Calculating a limit with a result that is discontinuous in the parameters

The following limit is left unevaluated (Edit: added the assumption that $\epsilon$ is real thanks to the comment below):

Limit[ 1/(1 + Exp[ϵ/T]), T->0, Direction->-1, Assumptions->ϵ ∈ Reals]

However, the limit is easy to calculate (it is the Fermi-Dirac distribution), and it gives $\theta(-\epsilon)$. It seems that MMA has a hard time when the result is discontinuous in the parameters.
Nevertheless, MMA can actually calculate the limit, if we help it by explicitly splitting up the parameter space:

In[2]:= Limit[1/(1 + Exp[ϵ/T]), T->0, Direction->-1, Assumptions->#] & /@ {ϵ > 0, ϵ < 0}
Out[2]= {0, 1}

Is there a way to make MMA automatically calculate such limits, without explicitly splitting up the parameter space?

-
The thing here is that Mathematica always thinks that variables take on complex values, unless told otherwise (via, say, Assuming[] or the Assumptions option)... –  Ｊ. Ｍ. Jun 25 '12 at 12:07
Yes, that's why I only posted a comment as opposed to an answer. Note that both HeavisideTheta[] and UnitStep[] have a different definition from your $\theta(u)$; your limit evaluates to $\dfrac12$ for $\varepsilon=0$, for instance. –  Ｊ. Ｍ. Jun 25 '12 at 12:20
It's a bit too specific (that is, unless I see multiple Limit[]-related questions cropping up, I don't see the need); at the moment, calculus-and-analysis is sufficient to cover your question. –  Ｊ. Ｍ. Jun 25 '12 at 12:26
As there is no Limit (only directionally, going from left or from right), Mma is not going to give you an answer. Equivalent to your construction Limit[1/(1 + Exp[x/T]), T -> 0, Direction -> #, Assumptions -> x > 0] & /@ {1, -1} –  belisarius Jun 25 '12 at 12:27
@Joe I was only trying to say that if the limit from the right is different from the limit from the left, Mma will not give you a result –  belisarius Jun 25 '12 at 12:49