0

Say I have some function where a certain condition cannot be fulfilled for certain inputs, e.g. $$f(x)=\max_{a\in \mathbb{N}, a < x}\quad a^2$$ and I plug in $x=-3$. Then there is no number $a$ such that $a\in \mathbb{N}$ and $a<-3$, hence I cannot compute $a^2$. What is $f(-3)$?

Duck71
  • 3
  • 3
  • 1
    probably f(-3) is nothing squared. jokes aside, you can probably say that your function is only defined for non-empty sets, or set it to be whatever you'd like if the set is empty. The choice is yours and it depends on your use case, in my opinion. – Confused Soul Nov 22 '22 at 02:11
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Nov 22 '22 at 02:14
  • https://en.wikipedia.org/wiki/Empty_set#Extended_real_numbers – RobPratt Nov 22 '22 at 02:42

1 Answers1

0

The example you provide is undefined at the point $x=-3$. Therefore, if you were to plot this as a graph there would be no defined value of $f$ corresponding to $x$ at this point.

There are many such examples of functions that are undefined at specific values of $x$. For example $h(x) = \frac{1}{x}$ is undefined at $x=0$ or $g(x) = \log (x)$ is undefined for all negative values of $x$.

There are a number of ways you can deal with this. Either you can restrict the domain so that $x$ can only take values where the maximum is defined. Or, you can keep an unrestricted domain and allow there to be discontinuities in your function. Another common fix is to multiply the function by an indicator function so that the function is equal to $0$ at all the points which were previously undefined.

Also, as best practice for notation, you should define the function in the question in the following way. For $f: \mathbb{R} \rightarrow \mathbb{R}$ let the function $$f(x) := \max \{ a^2 \in \mathbb{N} \space : \space a<x, \space a \in \mathbb{N}\}$$

You should exclude negative value of $x$ to ensure that the function excludes the discontinuity that you provided by simply rewriting the function as $f: \mathbb{R}^+ \rightarrow \mathbb{R}$ (where $\mathbb{R}^+$ refers to the set of strictly positive real values of $x$). This now fixes the function and allows it to be defined across the entire domain as you should expect from a function.

So the correct way to write this (to avoid points where the function is not defined) is very similar to what you meant by your original question - except we now include this restriction of the domain to give us the function $F: \mathbb{R}^+ \rightarrow \mathbb{R}$ such that:

$$F(x) = \max \{ a^2 \in \mathbb{N} \space : \space a<x, \space a \in \mathbb{N}\}$$

FD_bfa
  • 3,989
  • 2
    It makes no sense to talk about discontinuities of that function, really. A function has to be defined at a point to even have a chance to be discontinuous there... – Mariano Suárez-Álvarez Nov 22 '22 at 02:40
  • @MarianoSuárez-Álvarez I think I made it clear in my answer, that the domain should be restricted. I just gave the OP two different options. Either, they can leave the function to be defined across the entire domain (leading to “undefined” values of f) or they can restrict the domain (which is better - as I stressed). – FD_bfa Nov 22 '22 at 02:44
  • @MarianoSuárez-Álvarez Also, to add. I said that was the “best practice” for writing out the function in the original question. So the choice not to restrict the domain at that point of my answer was deliberately to show the OP how to write their own function properly first before showing how to restrict the domain – FD_bfa Nov 22 '22 at 02:46
  • @MarianoSuárez-Álvarez I understand your point. All I meant by “best practice” is that OP should have defined the domain and codomain of the function, and should have written the maximum function properly. That part of my answer was just to illustrate the correct notation. After that, I go on to explain that the domain should be restricted - which I do. – FD_bfa Nov 22 '22 at 02:49
  • If that’s unclear, then I’m happy to edit my answer and make it more explicit – FD_bfa Nov 22 '22 at 02:49