Consider the integrals:
$$ I=\int_{0}^{\sqrt{2}}\int_{y^2}^{2}y\ dxdy \\ I'=\int_{y^2}^{2}\int_{0}^{\sqrt{2}}y\ dydx $$
From what I understand, the order of integration does not matter. However, as can be easily shown by hand or a simple online integration software:
$$I=1 \\ I'=2-y^2$$
Why are these not the same?
You can reverse the order but the limits of integration change: $$\int_{y=0}^{\sqrt{2}}\left(\int_{x=y^2}^{2}y\ dx\right)dy=\int_{x=0}^{2}\left(\int_{y=0}^{\sqrt{x}}y\ dy\right)dx.$$