9

Let $$f(x)=\begin{cases} \sin \tfrac 1 x &\text{if $x\ne 0$}\\ 0 & \text{if $x = 0$.}\end{cases}$$ I have to show that $f$ has the intermediate value property. That is, for any $a < b$, if $y$ is any real number such that $f(a) < y< f(b)$ or $f(a)>y> f(b)$, then there exists a $c \in (a,b)$ such that $f(c)=y$.

I feel like I kind of know how to go about completing this. I just am curious as to if I have to create a bound such as letting $a = -1$ and $b = 1$, or keep $a$ and $b$ both arbitrary.

Pedro
  • 122,002
user72195
  • 1,557
  • 3
  • 18
  • 30
  • If $0 < a$ or $b < 0$, the thing is settled by continuity. Now, how does $\sin (1/x)$ behave near $0$? – Daniel Fischer Jun 29 '13 at 23:14
  • 1
    Draw a picture, or let software struggle to do it. The only cases of interest are with $a$ and $b$ straddling $0$. You need to consider intervals that might be quite small. – André Nicolas Jun 29 '13 at 23:15
  • 1
    If $a\le0<b$, show that there is $0<a'<b'<b$ with $f(a')=-1$, $f(b')=+1$. – Hagen von Eitzen Jun 29 '13 at 23:23
  • @AndréNicolas what exactly do you mean by consider intervals that are small? – user72195 Jun 29 '13 at 23:50
  • @user72195 Have you looked at a graph of this function yet? That really needs to be your first step. – dfeuer Jun 29 '13 at 23:52
  • @AndréNicolas I already said that below. – dfeuer Jun 29 '13 at 23:55
  • Your function needs to fulfill the continuity requirement for the function and I do not think you are asked to go around it. – Mhenni Benghorbal Jun 29 '13 at 23:56
  • @AndréNicolas: Then we need some modification for the IVT. – Mhenni Benghorbal Jun 29 '13 at 23:58
  • @AndréNicolas: I thought he wants to apply the theorem based on that I answered. – Mhenni Benghorbal Jun 30 '13 at 00:01
  • @MhenniBenghorbal: We might be able to give a generalization of IVT that would take care of this function and many others. But it is quite a bit simpler to deal with this function directly. Use IVT for intervals $[a,b]$ completely on one side or the other of $0$, and special properties of $\sin(1/x)$ for intervals that straddle $0$. – André Nicolas Jun 30 '13 at 00:04
  • @AndréNicolas: Then the continuity requirement is a strong condition for the IVP to exist. – Mhenni Benghorbal Jun 30 '13 at 00:09
  • 3
    @MhenniBenghorbal: The IVT can fail even if there is a single point of discontinuity. Example: Let $f(x)=-1$ if $x\lt 0$, $f(x)=1$ if $x\gt 0$. The number $1/3$ is between $-1$ and $1$, but there is no $x$ such that $f(x)=1/3$. But IVT can hold even if there are points of discontinuity. An important example if derivatives. A derivative may not be continuous everywhere, but it always has the Intermediate Value Property. And the function of this problem also does, though it is not continuous at $0$. – André Nicolas Jun 30 '13 at 00:19
  • @AndréNicolas: I'm curious about what sorts of generalizations you refer to. In this case, the fact that restrictions of the graph to intervals are connected proves it using a generalization of IVT applied to the second projection, but proving connectedness is no easier than proving IVP directly. – dfeuer Jun 30 '13 at 00:27
  • @AndréNicolas: That's what I already suggested in my previous comment that we can modify the IVT about the condition of the continuity of the function. – Mhenni Benghorbal Jun 30 '13 at 00:49
  • @MhenniBenghorbal: There is a suggestion just above by dfeuer. However, the easy thing to do is to focus on this particular function. – André Nicolas Jun 30 '13 at 00:52

2 Answers2

14

You want to show that for any $a<b$ and $y$ between $f(a)$ and $f(b)$, we have some $a<c<b$ such that $f(c)=y$. Note that this function is continuous on $(-\infty,0)$ and $(0,\infty)$, so if $a$ and $b$ have the same sign then such a $c$ exists by the IVT. Otherwise we have $a\leq 0\leq b$ and one inequality is strict. Assume $0<b$. Let $x$ be such that $\frac{1}{\pi x}<b$. Note that the image of the interval $$\left[\frac{1}{\pi(x+2)},\frac{1}{\pi x}\right]$$ under $f$ is the entire image of $f$, so we have some $c$ in this interval such that $f(c)=y$ as desired. The case $a<0$ is similar.

