1. Nov 8, 2004

### stunner5000pt

This is from the book Calculus by Michael Spivak, used in some Mathematical analysis courses.

Prove that there is no such function that is continuous EVERYWHERE which takes each of its values EXACTLY twice?

Really Really tough i know, but so far i have this much

I know its not possible to assume any function here but if a function took each of its values EXACTLY twice then

f(s) = f(t) for any s,t of reals.

but then there must be some number in between s and t let it be e such that s < e < t. Then f(e) = f(s) = f(t) then there is a contradiction.

My understanding is not very clear on this one , i could really usea suggestion for a formal proof of this.

Is the square of an irrational number a rational number?

then if this is true let the irrational number be i and then

$$i^2 = \frac{p}{q}$$

then $$i = \frac{\sqrt{p}}{\sqrt{q}}$$

Now i must be a positive integer and p and q must be greater than zero.

I am stuck at this point, any suggestion would be appreciated!

Last edited: Nov 8, 2004
2. Nov 8, 2004

### Galileo

Perhaps I`m missing something, but sin(x) is continuous everywhere and takes each of its values infinitely many times.

3. Nov 8, 2004

### stunner5000pt

i have corrected my mistake it is takes on its values EXACTLY twice so Sin[x] would not do

4. Nov 8, 2004

### Tide

I think you're headed in the right direction on the first problem - namely, there must be a point between s and t where the derivative is 0 which constitutes a point that does not have a duplicate value.

Regarding the square of an irrational number all you need is a counterexample such as

$$2^{\frac {1}{4}$$

5. Nov 8, 2004

### AKG

Let s, t be reals such that f(s) = f(t), s < t. By mean value theorem, there is a c such that s < c < t such that f'(c) = (f(s) - f(t))/(s - t) = 0/(s - t) = 0. There is some d such that f(d) = f(c).

1) Assume f(c) > f(s)

1.a) Assume d < s
Choose some K such that f(s) < K < f(d). Then, by intermediate value theorem, there is some point k1 such that d < k1 < s and f(k1) = K. Also, since f(d) = f(c), there is some point k2 such that s < k2 < c and f(k2) = K. Also, since f(s) = f(t), there is some point k3 such that c < k3 < t and f(k3) = K. So K is attained three times, which is a contradiction.

1. b) Assume d > t
Proof is similar.

1. c) Now, assume s < d < t
It's easy to show that for all x < s, and all x > t, f(x) < f(s). It's also easy to show that for all x such that s < x < t, f(x) > f(s). Now let M be the maximum value of f on the interval [s, t] (which exists by extreme value theorem). There must be two values, x1, x2 such that s < x1 < x2 < t and f(x1) = f(x2) = M. Let m be the minimum value of f on [x1, x2], and let m1 be a real such that f(m1) = m. Then there is some L such that there are l1, l2, l3, l4 with s < l1 < x1 < l2 < m1 < l3 < x2 < l4 < t such that f(l1) = f(l2) = f(l3) = f(l4) = L, which is a contradiction.

2. Assume f(c) < f(s)
Proof is similar.

Q.E.D.

6. Nov 8, 2004

### stunner5000pt

beautiful proof thank you very much!

it'll take me a while to take all of that but that was very good !

thank you!

7. Nov 9, 2004

### matt grime

AKG's proof isn't correct since it assumes f is differentiable at the start, though I'm not to osure why, which it need not be.

The proof starts off:

let s and t be such that f(s)=f(t) with s<t.

let x be any element of (s,t)

then f(x) is not f(s).

f(x)=f(y) for some y

Now consider the cases y<s, s<y<x, x<y<t and t<y separately to arrive at some contradictions.
Hint the cases y<s and t<y are the easiest by the intermediate value theorem

and appears to run as AKG's does. Perhaps they can explain the assumption of differentiability which doesn't appear to be used in any necessary way..

8. Nov 9, 2004

### AKG

Oh, you're right, it's pointless (and wrong). I did it in a bit of a rush. It's not only pointless, you're probably better off just choosing the max or min on that interval right from the start. Then it's easy to show (similar to proofs 1a and 1b) that the min/max is achieved twice on [s, t] (note we're choosing the min/max such that it is not f(s)), say, at points q and r. Then find the minimum value on [q, r], say it occurs at u. of course, if f(q) = f(r) was the minimum value, then we'd have a straight horizontal segment connecting f(q) and f(r), and so that value would be achieved an infinite number of times (I didn't explicit show that this case also leads to a contradiction, but it was pretty obvious). Then, there's a value L that is attained by f on [s,q], [q,u], [u,r], and [r,t], which is of course a contradiction.

9. Nov 9, 2004

### stunner5000pt

so baiscally all you need to do is pick those intervals, assume a min and max, show taht the function would pass an infinite number of points if the function continued between those two points?? Thus is the contradiction??

Is taht waht you mean??

10. Nov 9, 2004

### AKG

Let s < t and f(s) = f(t). If f(s) is the the minimum value on the interval [s, t], choose c such that s < c < t and f(c) is the maximum on that interval. Every value from f(s) to f(c) is attained on the interval [s, c], and also on the interval [c, t]. So, it's easy to show that for all x < s or x > t, f(x) < f(s). Therefore, the value f(c) must be achieved twice on [s, t]. Let d be the other point in [s, t] such that f(c) = f(d). Since this is the maximum value on [s, t], these values must be the maximum values on [c, d] as well (or [d, c]). Let m be in [d, c] and f(m) the minimum on [d, c]. Then every value between f(m) and f(c) is attained at least once on [s, c], at least once on [c, m], at least once on [m, d], and at least once on [d, t] (note, the c's and d's might be switched in that last sentence if d < c). This is also a contradiction, and so a continuous function which attains each of it's values exactly twice is not possible if f(s) is the minimum value on [s, t].

If f(s) is the maximum on that interval, choose s < c < t and f(c) is the minimum. The proof is similar.

If f(s) is neither the min nor the max, then there are points a and b such that s < a, b < t, and f(a) is the minimum, f(b) is the maximum. On [a,b] (or [b, a]), the value f(s) is achieved at some point d, so f(s) = f(t) = f(d), contradiction.

So, no matter what, you get a contradiction when trying to construct such a function, so it is indeed impossible.

Now note that you're not assuming a min/max, you know that there is a min/max by Extreme Value Theorem. And the main point is not to show that it would pass an infinite number of pionts if the function continued between those two points. Think of the function f(x) = x². It "almost" works except the value 0 is only obtained once. It doesn't fail because it achieves the value an infinite number of times, it is because it only achieves it once.