I must calculate the following integral in the 2 senses ($\displaystyle dxdy$ and $\displaystyle dydx$).

$\displaystyle \int _0^2 \int _1^{e^x} dydx$.

My attempt : $\displaystyle \int _0^2 \int_1^{e^x} dydx=\int _0^2 y \big | _1^{e^x}dx=e^2-3$.

I'm not sure how to proceed when it comes to change the order of integration. Here's what I did : $\displaystyle y$ goes from $\displaystyle 1$ to $\displaystyle e^2$.

$\displaystyle x$ goes from $\displaystyle 0$ to $\displaystyle 2$.

So I have the double integral $\displaystyle \int_{1}^{e^2} \int_{0}^{2} dxdy = \int_{1}^{e^2} 2dy=2(e^2-1) \neq e^2-3$. And I think they must be equal, so I made an error.