Integrating multivariate piecewise function where one condition involves multiple variables

integrationmultivariable-calculuspiecewise-continuity

In probability theory, you are often interested in integrating a multivariate function over a single variable, like so:

$$
\int_a^b f(x,y)dy
$$

But what if the function is piecewise-defined, where one of the conditions(?) depends on multiple variables?

$$
f(x,y) = \begin{cases}
g(x,y) & x > 0, y > 0\\
0 & \text{elsewhere}
\end{cases} \hspace{1em} \Rightarrow \hspace{1em} \int_{-\infty}^{\infty}f(x,y)dy = \text{???}
$$

How do you go about calculating this integral?

This example function $f$ may or may not be easy to integrate, but I am interested in a more general approach to integrating piecewise-functions.

Best Answer

Just incorporate it into the expressions:

$$\int_{-\infty}^{\infty}f(x,y)\;dy = \begin{cases} \overbrace{\int_{\color{#f00}{-\infty}}^{\color{#f00}{0}} \boxed{\color{#f00}{0}}\; dy}^{x>0,\;\color{#f00}{y<0}}+ \overbrace{\int_{0}^{\infty} \boxed{g(x,y)}\; dy}^{x>0,\;y>0},& x>0\\ \underbrace{\int_{-\infty}^{\infty}\boxed{\color{#f00}{0}}\;dy}_{\color{#f00}{x<0}}, & \color{#f00}{\textrm{elsewhere}} \end{cases} $$ $$= \begin{cases} \int_{0}^{\infty} g(x,y)\; dy,& x>0\\ 0, & \textrm{elsewhere} \end{cases} $$ For clarity, I've put a box around the integrands so you can see how they change depending on the conditions on $x$ and $y$. I've also colored the items red which indicate why the integrand is zero when it is.

Related Question