Integrating extended function I am asked to find the double integral of $$f(x,y) = 10e^{x^2}$$ for $$y \leq x$$
$$f(x,y) = 10e^{y^2}$$ for $$y>x$$
$\iint_D f(x,y)\,dA$ where $D$ is equal to the square $[0,9] \times [0,9]$. Any advice on how to handle the extended function? What should my double integral look like?
 A: The integral can be seen as the following.
\begin{align}
I &= \int_{0}^{9} \int_{0}^{x} 10 \, e^{x^{2}} \, dy \, dx + \int_{0}^{9} \int_{0}^{y} 10 \, e^{y^{2}} \, dx \, dy \\
&= \int_{0}^{9}  10 \, x \, e^{x^{2}} \, dx + \int_{0}^{9} 10 \, y \, e^{y^{2}} \, dy \\
&= 5 \, \left[ \int_{0}^{9} \frac{d}{dx}\left(e^{x^{2}}\right) \, dx + \int_{0}^{9} \frac{d}{dy}\left(e^{y^{2}}\right) \, dy \right] \\
&=  5 \, \left[e^{x^{2}} + e^{y^{2}} \right]_{0}^{9} = 10 \, \left(e^{3^{4}} - 1 \right) \\
\end{align}
Once the integrals are set it is realized that there is a symmetry in them. This leads to calculating one integral as follows:
\begin{align}
I &= \int_{0}^{9} \int_{0}^{x} 10 \, e^{x^{2}} \, dy \, dx + \int_{0}^{9} \int_{0}^{y} 10 \, e^{y^{2}} \, dx \, dy = 2 \, \int_{0}^{9} \int_{0}^{x} 10 \, e^{x^{2}} \, dy \, dx \\
&= 10 \, \int_{0}^{9} 2 \, x \, e^{x^{2}} \, dx = 10 \, \left(e^{3^{4}} - 1\right)
\end{align}
A: $$
\iint_D dA = \int_0^9 dx \int_0^x dy + \int_0^9 dy \int_0^y dx
$$
Can you conclude?
A: It will be the sum of two double integrals. Define $f_1$ and $f_2$ as
$$f_1(x,y)=10e^{x^2}\cdot \chi_{\{y\le x\}}(x,y)$$
($\chi_{\{y\le x\}}(x,y)$ is $1$ if $y\le x$ and is $0$ otherwise)
and
$$f_2(x,y)=10e^{y^2}\cdot \chi_{\{y>x\}}(x,y).$$
It's easy to see that $f(x,y)=f_1(x,y)+f_2(x,y)$ for every $(x,y)\in \mathbb R^2$. So that 
$$\iint_D f(x,y) \,dA=\iint_D f_1(x,y) \,dA+\iint_D f_2(x,y) \,dA.$$
Now, for instance, 
$$\iint_D f_1(x,y)\,dA=\int_0^9 \int_0^x 10e^{x^2}\,dy\,dx$$
and a similar application of Fubini's theorem gives an iterated integral for $\iint_D f_1(x,y)\,dA$.
