# Double integral and integration by parts

Let $f:[0,b]\to[0,d]$ be a continuous bijection. If $h:[0,d]\to \mathbb{R}$ is a Riemann integrable function, how to prove that $$\int_{0}^b\left(\int_{0}^{f(x)}h(y)dy\right)dx = \int_0^d (b-f^{-1}(y))h(y)dy.$$ I tried to use integration by parts and the fundamental theorem of calculus, but there is no continuous differentiable function involved, since $h$ need not to be continuous.

Edit: its a single variable calculus curse, therefore I can't use tools of multivariable calculus.

Use Fubini's theorem to reverse the order of integration. Note that the answer you want is equal to the double integral $$\int_0^d\int_{f^{-1}(y)}^b h(y)\,dx\,dy.$$
Edit: Questioner says no Fubini. Well...assume for the moment that $f$ is $C^1$. Make the change of variables $x=f^{-1}(z)$. We get $$\int_0^b \left(\int_0^{f(x)}h(y)\,dy\right)\,dx = \int_0^d\left(\int_0^z h(y)\,dy\right)(f^{-1})'(z)\,dz.$$ Now integrate by parts to get $$\left(\int_0^z h(y)\,dy\right) (f^{-1})(z)\Bigg|_{z=0}^{z=d} - \int_0^d h(z)f^{-1}(z)\,dz$$ which equals $$b\int_0^dh(y)\,dy-\int_0^d h(z)f^{-1}(z)\,dz = b\int_0^dh(z)\,dz-\int_0^d h(z)f^{-1}(z)\,dz.$$ This is what you want. However we've assumed $f$ is $C^1$. There's probably a way to do this more carefully using a more technical version of the change of variables theorem.