Q:

How to Change the Order of Integration for this Double Integral?

I am trying to change the limits of integration for this integral. 
$ \int_0^4  \int_x^{\sqrt x} f(x,y) dydx$
If I plot it out, I see that the enclosed region where $0< x< 1, 0 < y < 1$ with the y=x being larger than $y = \sqrt x $ for values above $1$. This seems to tell me that the converted integral should be: 
$\int_0^1 \int_{y^2}^y f(x,y) dydx $
But whenever I plug both into an integral calculator, I get different answers if I put in a random equation for $f(x,y)$, which tells me that isn't right. I'm not sure what I am doing wrong, but I am assuming it has to do with the region between $x = 1$ and $x = 4$, but I am not sure what to do with that, as it's not between the curves. 
What am I missing? 

A:

Hint: Split the integral into
$$ \int_0^1\int_\sqrt x^x f(x,y)\,dydx - \int_1^4 \int_x^\sqrt x f(x,y)\,dydx $$
The answer you had is equal to the first term. The second term will need to be further split into two terms after switching variables.

