Changing order of integration of a double integral Suppose we have $\int^1_0\int^{2x}_0f(x,y)dydx$ then if we change the order we have $\int^2_0\int^1_{y/2}f(x,y)dxdy$. I don't understand why $0\leq y\leq 2$ but I can see why $y/2\leq x\leq 1$.

So if we go with the red arrow then we go from $x=y/2$ to $x=1$ so $y/2\leq x\leq 1$. But if we go with the green arrow we go from $y=0$ to $y=2x$ not $y=2$, but it should be the latter why is that? What should I remember/understand so I don't make mistakes switching order of integrals?
Edit:Follow up questions. If $0\leq y\leq 1$ then then the whole triangle would not be covered but if $y>2$, would the double integral still be the same? If not what more than the triangle would be covered by the integral?
 A: The first step is graph the region, so by hypothesis of the problem we have $\int_{0}^{1}\int_{0}^{2x}f\, dydx$, then we have $$R=\{(x,y): 0\leqslant y\leqslant 2x,\quad 0\leqslant x\leqslant 1\}.$$
In terms of a graph (considering the black arrow for the integration with the order $dxdy$),

We can change our perspective and integrate first with respect to $x$. With this order of integration, $y$ runs from $0$ to $2$ in the outer integral, and $x$ runs from $x=y/2$ to $1$ in the inner integral:
$$\int_{0}^{1}\int_{0}^{2x}f\, dydx=\int_{0}^{2}\int_{y/2}^{1}f\, dxdy$$
In your plot, if you consider the perspective with the green arrow then $x$ change between $0$ and $1$ and $y$ change between $0$ y $2x$, then $\int_{0}^{1}\int_{0}^{2x}f\, dydx$. If you consider the perspective given by the red arrow then $x$ change between $y/2$ and $1$ but also $y$ change between $0$ and $2$, then the integral can be written as $\int_{0}^{2}\int_{y/2}^{1}f\, dxdy$. The change of order of integration is a change our perspective about of the region.  Indeed, we can see the region since two points of view
$$R=\{(x,y): 0\leqslant y\leqslant 2x, 0\leqslant x\leqslant 1\},\quad R^{*}=\{(x,y): y/2\leqslant x\leqslant 1, 0\leqslant y \leqslant 2\}.$$
