# Swap limits.

#### Petrus

##### Well-known member
Hello MHB,
I got problem understanding how they can do this.
$$\displaystyle \int_0^1\int_x^1 \sin(y^2)dydx$$
and rewrite it as $$\displaystyle \int_0^1\int_0^y \sin(y^2) dxdy$$
What I have done is.
Then function is continuous ($$\displaystyle \sin$$ is a trig function) on a type I region D.
We got $$\displaystyle D= (x,y)| 0\leq x \leq 1, x \leq y \leq 1$$

Regards,

#### HallsofIvy

##### Well-known member
MHB Math Helper
Draw a picture. Since the "x" integral goes from 0 to 1, draw vertical lines at x= 0 and x= 1. Since the "y" integral goes from x up to 1. Draw the line y= x and the horizontal line y= 1. The region you are integrating over is that triangle, above y= x and below y= 1. To reverse the integral, notice that y goes form a minimum of 0 (at (0, 0)) up to 1. So the "outer integral" is from y= 0 to 1. And, then, for each y, x goes from 0 to the right to x= y. That is why the integral can be written as $$\int_{y=0}^1\int_{x= 0}^y cos(y^2)dxdy$$.

Do you see why that makes it much easier to integrate?

#### Petrus

##### Well-known member
Draw a picture. Since the "x" integral goes from 0 to 1, draw vertical lines at x= 0 and x= 1. Since the "y" integral goes from x up to 1. Draw the line y= x and the horizontal line y= 1. The region you are integrating over is that triangle, above y= x and below y= 1. To reverse the integral, notice that y goes form a minimum of 0 (at (0, 0)) up to 1. So the "outer integral" is from y= 0 to 1. And, then, for each y, x goes from 0 to the right to x= y. That is why the integral can be written as $$\int_{y=0}^1\int_{x= 0}^y cos(y^2)dxdy$$.

Do you see why that makes it much easier to integrate?
Hello HallsofIvy,
Thanks, I think I got it but I still wounder something. We draw a line y=x and we want to integrate from $$\displaystyle 0\leq x \leq 1$$ can't we then also see that it will be same limits in x and y ? so we can say $$\displaystyle 0\leq x \leq 1, 0\leq y \leq 1$$?
Edit: Never mind... I just notice then we will divide by zero.
Regards,