There are a couple of ways for defining the limit of a function f(x) say as x-->a, where a could be a real nr. or infinity.
One of these ways is using \epsilon,\delta
Def.Let f(x) be a function defined in an open interval containing a. Then A is said to be the limit of the function f(x) as x goes to a, if for every \epsilon>0,\exists \delta(\epsilon)>0 such that
|f(x)-A|<\epsilon, / / / / whenever / / / / 0<|x-a|<\delta
and we write it: \lim_{x\rightarrow a}f(x)=A
Another way to define it, is using heine's definition using sequences, then another way is in terms of infinitesimals.
Note: the reason that it is required that 0<|x-a| is that it is not necessary for the function f to be defined at x=a, since when working with the limit as x-->a we are not really interested what happens exactly at x=a, but rather how the function behaves in a vicinity of a.