# Finding two functions (density) $g,f$ satisfying some conditions

Is there a clever way to find two density functions, $f$ and $g$, that satisfy the following conditions?

\begin{align*} \int_{\infty}^{m}\int_{-\infty}^{\infty}f(w)f(w+z)\,dw\,dz&=\int_{\infty}^{m}\int_{-\infty}^{\infty}g(w)g(w+z)\,dw\,dz\\ \int_{\infty}^{m+2}\int_{-\infty}^{\infty}f(w)f(w+z)\,dw\,dz&=\int_{\infty}^{m+1}\int_{-\infty}^{\infty}g(w)g(w+z)\,dw\,dz\\ \int_{-\infty}^{\infty}f(w)\,dw&=\int_{-\infty}^{\infty}g(w)\,dw=M\\ \end{align*} where $f\gt 0$ and $g\gt 0$ almost everywhere?

for $m\in (-\delta,\delta)$ and $\delta$ is some small number.

My main intent is to come up with two i.i.d. random variable, $X'$ and $X''$ and $Y$ and $Y''$, such that $\operatorname{\mathbb{Pr}}(m> Y'-Y'')=\operatorname{\mathbb{Pr}}(m>X'-X'')$ for $m \in (-b,b)$ for some $b$ small enough, while $\operatorname{\mathbb{Pr}}(m+2> Y'-Y'')=\operatorname{\mathbb{Pr}}(m+1> X'-X'')$.Is this possible?

-
What's wrong with $f=g$? – Robert Israel Feb 16 '12 at 20:51
@Robert: I am not sure that in general $f=g$ will satisfy the second condition, one with $m+2$ and the other with $m+1$ in the limits of integration. SOmething similar is in math.stackexchange.com/questions/109786/… – Henry Feb 16 '12 at 22:56
@RobertIsrael Since construction of such two functions appear to be difficult, any advice on how to show existence? – Stuck_pls_help Feb 21 '12 at 21:47
I'm assuming the $= M$ at the end only applies to the last equation between the total weight of the densities $f$ and $g$ and not to the above equations, right? – josh Feb 25 '12 at 16:54
Yes, @josh. Thanks for the correction. – Stuck_pls_help Feb 26 '12 at 15:26