Double integral of a piecewise function with a condition

multivariable-calculus

Define

$$g(x, y) = \begin{cases}
h(x)/x & \text{if} \text{ } 0 < y < x \\
0 & \text{otherwise.} \\
\end{cases} $$

where $\int_{0}^{\infty} h(x) \mathop{dx} = 1$ and $h$ is not negative. $g$ is defined on $(0, \infty)$.

Find

$$\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} g(x, y) \mathop{dy dx}.$$


Ok so I think that both integrals start at $0$ because they're both zero when negative. Then I think the inner integral (for $y$) just goes to $y$ since it's less than $x$ ? So I get

$$\int_{0}^{\infty} \int_{0}^{y} g(x, y) \mathop{dy}\mathop{dx}?$$

I don't know how to proceed.

Best Answer

There was a typo. The bounds of the second integral should be $0$ and $x$ $$\int_{0}^{\infty} \int_{0}^{x} g(x, y) \mathop{dy}\mathop{dx}=\int_{0}^{\infty} \int_{0}^{x} \dfrac{h(x)}{x} \mathop{dy}\mathop{dx}=\int_{0}^{\infty}\dfrac{h(x)}{x}xdx=1$$