Is it legal to define a function to be undefined for some x?

84 Views Asked by At

Is the following definition legal:

f(x) = 1 for 0<x<1, and undefined otherwise.

Such functions clearly exist, but the question is if it is legal to just state "undefined" as part of the definition, without supplying the cause.

If this is not legal - how come? otherwise is there an example for such a definition from a renowned textbook in calculus?

Edit / Clarification: Some functions that are defined from (0,1) to R can also be extended to be from [0,1] to R. I need to prove that there exists a function that is defined at (0,1) but has no 0/1 limits. There are plenty of examples but is just writing "udefined" for outside (0,1) enough? Would such a definition constitute a function?

1

There are 1 best solutions below

3
On

When one defines a function $f$, part of the definition of $f$ is its domain and codomain. We usually write $f:A \to B$ if the domain is $A$ and the codomain is $B$. When one says $f(x)=1$ for $0<x<1$ and undefined otherwise, one simply means $f:(0,1) \to \mathbb{R}$.

As a side note, things in math aren't "legal" or "illegal". They can be correct, incorrect, valid, invalid, etc. But legality is something entirely different...