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.
$\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?