# Lebesgue integral question (double integral)

Let $g,h$ be nonnegative Lebesgue measurable functions on $\mathbb{R}$. Prove that

## $$\int_{-\infty}^\infty g(x)^2h(x)\,dx=\int_0^\infty\int_{\{t\in\mathbb{R}:g(t)>x\}}2h(t)x\,dtdx.$$

I am lost on how to approach this question.

Change of variable?

Thanks for any help.

As the integrands are non-negative, Tonelli's theorem tells us order of integration is interchangable. $$\mathrm{ \int_0^\infty\int_{\{t:g(t)>x\}}2h(t)x\,dt\,dx=\int_{-\infty}^\infty\int_{\{x:\,0<x<g(t)\}}2h(t)x\,dx\,dt\\ =\int_{-\infty}^\infty\int^{g(t)}_{0}2h(t)x\,dx\,dt=\int_{-\infty}^\infty g(t)^2h(t)\,dt }$$

The answer is already given, but in case you don't see how to interchange the order clearly: \begin{align} \int_{0}^{+\infty}\int_{\{t\in \mathbb{R}:g(t)>x\}}2h(t)x\,dt\,dx &= \int_{\{(x,t)\in \mathbb{R}^2:0\leq x<g(t)\}} 2h(t)x\,dt\,dx \\ &= \int_{\mathbb{R}}h(t)\int_0^{g(t)}2x\,dx\,dt \\ &= \int_{\mathbb{R}}g^2h\,dm. \end{align}