Problem about reversing the order of integration. Problem: Find $$\int_1^e\int_0^{\ln x}xy\,dy\,dx$$ with the given order of integration and with the order of integration reversed. 
My Attempt:
When I solve this problem with the given order of integration, I get $$\frac{e^2-1}{8}$$ and when I solve this problem with the order of integration reversed I get the integral $$\int_0^1\int_0^{e-e^{y}}xy\,dx\,dy=\frac{1}{2}\left(\frac{3e^2}{4}+\frac{1}{4}-2e\right).$$
The answers are different and so I must be wrong somewhere. Please point my mistake or provide me with a meaningful hint. 
 A: The original integral is $\int_0^e\int_0^{ln(y)} xy dy dx$.  The limits of integration are: x goes from 0 to e and, for every x, y goes from 0 to ln(x).  Drawing a graph of y= ln(x), we see that it goes below the x-axis for x between 0 and 1.  To reverse the order of integration, we need to break the integral into 2 parts, y< 0 and y> 0.  For y< 0, x goes form 0 to $e^y$.  For y> 0, x goes from e^y to e.  The integral is $\int_{-\infty}^0 \int_{e^y}^1 xy dxdy+ \int_0^1\int_{e^y}^e xy dxdy$
A: $\int_1^e\int_0^{\ln x}xy\,dy\,dx\\
\int_1^e \frac 12 xy^2 |_0^{\ln x}dx\\
\int_1^e \frac 12 x(\ln x)^2dx\\
\frac 14 x^2\ln^2 x - \frac14 x^2\ln x + \frac 18 x^2 |_1^e\\
\frac 14 e^2 - \frac14 e^2 + \frac 18 e^2 - \frac 18\\
\frac 18 (e^2 - 1)
$
that part looks right
now flipping the order of integration
the region is bounded by:
$y = \ln x\\
y = 0\\
x = e$
$\int_0^1\int_{e^y}^e xy \,dx\, dy\\
\int_0^1\frac 12 y (e^2 - e^{2y})\, dy\\
\frac 14 e^2 y^2 - \frac 18 e^{2y}(2y-1)|_0^1\\
\frac 14e^2 - \frac 18 e^2 - \frac 18\\
\frac 18 (e^2 - 1)
$
Where do you think y0u went wrong?
