Prove that there does not exist a continuous function f, defined on R which takes on every value exactly twice.
It uses this property:
1... If f is continuous on [a,b], then there exists some y in [a,b], such that f(y)≥f(x), for all x in [a,b]
The Attempt at a Solution
This problem was taken from Spivak-calculus.
He did give a hint in the problem: He asks us to consider f(a) for some 'a' in R. By definition, the function takes the same value at some b in R. So, f(b)=f(a).
I am considering the case when x is in [a,b] and f(x)≥f(a). For all other x excluding this interval, f(x)<f(a)
f is continuous on R, which means that it must be continuous on [a,b]. By using the above property,,there exists some y in [a,b], such that f(y)≥f(x), for all x in [a,b]. But by definition of f, there is a y1 in [a,b] such that f(y)=f(y1). Here y1<y or y1>y.....let us denote set D=[y,y1] or [y1,y] depending on which is greater(either y or y1). Here, let D=[y,y1]
Let us consider D. f, is continuous on D. so, there exists an k in D such that f(k)≤f(m) for all m in D.
There exists no h in D such that f(h)=f(y). Orelse, the function takes three values....a clear contradiction.
But k is in [a,b], so this means that f(k)≥f(a). But clearly f(k) is not equal to f(a).
So, f(k)>f(a) but less than f(y).
since f(y)>f(k)>f(a) and f is continuous on [a,y], there exists some p in [a,y] such that f(p)=f(k)'
Also in [y1,b], we have f(y1)>f(k)>f(b) and f is continuous. so there exists z in [y1,b] such that f(z)=f(k1)
We have three points(z,p,k) where the value of the function is same, a contradiction to the assumption of our f. Hence, there exists no f which takes the same value twice in R. Hence proof. Is my proof right?