For what $f$ is $\int_{-\infty}^\infty f(x)\,dx = 2 \int_0^\infty f(x) \,dx \neq \pm \infty$? I just keep the cases $\pm \infty$ out, so that there are no trivial solutions such as $f(x)=x$.
Can you give just not some examples but more of a general formula (if there is) for some solutions?
 A: Continuous even functions which tend to zero quickly are a class worth looking at. For example, $f(x)=\dfrac{1}{x^2+1}$.
An example of an even, continuous, function which does tend to zero for which this will not work is $g(x) = \dfrac{1}{|x|+1}$.
There are many other functions (both continuous and not) that satisfy this, though, having no absolute defining pattern. And so a formula will not be possible. For example, 
$$h(x) = \begin{cases} 0 & x < -3 \\ 1 & -3\le x \le -2 \\ 0 & -2< x < 201.3 \\ 1 & 201.3 \le x \le 202.3 \\ 0 & x> 202.3\end{cases}$$
satisfies your criteria.
A: You don't even need the function to be even, though that is a natural thought from the statement.  Some examples are below, where the long horizontal lines are meant to be the $x$ axis.  Having the integral on both sides of zero is not much of a restriction.  The top one has integral zero on each side of the axis.

A: Hint: standard normal distribution with various standard deviation. It helps you to imagine what kind of functions satisfy your conditions. There are many other functions.
A: First in order $\int_{-\infty}^\infty f(x)\,dx = 2 \int_0^\infty f(x) $ your function should be even. And if we assume $f(x)$ is continuous everywhere, then for the integral to converge there should be and real number $r$ such that 
$f(x)<1/(x^{r1})$ for some r1>1 for $x>r$. I am not sure this is a necessary condition but it is a sufficient one.
A: Let $g$ and $h$ be any two functions such that $I_g=\int_0^\infty g(x)dx$ and $I_h=\int_{-\infty}^0 h(x)dx$ exist. Then
$$f(x)=
\begin{cases}
I_hg(x),  & \text{if $x \ge 0$} \\
I_gh(x), & \text{if $x < 0$}
\end{cases}
$$
satisfies your condition: both sides of your equation are equal fo $2I_gI_h$.
