$$\int_2^4\int_{x/2}^\sqrt{x}xy\ dy\ dx = \frac{11}{6}\neq\int_{x/2}^\sqrt{x}\int_2^4xy\ dx\ dy=3\left[x-\frac{x^2}{4}\right]$$
How do I know that Fubini's theorem ought not to work here?
$$\int_2^4\int_{x/2}^\sqrt{x}xy\ dy\ dx = \frac{11}{6}\neq\int_{x/2}^\sqrt{x}\int_2^4xy\ dx\ dy=3\left[x-\frac{x^2}{4}\right]$$
How do I know that Fubini's theorem ought not to work here?
Copyright © 2021 JogjaFile Inc.
Fubini's theorem does work, just not how you think. In particular, it should be
$$\int_2^4\int_{x/2}^\sqrt{x}xy~\mathrm{d}y~\mathrm{d}x=\int_2^4\int_1^2 xy\chi_{[2,4]\times\left[\frac{x}{2},\sqrt{x}\right]}(x,y)~\mathrm{d}y~\mathrm{d}x=\int_1^2\int_2^4 xy\chi_{[2,4]\times\left[\frac{x}{2},\sqrt{x}\right]}(x,y)~\mathrm{d}x~\mathrm{d}y,$$
where $\chi_A$ denotes the characteristic function of the set $A$, at which you can re-express the characteristic function in the integrand to reintroduce variable bounds if you so want. The key thing is that the bounds have to be constant to apply Fubini's theorem. In particular, Fubini's theorems states that you can interchange the order integration over rectangles, and so to get a rectangle we simply put our domain in a sufficiently big rectangle and make the integrand zero outsize our original domain.
So see how we can proceed with the integral, observe that
$$(x,y)\in[2,4]\times\left[\frac{x}{2},\sqrt{x}\right]$$
if and only if
$$(x,y)\in\left[y^2,2y\right]\times[1,2],$$
and so
$$\chi_{[2,4]\times\left[\frac{x}{2},\sqrt{x}\right]}(x,y)=\chi_{\left[y^2,2y\right]\times[1,2]}(x,y).$$
This gives us that
$$\int_2^4\int_{x/2}^\sqrt{x}xy~\mathrm{d}y~\mathrm{d}x=\int_1^2\int_2^4 xy\chi_{\left[y^2,2y\right]\times[1,2]}(x,y)~\mathrm{d}x~\mathrm{d}y=\int_1^2\int_{y^2}^{2y}xy~\mathrm{d}x~\mathrm{d}y.$$
This is how you use Fubini's theorem to change the order of integration. The important thing is to just remember what Fubini's theorem actually says.