How do you construct a function that is continuous over $(0,1)$ whose image is the entire real line? How do you construct a continuous function over the interval $(0,1)$ whose image is the entire real line?
When I first saw this problem, I thought $\frac{1}{x(x-1)}$ might work since it is continuous on $(0,1)$, but when I graphed it, I saw that there is a minimum at $(1/2,4)$, so the image is $[4,\infty)$ and not $(-\infty,\infty)$.
Apparently, one answer to this question is:
$$\frac{2x-1}{x(x-1)}$$
But how is one supposed to arrive at this answer without using a  graphing calculator?
 A: You've come up with a function symmetric about $x=\frac{1}{2}$: it's an "even function" except that it's "even about $x=\frac{1}{2}$" rather than about $x=0$.
Translate left by $\frac{1}{2}$; then you've made a bona fide even function ("even about $x=0$"). Now, to get a function which is "odd about $x=\frac{1}{2}$", just multiply the translated version by $x$ to get a bona fide odd function, and then translate back. That's what you've done (up to a factor of $2$).
A: This is a common question, often about a continuous function mapping $(-1,1)$ onto $\mathbb{R}$. For that setup, I have long enjoyed the Inverse Hyperbolic Tangent, $\tanh^{-1}$, as a function that does exactly the trick. However, the interval you begin with here is instead $(0,1)$, so to use this function would require first mapping $(0,1) \rightarrow (-1,1)$, which can be done via $x \mapsto 2x-1$.
And so that gives yet another answer: $x \mapsto \tanh^{-1}(2x-1)$ maps $(0,1)$ onto $\mathbb{R}$.
A: Howabout:
$${(2x - 1)}\over{x(x - 1)}$$
Or, look at tan and scale it a bit.
How to do it without a graphing calculator? Learn the shapes of various simple functions e.g. $x^2$, $x^3$ and $1/x$.  Look up even and odd functions that others have mentioned.  Learn what happens when you add and mutiply functions.  Learn how to scale and shift the functions.
I didn't use a graphing calculator and I guess that the other responders didn't either.
A: Hopefully you agree that you want functions with vertical asymptotes at $0$ and $1$, which is why you wanted to try $\frac{1}{x(x-1)}$. The problem with it is that, on the interval $(0,1)$, it goes to $-\infty$ both near $0$ and near $1$ (the easiest calculator-free way to notice this is to note that it is always negative).
How can we fix this problem? By multiplying by a continuous function which is positive near $1$ (so the product still goes to $-\infty$ near $1$) and negative near $0$ (so it goes to $+\infty$ near $0$). One simple function like this is $2x-1$.
A: Try $f(x) = {1 \over x} - {1 \over 1-x}$.
(Note that $f(x) = {2x -1\over x (x-1)}$.)
Here is the idea behind this approach:
In general, if $\phi:(0,1) \to \mathbb{R}$ satisfies $\lim_{x \downarrow 0} \phi(x) = \infty$ and $\phi$ is bounded on $[a,1)$
for any $a>0$ you can construct a suitable function by
$f(x) = \phi(x)-\phi(1-x)$.
A: Keeping in mind that (cumulative) distribution functions in statistics take the real line to the unit interval, inverse cdfs for variables defined over the whole real line are a rich and convenient source of these.
An example of this would be the $\log(\frac{x}{1-x})$, which is the inverse cdf for the standard logistic distribution (this particular one is sometimes called the logit function).
If you scroll to the bottom of the page at that link, you'll see a couple of dozen possibilities in the table at the bottom, mostly under "Continuous univariate supported on the whole real line". Some of those will not have convenient inverse cdfs, but a number of them do.
Once you have a few of them you can combine them with functions from the real line to the real line or the unit interval to the unit interval to get a very wide range of easily-obtained functions.
A: I'd like to provide a different flavor of function. For $x \in (0,1)$
$$f(x) = \tan\bigg(\pi x-\frac{\pi}{2}\bigg)$$

EDIT: How we get to above result?
We start with $\tan(x)$, which is continuous over $x \in (-\pi/2, \pi/2)$ whose image is the entire real line.
We want $x$ to be $(0,1)$ instead. So one easy way is we find a linear transformation (thus is continuous) of $x$ to transform $x$ from $(-\pi/2, \pi/2)$ to $(0,1)$.
Notice that if $\pi x \in (-\pi/2, \pi/2)$, then we have $x \in (-1/2, 1/2)$.
And if $(\pi x - \pi/2) \in (-\pi/2, \pi/2)$, then we have $x\in (0,1)$, and that is what we want.
A: Here's another example. Take the continuous function $f:(0,1)\to\mathbb R$ defined by $$f(x)=\frac{1}{x}\cos\frac{\pi}x.$$ For $n\in\mathbb N$ we have $f(\frac1{2n})=2n$ and $f(\frac1{2n+1})=-2n-1$, so $[-2n-1,2n]$ lies in the image of $f$ for each $n\in\mathbb N$. Therefore, the image of $f$ is $\mathbb R$.
This example has the further property that $\lim_{x\to1}f(x)=-1\in\mathbb R$ exists. (So $f$ can be extended to yield a surjection from $(0,1]$ onto $\mathbb R$.)
