Changing order of integration for a double integral

definite integralsintegrationmultivariable-calculus

I just started dealing with double integrals, and I encountered the following question:

Change order of integration of the following:
$$\int^{2\pi}_{0}dx\int^{\sin(x)}_{0}f(x,y)dy.$$

So I drew the graph and tried integrating over $y$ first (meaning I take lines that are perpendicular to the $y$ axis), and got the following:

$0\leq y\leq 1$. If $0\leq x\leq \frac{\pi}{2}$ then $y=\sin(x)\leq x\leq \frac{\pi}{2}$, meaning $x=\arcsin(y)\leq x\leq \frac{\pi}{2}$, and if $\frac{\pi}{2}\leq x\leq \pi$ then $x=\arcsin(y)\geq x\geq \frac{\pi}{2}$. All in all I get:

$$\int^{1}_{0}dy\int^{\frac{\pi}{2}}_{\arcsin(y)}f(x,y)dx+\int^{1}_{0}dy\int^{\arcsin(y)}_{\frac{\pi}{2}}f(x,y)dx.$$

Is this the right way to approach this problem?

Best Answer

Your formula leads to $$\int^{1}_{0}dy\int^{\frac{\pi}{2}}_{\arcsin(y)}f(x,y)dx+\int^{1}_{0}dy\int^{\arcsin(y)}_{\frac{\pi}{2}}f(x,y)dx\\= \int^{1}_{0}dy\left(\int^{\frac{\pi}{2}}_{\arcsin(y)}f(x,y)dx- \int^{\frac{\pi}{2}}_{\arcsin(y)}f(x,y)dx\right)=0$$ which is not correct.

Recall that the function $x\mapsto \sin(x)$ is not invertible on $[0,2\pi]$, and we have to pay attention when we try to solve the equation $y=\sin(x)$ with respect to $x$.

We have that $$\int^{2\pi}_{0}dx\int^{\sin(x)}_{0}f(x,y)dy =\int^{\pi}_{0}dx\int^{\sin(x)}_{0}f(x,y)dy-\int_{\pi}^{2\pi}dx\int_{\sin(x)}^{0}f(x,y)dy.$$ Therefore, when we change the order in the first integral we find, $$\int^{\pi}_{0}dx\int^{\sin(x)}_{0}f(x,y)dy= \int_{0}^{1}dy\int_{\arcsin(y)}^{\pi-\arcsin(y)}f(x,y)dx, $$ whereas the second one is $$\int_{\pi}^{2\pi}dx\int_{\sin(x)}^{0}f(x,y)dy= \int_{-1}^{0}dy\int_{\pi-\arcsin(y)}^{2\pi+\arcsin(y)}f(x,y)dx.$$

Related Question