Change of integration order of a double integral Which is the integral equivalent to $$\int_{0}^{\pi}\int_{0}^{\sin x}f(x, y)dydx$$ to make a change in the order of integration?
 A: Draw a picture. We are integrating $f(x,y)$ over the "first" complete arch of the sine curve.  We assume that $f(x,y)$ is "well-behaved" enough that the interchange is valid. 
For any value of $y$, the variable $x$ travels from $\arcsin y$ to $\pi-\arcsin y$. And then $y$ travels from $0$ to $1$. Thus our integral can be rewritten as
$$\int_0^1 \left(\int_{\arcsin y}^{\pi-\arcsin y} f(x,y)\,dx\right)\,dy.$$
A: $\large\mbox{No pictures !!!. Use Theta function.}$
\begin{align}
&\color{#ff0000}{\large\int_{0}^{\pi}\int_{0}^{\sin\left(x\right)}{\rm f}
\left(x, y\right)\,{\rm d}y\,{\rm d}x}
=
\int_{0}^{\pi}\int_{0}^{1}{\rm f}
\left(x, y\right)\Theta\left(\sin\left(x\right) - y\right)\,{\rm d}y\,{\rm d}x
\\[3mm]&=
\int_{0}^{1}\int_{0}^{\pi}{\rm f}\left(x, y\right)
\Theta\left(\sin\left(x\right) - y\right)\,{\rm d}x\,{\rm d}y
\\[3mm]&=
\int_{0}^{1}\left[%
\int_{0}^{\pi/2}{\rm f}\left(x, y\right)
\Theta\left(\sin\left(x\right) - y\right)\,{\rm d}x
+
\int_{0}^{\pi/2}{\rm f}\left(\pi - x, y\right)
\Theta\left(\sin\left(x\right) - y\right)\,{\rm d}x
\right]\,{\rm d}y
\\[3mm]&=
\color{#ff0000}{\large\int_{0}^{1}\left\{%
\int_{\arcsin\left(y\right)}^{\pi/2}
\left[{\rm f}\left(x, y\right) + {\rm f}\left(\pi - x, y\right)\right]
\,{\rm d}x
\right\}\,{\rm d}y}
\end{align}
