TITLE: Function which takes every value uncountably often
QUESTION [12 upvotes]: Is there a function such that for all $y\in \mathbb{R}$ there exist uncountably many $x\in\mathbb{R}$ with $f(x)=y$?
A function for which countably many $x$ exist is for example $\tan$, but I fail to see how to take this a step further. So any help is highly appreciated.

REPLY [2 votes]: If $\mu$ is a singular continuous measure (e.g. take the haar measure on the cantor set in the unit interval) then $f(z)=\int \frac{d\mu (\lambda )}{\lambda -z}$ is analytic in the upper half plane and its limit as $z = x+i\epsilon$ goes to x defines a measurable function on $\mathbb{R}$. This function can take every real value y uncountably often in any finite sub-interval of $\mathbb{R}$. Look up papers by D.B. Pearson on value distribution for details.