1
$\begingroup$

If $$f(x) = \left\{\begin{array}{lr} x, \ \text {if x is rational}, \\ 0, \ \text {if x is irrational}, \end{array}\right. $$

Find all local maximum and minimum points of $f(x)$.

How can I go about doing this, since it's not a normal kind of function where I can differentiate and find the critical points?

$\endgroup$

2 Answers 2

2
$\begingroup$

If $x$ is rational, so $f(x)=x$, are there values $y$, as close as you like to $x$, with $f(y)>f(x)$? Are there values $z$, as close as you like to $x$, with $f(z)<f(x)$?.
Then ask the same questions for irrational $x$.

$\endgroup$
6
  • 1
    $\begingroup$ Does this mean there are no local extreme points? $\endgroup$ Oct 29, 2013 at 14:59
  • $\begingroup$ Yes, indeed, that's what it means. $\endgroup$ Oct 29, 2013 at 15:00
  • $\begingroup$ Does a local minimum (or maximum) need to be strictly less (more) than its closest neighbours? $\endgroup$
    – Henry
    Oct 29, 2013 at 15:00
  • 1
    $\begingroup$ If not then all the irrational values of $x$ correspond to local minima: the rely to "Are there values $z$ , as close as you like to $x$ , with $f(z) \lt f(x)$?" is "no" for irrational $x$ $\endgroup$
    – Henry
    Oct 29, 2013 at 15:03
  • $\begingroup$ Some irrational $x$ $\endgroup$
    – Empy2
    Oct 29, 2013 at 15:05
1
$\begingroup$

A local minimizer is a point $\hat{x}$ for which there exists some neighbourhood $U$ of $\hat{x}$ in which $f(x) \ge f(\hat{x})$ for all $x \in U$. Similarly for a local maximizer. This characterization holds regardless of how smooth $f$ is.

It would help to visualize the function:

enter image description here

We have $f(0) = 0$, $0 \le f(x) \le x$ for all $x >0$ and $x \le f(x) \le 0$ for all $x <0$. In addition, in any neighbourhood, $f$ attains these values.

From the picture, we see that $x=0$ is neither a local minimizer or maximizer, and for $x>0$, $f$ has no local maximizers and for $x<0$, $f$ has no local minimizers. However, for $x>0$, any irrational $x$ is a local minimizer and similarly, for $x<0$, any irrational $x$ is a local maximizer.

To prove this, we note that $f(\pm \frac{1}{n}) = \pm \frac{1}{n}$, and $f(0) = 0$, which shows that $x=0$ is neither a local minimizer or maximizer.

For $x>0$, we have $f(x) \ge 0$. If $x$ is irrational, then $f(x) = 0$, and hence $x$ is a local minimizer. Since any rational $y$ in the neighbourhood of $x$ has $f(y) >0$, we see that $x$ is not a local maximizer. If $x$ is rational, then $f(x) = x$, and since $f(x+\frac{1}{2}) = x+\frac{1}{2} > f(x)$, we see that $x$ is not a local maximizer. Similarly, at any irrational $y$ in a neighbourhood of $x$, we have $f(y)= 0 < f(x)$, we see that $x$ is not a local minimizer.

Since $f(-x) = -f(x)$, the same reasoning above applies, mutatis mutandis.

$\endgroup$
7
  • $\begingroup$ I'm not sure if I understand the proof of why $x=0$ is not a local maximum or minimum..how does that fact you provided prove it? Could you add some more detail please? $\endgroup$ Oct 30, 2013 at 18:46
  • $\begingroup$ @extremez: Since $f(\frac{1}{n}) = \frac{1}{n}$ and $f(-\frac{1}{n}) = -\frac{1}{n}$, then in any neighborhood of $x=0$, there are points with value greater than and less than $f(0) = 0$. $\endgroup$
    – copper.hat
    Oct 30, 2013 at 18:49
  • $\begingroup$ Alright thank you. I understand it now..but I have a feeling this might have something to do with first derivatives.. $\endgroup$ Oct 30, 2013 at 18:57
  • 1
    $\begingroup$ Well, this function is only continuous at $x=0$, and it is not differentiable there, so we can't use derivatives for this one... $\endgroup$
    – copper.hat
    Oct 30, 2013 at 18:59
  • 1
    $\begingroup$ Glad to be able to help! $\endgroup$
    – copper.hat
    Oct 30, 2013 at 19:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .