$f(x) = \begin{cases} 1 & x \in \mathbb{Q}-\{0\} \\ 2 & x = 0 \\ 3 & x \notin \mathbb{Q} \end{cases}$
$g(x) = \begin{cases} 4 & x \in \mathbb{Q}-\{0\} \\ 2 & x = 0 \\ 3 & x \notin \mathbb{Q} \end{cases}$
I am required to discuss the following for $f$ and $g$.
Continuity and differentiability of $f$ and $g$ at:
a) $x = x_0 \in \mathbb{Q}-\{0\}$
b) $x = y_0 \notin \mathbb{Q}$
c) $x = 0$
Nature of the function (i.e., does it have any extrema?; if yes, then of which type, or is it monotone at …?):
a) $x = x_0 \in \mathbb{Q}-\{0\}$
b) $x = y_0 \notin \mathbb{Q}$
c) $x = 0$
Doubt
My friend told me that his teacher told him for such type of questions that in the just neighborhood of every rational number, there lies an irrational number and vice versa.
But I have a shadow of doubt on this statement because there is nothing like “the immediate neighborhood” of a number. The real line is a continuum, and neighborhoods can be as large or as tiny as you want, that does not make a difference regarding their content.
Moreover, I couldn’t find any theorems regarding my friend’s teacher’s statement. If anyone finds it please let me know in the comments.
If we assume that my friend were right then, My work:
$f(x_0) = 1$
$g(x_0) = 4$
$f(x_0^{+/-}) = 3$
$g(x_0^{+/-}) = 3$
$f(0) = 2$
$g(0) = 2$
$f(0^{+/-}) = 3$
$g(0^{+/-}) = 3$
$f(y_0) = 3$
$g(y_0) = 3$
$f(y_0^{+/-}) = 1$
$g(y_0^{+/-}) = 4$
Also 1 more doubt, in this loosy definition what if we are considering the irrational number to the just side of zero, then $f(y_0^{+/-}) = 3$
$g(y_0^{+/-}) = 3$ are wrong.
I have full gut feelings that all this is wrong and messed up but unfortunately I don’t know if any way to handle these piecewise defined Dirichlet-type functions.
So now clearly for 1 a), b) and c) $f$ isn’t continuous at any of those points. Hence if $f$ is not continuous at a point then it can’t be differentiable at that point. So neither differentiable nor continuous at any of the points.
For 2nd part, My conclusions force me to conclude that $f$ has a local minima at every rational number and a local maxima at every irrational number.
$g$ has a local maxima at every rational number except 0 and local minima at 0 and every irrational number.
I’m actually my self confused whether or not my answers are correct or not. + Require some help regarding the things you felt I am lacking in while reading my work. Thanks in advance.