I am new to Calculus and would like a CAS program to check my work without any hassles. I tried evaluating $\lim _{x\to 0}\left(\frac{1}{x}\right)$, a limit where the two sided limit DOES NOT EXIST in mathmatica, but it only evaluates the right side and gives me $\infty$.

Limit[1/x, x -> 0]->$\infty$

enter image description here

The graph of $\frac{1}{x}$ is as follows:

enter image description here

As you can see, the right side is $\lim _{x\to 0+}\left(\frac{1}{x}\right)=\infty $ and the left side is $\lim _{x\to 0-}\left(\frac{1}{x}\right)=-\infty $. So mathematica, just gives me the wrong answer! What CAS program do you guys suggest that would evaulate these limits correctly? One that gives me doesn't exist when the left and right side are not equal!


This is not a bug in Mathematica, it is a feature; see Examples $\to$ Scope in the Mathematica documentation for the command $\texttt{Limit[]}$.

As that documentation shows, one can compute left- and right-handed limits of real-valued functions in Mathematica respectively with the commands

Limit[1 / x, x -> 0, direction = -1]


Limit[1 / x, x -> 0, direction = 1]

which respectively return



Since these limits disagree, by definition the limit (in the real sense) does not exist.

Anyway, perhaps anticipating this complaint (and presumably its disproportionate use by students relative to Mathematica), submitting the query

Limit[1 / x, x -> 0]

to WolframAlpha returns explicit, separate results for the two-sided, left-handed, and right-handed limits:

enter image description here

By default Maple operates the way you'd like: The command

limit(1 / x, x = 0)



and one can indicate that one wants the complex interpretation of the limit with the command

limit(1 / x, x = 0, complex)

which returns the slightly peculiar output

∞ - ∞ I

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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