# What is the right definition of the limit of a function?

So I came to this question while trying to answer simpler one: "Is square root function continuous at $0$ or only right continuous?"
If you look at the wikipedia page about $\varepsilon$-$\delta$ definition of the limit: link. It includes the requirement for the point to which the input approaches to be limit point of the function`s domain.

Now if we go to the wikipedia page about limits of function we get the following definition: link. There the domain of the function itself is restricted to be open interval or real line. So I decided to take examples of definitions from analysis and calculus textbooks. So in Rudin's "Principles of Mathematical analysis" we have the definition which applies to metric spaces but it certainly can be specified to real-valued functions of real variable, so actually his definition is the same as definition on the first wikipage I mentioned.
If we take a look at Spivak's "Calculus", his definition I think can be summarized as follows: $\forall\epsilon\gt 0 \exists\delta\gt0 \forall x,0\lt|x-a|\lt\delta\to|f(x)-L|\lt\varepsilon$ and also he adds a requirement for $f$ to be defined in some open neighborhood of $a$, except maybe $a$ itself.
And the problem with different definitions is that they are not equivalent. The definition of Rudin and Spivak are not equivalent because e.g. by Rudin's definition square root of $x$ with domain of nonnegative reals is continuous at $0$, but by Spivak's, it's not.
If you look at the definition by Rudin (or wikipage I mentioned first) it allows for limits of functions with domains which are not open intervals, but definition in the second wikipage allows only limits of functions with domains which are open intervals.

So what definition is right (actually there may be some other definitions in other textbooks, so you can give them as an answer to the question) ? Or am I too pedantic about it ?

• @mvw OK, sorry, I will try to edit it. – Юрій Ярош Aug 15 '18 at 10:55
• The first wikipage link you mentioned claims that it's definition is taken from Spivak. Can you please write down the definition from Rudin? – uniquesolution Aug 15 '18 at 10:58
• @uniquesolution Yes, it really says that it is taken from Spivak, but I checked Spivak and there I see other definition (one I have written in the post), but if you want, I will write Rudin's definition. – Юрій Ярош Aug 15 '18 at 11:06
• The definition you wrote in your post, which you say is from Spivak, seems to me identical to the definition linked to by your first wikipage, which is not surprising, because they are both from Spivak. What difference do you see? And yes, please do add the Rudin's definition, as it is an essential part of your post. – uniquesolution Aug 15 '18 at 11:13
• @uniquesolution The definition in the body of the question is not the same as the definition on the first linked wiki. The definition on the first linked page allows the function $f(x)=x$ with domain $\mathbb{Q}$ to have limits everywhere unlike the definition given in the OP under which it has a limit nowhere. – DRF Aug 15 '18 at 12:06

I don't have either of the books in front of me, but I've had this issue for a long time aswell.

Let me quickly restate the two definitions:

The main quantifier part is the same i.e.:

$$\forall \epsilon\;\exists \delta \;\forall x \;\;((0<|x-c|<\delta)\implies (|f(x)-L|<\epsilon))$$

The difference is that in one case for the limit to exist you require there is some punctured neighborhood of $c$ which is in the domain of $f$ and in the other case you just require that $c$ is a limit point of the domain.

The second definition is a generalization of the first as can readily be seen. Which one is correct is in some sense not a reasonable questions. They are definitions they are both self consistent so they are both "right" as far as definitions go. Rather it is a matter of convention which one is used in a given tradition/school etc. Lately I seem to have seen more of the more restrictive version (with punctured neighborhoods) but personally I seem to remember being taught the more general one.

EDIT On reflection following some insightful comments from @Hurkyl I must admit the choice of wording of "more general one" isn't really great. It implies that the second version is a generalization of the first which probably isn't right in the sense that while you can say a "ring is a generalization of field" the important distinction is I'm calling this a ring. I don't go on calling something without inverses a field.

The thing I wanted to also add is that what I will call the second limit definition has some strange consequences if you let it do work in places like the definition/theorem on continuity. Specifically with that definition of limit you get that $f(x)=x$ with domain $\mathbb{Q}$ is continuous wherever defined. This is not something people generally tend to think of as a continuous function on the reals though.

@Hurkyl made another great point which is that really the trouble is we treat partial functions without the respect they deserve. If you restrict yourself only to functions which are total on $\mathbb{R}$ all the problems go away and the definitions become equivalent.

• It's not a generalization, it's a difference. For example, one leads to "$\sqrt{x}$ is continuous at $0$" and the other to "$\sqrt{x}$ is not continuous at zero". I can see both options being the right answer for different notions of what one wants to convey by saying a partial function is continuous at a point. – Hurkyl Aug 15 '18 at 12:23
• @hurkyl I think we might have a different notion of generalization. Anything that has a limit under the first definition still has a limit under the second definition and the limits agree. What then would for you be a generalization if not that? The fact that you don't get the same notion of continuity if you base it on the different versions of limits seems incident to using the limit definition to define continuity (which IMO is wrong. There is a perfectly good definition of continuity from first principles.) – DRF Aug 15 '18 at 12:35
• I view this as sort of being like deciding to set $0/0=1$. Sure, you can now divide more things, but the old way of leaving it undefined said something that we actually wanted to say and this decision changes that. I'm saying that these two different definitions of limit say slightly different things about the nature of what limits mean for partially defined functions. E.g. that "$\sqrt{x}$ doesn't have a limit at $x=0$" is an intentional feature of the one definition. – Hurkyl Aug 15 '18 at 12:41
• @Hurkyl I see what you're saying. And it's worth considering the fact that the topological definition of continuity doesn't play well with the "more general" version of limit. (Preimage of open is open obviously breaks for functions only defined on $\mathbb{Q}$ no matter how nice they are.) – DRF Aug 15 '18 at 12:51
• If you want to adapt that approach to limits of partial functions, the domain of your partial function inherits the subspace topology, so you can restrict to the domain and apply the usual notions for total functions. – Hurkyl Aug 15 '18 at 12:55