Alex Becker
  • 60,569
  • Little typo? Want say $x+2$, for positive $x$, a small change for negative, – André Nicolas Jun 30 '13 at 00:22
  • @AndréNicolas That's not necessary since $\sin$ covers its image twice over its period. – Alex Becker Jun 30 '13 at 00:23
  • @DavidMitra Ah yes, thanks. – Alex Becker Jun 30 '13 at 00:25
  • 1
    Note that the bounds are not in the good order. And you should take $x+2$, not $x+1$ to get the full range of $\sin$. For $x=n$ positive integer, for instance, you only get $[0,1]$ or $[-1,0]$ depending on the parity of $n$. So it should be $[1/((n+2)\pi),1/(n\pi)]$. – Julien Jun 30 '13 at 00:53
  • @julien Yes you are right on the $x+2$. But I see no reason $x$ needs to be an integer, as any interval of length $2\pi$ gives the full range of $\sin$. – Alex Becker Jun 30 '13 at 01:08
  • Sine will definitely cover its image once over its period $2\pi$. – Ink Jun 30 '13 at 01:08
  • No, no, I don't say that $x$ has to be an integer (the first version of my comment was wrong). I just took it to be an integer to give a concrete example why the range was not $[-1,1]$ in the previous version of your answer. – Julien Jun 30 '13 at 01:16
  • I dont seem to understand where that range (1/(n+2)pi, 1/npi) comes from? – user72195 Jun 30 '13 at 15:07
  • @user72195 That interval is contained in the interval $(a,b)$, and $f$ covers its entire range over that interval. – Alex Becker Jun 30 '13 at 19:04
  • so I am basically using 1/(n+2)pi as my a, and a/npi as my b? and then go on to show I.V.T holds by using g(a)=f(a)-y, g(b)=f(b)-y and f(a)<y<f(b) to showing there is a c in (a,b) such that f(c)=0? – user72195 Jun 30 '13 at 19:54
  • @user72195 Well $a$ and $b$ are fixed. The thing is that $f$ covers the entire interval $[-1,1]$ over $[1/(x+2)\pi,1/x\pi]$, so since $-1<y<1$ we have some $c$ in $[1/(x+2)\pi,1/x\pi]$ such that $f(c)=y$. Since the $[1/(x+2)\pi,1/x\pi]$ is contained in $(a,b)$, $a<c<b$ as desired. – Alex Becker Jun 30 '13 at 21:04
2

Here is funny - although not recommended - argument.

As is well-known, although the graph of $f$ is not path-connected, it is connected: that's indeed the typical example of a connected non path-connected space.

In particular, the graph $G$ of every restriction of $f$ to any $[a,b]$ is connected.

Now the range of $f$ restricted to $[a,b]$ is the continuous projection of $G$ under $(x,y)\longmapsto y$. So it is a connected subset of $\mathbb{R}$, i.e. an interval.

Note: how to prove the graph $G$ of $f$ restricted to $[a,b]$ is connected? It works nicely, for instance, with the following characterization of connectedness: every continuous function from $G$ to $\{0,1\}$ discrete is constant.

Julien
  • 44,791
  • @AlexBecker Thanks. Of course, yours is much more appropriate. – Julien Jun 30 '13 at 01:25
  • How's that particular characterization of connectedness particularly appropriate? Personally, I think the easy way is to note that the path-connected part must lie entirely on one side of any separation, so that a separation would have to consist of that part on one side and the origin on the other side, but any open set about the origin contains infinitely many points $\left(\tfrac 1 {k\pi},0\right)$. – dfeuer Jun 30 '13 at 02:13
  • Actually, there's an even more efficient way... Letting $s$ be the path-connected part, $s \subseteq s\cup{(0,0)} \subseteq s^-$, so $s\cup{0,0}$ is connected. – dfeuer Jun 30 '13 at 02:16
  • @dfeuer That's very easy with the characterization I mention also, I did not say it was the only way. But that's the one I prefer. I'll add "for instance" if you want. – Julien Jun 30 '13 at 02:20