Trouble computing this double integral

$$\iint_R xe^{xy}~\mathrm{d}A \qquad 0\le x\le 2 \quad 0 \le y \le 1$$

Today I started learning about double integrals on a class I am taking, had good understanding on single-variable integrals but I simply have no idea on what to do here. I am only able to do some simple excercises were I can obviously separate the terms without "mixing" the variables, then move them out of one integral, for example:

$$\iint_R (x^2y) ~\mathrm{d}y~\mathrm{d}x \qquad 0\le y\le 1 \quad 1 \le x \le2$$ $$=\int_1^2 \left[ x^2\int_0^1 y~\mathrm{d}y \right]~\mathrm{d}x$$

And then it gets easy to do. But on that first one I don't know how to separate them. Could anyone give me a hint on what the next step is?

-
Often, it makes a difference what variable you integrate with respect to first. Should it be $x$? It would be integration by parts, slightly messy. Doing $y$ first is cleaner. – André Nicolas Jul 15 '14 at 4:26

Hint:$$\int\int_{D}xe^{xy}dA=\int_{0}^{2}\bigg(x\int_{0}^{1}e^{xy}dy\bigg)dx$$

On the inner integral think of $x$ as a constant.

-
Oh, ok, I feel kinda stupid right now. Thanks! – Delta Jul 15 '14 at 4:44
Don't feel that way. You just started learning about double integrals. You're welcome. – user71352 Jul 15 '14 at 4:48

Since the region of integration is rectangular, it suffices to first consider the integral $$\int_{y=0}^1 xe^{xy} \, dy = e^x - 1.$$ Note that $$\frac{\partial}{\partial y}\bigl[e^{xy}\bigr] = xe^{xy}.$$ Then integrate the above with respect to $x \in [0,2]$.

-
That helped a lot, thank you. – Delta Jul 15 '14 at 4:44

Integrating through $y$ first is definitely the straighter cut. However, it's good practice to verify that the order doesn't matter. To make this simpler, note that $$\int_{x=0}^2 x\,e^{x y}\,dx=y^{-2}e^{x y}\left[x y-1\right]_{x=0}^{2}=y^{-2}\left(1-e^{2y}(1-2y)\right).$$ The resulting integral over $y\in[0,1]$ is tedious but serves as a check on the other approach.

-