Product of integration and double integration? The problem I am having is to prove the following. 

Let $$f(x) = \frac{1}{1-x} \int_{x}^{1}g'(y)(1-y) \ dy \quad x \geq 0.$$ Then how is it possible to establish that
  $$
\int_{0}^{1} \left(f(x)\right)^2 \ dx 
=
\int_{0}^{1}\int_{0}^{1}g'(x)g'(y)h(x,y) \ dx \ dy,
$$
  where $h(x,y) = x(1-y)$ for $0 \leq x \leq y \leq 1$.

Any help would be appreciated!
 A: You ask about
$$\int_{0}^{1} \left(f(x)\right)^2 \ dx =\int_{0}^{1} \frac{1}{(1-x)}\int_x^1 g'(y)(1-y)\,dy\frac{1}{(1-x)}\int_x^1 g'(z)(1-z)\,dz=$$
$$=\int_{0}^{1}\int_{x}^{1}\int_{x}^{1}\frac{1}{(1-x)^2}g'(y)(1-y)\,g'(z)(1-z)\,dz\,dy\,dx$$
where the region of integration $Q=\{(x,y,z)\,|\,0<x<1\,\,,\,\,x<y<1\,\,,\,\,x<z<1\,\}$ is

If you change the order of integration, taking first varaible $x$ you have to split $Q$ into $Q_1\cup Q_2$ with 
$$Q_1=\{(x,y,z)\,|\,0<x<y\,\,,\,\,(y,z)\in D_1\,\}$$
$$Q_2=\{(x,y,z)\,|\,0<x<z\,\,,\,\,(y,z)\in D_2\,\}$$
with

Now
$$\int_{0}^{1} \left(f(x)\right)^2 \ dx=\int\int_{D_1}g'(y)(1-y)\,g'(z)(1-z)\left(\int_0^y\frac{1}{(1-x)^2}\,dx\right)\,dy\,dz+$$
$$+\int\int_{D_2}g'(y)(1-y)\,g'(z)(1-z)\left(\int_0^z\frac{1}{(1-x)^2}\,dx\right)\,dy\,dz=$$
$$=\int_0^1\int_y^1g'(y)\,y\,g'(z)(1-z)\,dz\,dy+\int_0^1\int_z^1g'(y)\,(1-y)\,g'(z)\,z\,dy\,dz$$
Both integrals are equals (interchanging the roles of $y$ and $z$) and then we obtain twice the desired result
$$\boxed{\color{red}{2}\int_0^1\int_x^1g'(x)\,g'(y)\,x\,(1-y)\,dy\,dx}$$
NOTE: I've obtained twice your result. Thus, it's possible I've made a mistake !!
