# Can Mathematica be configured to not lazy-evaluate by default? [closed]

I notice that VerificationTest will see False for a function in cell 1

f[x_] :=(x - 1) (x - 3) / (x + 2)


referred to in cell 2:

VerificationTest[Limit[f[x], Rule[x, -2]], \[Infinity]]


after hitting Shift+Enter in cell 2 only (in a newly-opened notebook with many, many cells) —but Evaluation > Evaluate Notebook will cause VerificationTest to see True. Is there some default option or something I am missing here or is this just the way it is for now?

• You presumably intend your function to be f[x_] := (x - 1) (x - 3)/(x + 2) since you expect a pole at x == 2. Your Limit is written improperly using RightArrow[x, -2] rather than Rule[x, -2] See documentation for Rule The Limit should not successfully evaluate no matter how you initiate the evaluation. – Bob Hanlon Nov 7 '16 at 20:53
• @bob-hanlon your presumption is correct. I have updated my question. Once I get back to my Mathematica machine, I will verify my Limit syntax. Why would an error not be thrown? – rasx Nov 7 '16 at 21:32
• The VerificationTest outcome is Failure this presumably covers all errors. If you extract the Limit and evaluate it separately, it returns the error message "Limit::lim: Limit specification x[RightArrow]-2 is not of the form x -> x0." and returns the Limit unevaluated. – Bob Hanlon Nov 7 '16 at 21:42
• So what you are saying is that you wrote down the definition of f, didn't evaluate it (so f remained undefined), and only ran the verification test? – Rahul Nov 8 '16 at 6:00
• @rahul I am saying that f is defined in a different cell (in a notebook full of cells) from the cell with the test in it. I see now that cells are lazy loaded: i need to Shift+Enter on the f cell as well as the test cell ---this answers my question part but does not answer the possibility that Mathematica can be configured to behave differently... – rasx Nov 8 '16 at 8:09

• You wrote: f[x_] :=(x - 1) (x - 3) / x + 2
• I think you meant to write: f[x_] :=(x - 1) (x - 3) / (x + 2)
• Your correction is correct but did you just enter the correct function and hit Shift+Enter or did you have to Evaluate Notebook? (What I entered in my question is NOT what I entered in Mathematica...) – rasx Nov 7 '16 at 21:23