How do I change the order of integration of this integral? $$\int\limits_1^e\int\limits_{\frac{\pi}{2}}^{\log \,x} - \sin\,y\, dy\,dx$$
I don't understand how to change the order because of the $\log\,x$ as the upper bound for the inner integral
How do I change it so it looks like $$\int \int f(x)d(y)\,dx\,dy$$
Thanks
 A: It always helps to sketch the region of integration before doing anything else.  Sketch the curves $y = \pi/2$, $y = \log x$, $x = 1$, $x = e$.  Note the important intersection points:  for instance, the lines $x = 1$ and $x = e$ clearly intersect the curve $y = \log x$ at $(1,0)$ and $(e,1)$, and the horizontal line $y = \pi/2$ at $(1,\pi/2)$ and $(e, \pi/2)$.  The only remaining intersection point is that between $y = \pi/2$ and $y = \log x$, which occurs at $x = e^{\pi/2} > e$, so this point is not in the region of integration (as it is outside the interval $x \in [1,e]$).
Now that you have sketched the boundary of the region and marked all appropriate intersection points, it should be straightforward to see that in order to interchange the order of integration, you will need to consider two separate integrals:  the first ranges from $0 \le y \le 1$, and the second from $1 \le y \le \pi/2$.  On the former, the lower bound is $x = 1$ and the upper is $x = e^y$.  On the latter, the lower bound is again $x = 1$ and the upper is $x = e$.  This immediately furnishes the desired expression, which is a sum of two double integrals.
A: Your region is $S=\{(x,y): 1\leq x\leq e,  \log x\leq y\leq \pi/2 \}$. You split it in two regions, $S_1=\{(x,y):1\leq x\leq e, 1\leq y\leq \pi/2\}$ (a rectangle) and $S_2=\{(x,y):0\leq y\leq 1, 1\leq x\leq e^y\}$. Then you write your integral as a sum over each of these regions, and here you have the integration in the order you want. 
