# Showing discontinuity at infinitely many points

## Homework Statement

Suppose f: ℝ → ℝ takes on each of its values exactly twice; that is, for each y in ℝ, the set {x: y = f(x)} has either 0 or 2 elements. Show that f is discontinuous at infinitely many points.

## Homework Equations

I don't know if this is relevant, but in the prior text to this problem, this was perhaps the only one that may be relevant:

If I is an interval in ℝ and if f: I → ℝ is a nonconstant continuous function, then f(I) is an interval. In particular, if a,b in I with f(a) ≠f(b), then f assumes every value between f(a) and f(b)

## The Attempt at a Solution

I've tried going through definitions, theorems, etc. for several hours of the course of 3 days and I am still totally stumped. Ugh. Please, any help is much appreciated.

Related Calculus and Beyond Homework Help News on Phys.org
I'd like to note how close f=|x| comes to breaking this!

So, I can get that the function isn't continuous, and perhaps this will help and perhaps it won't. Suppose it were continuous, and let y be in the range of f. Then consider I=[x_1,x_2] where f(x_1)=f(x_2)=y. Now, on I f attains a max, say m=f(x_3). Now, since f is continuous, f attains every value between y and m at least twice, once in [x_1,x_3] and once in [x_3,x_2]. Also, it can't attain m again on this interval or else you break the hypotheses, as values will be attained more than twice. Thus it attains m again somewhere outside the interval, and you should get that you attain values three times.

If this observation hasn't been made, perhaps you can tweek it to win the problem, though I'm not positive you can or cannot.

HallsofIvy