How do you find the area of a region using double integrals? Can someone help me understand how double integrals work?
For instance, consider finding the area of a circle with the equation $x^{2} + y^{2} = 1$. Since the domain is $[-1,1]$ and the range is $[-1,1]$. I think we can assume that $f(x,y) = x^{2} + y^{2} - 1$, and we need to evaluate $$\int_{-1}^{1}\int_{-1}^{1}f\,dx\,dy.$$ Then, if we evaluate this integral, we get approximately $-4/3$, which clearly isn't the area of the circle. What seems to be the problem?
 A: You have the wrong $f(x,y)$. To calculate the area using your formula, the correct function is $$f(x,y)=\begin{cases}1,x^2+y^2\le 1\\0,\textrm{otherwise}\end{cases}$$
You can then rewrite your integral as $$\int_{-1}^1dx\int_{-\sqrt{1-x^2}}^{\sqrt{1-x^2}}dy$$
Can you take it from here?
EDIT
You were wondering how double integrals work. The basic intuition would be to say that they can be used to calculate volumes, based on the projection of a 3D object on a plane, and knowing the height in the perpendicular direction to the plane. Then we divide the object into a series of cuboids, with the base $\Delta x$, $\Delta y$, and height $f(x,y)$. Then the volume is $$V=\sum_D \Delta x\Delta y f(x,y)$$
Here $D$ is the projection in the xy plane. If we want to make it accurate, we choose the limit where $\Delta x, \Delta y\to 0$, and the double integral is just a notation for that:
$$V=\iint_Df(x,y) dx dy$$
So how can you use this formula to calculate area? You just choose the height to be $1$, so the volume is then $$V=\iint_D1 dxdy=1\iint_D dx dy=1\cdot A$$
where $A$ is the area. Note that I choose $1$ to be the height over the domain $D$, for which I calculate the area. But if $D\subset D'$, I can write the same integral as $$V=\iint_{D'} f(x,y) dx dy$$where$$f=\begin{cases}1, (x,y)\in D\\0, (x,y)\in D\setminus D'\end{cases}$$
A: The main idea is that only the outermost integral actually is guaranteed to have limits that go from the lowest value the variable ever takes to the highest.
The limits of the inner integrals are allowed to depend on the outer variables, and generally have to if your region is not a rectangle.
For example: "The region is the triangle bounded by $(0,0), (2,2), (0,2)$.  Find the area using a double integral."
We can approach this in two ways.  If we choose $x$ as the outer variable, then the outermost limits run from $0$ to $2$.  The inner limits however do not run from $0$ to $2$ because that would give a rectangle, not the triangle we want.  If you imagine specifying a random $x$ value, and on the graph of the region draw the vertical line there, you find $y$ usually has a more limited range: specifically, from $x$ up to $2$:$$\int_{0}^{2} \int_{x}^{2} 1 dy dx$$
Now if instead we integrate in the other order, $y$ will go from $0$ to $2$, and $x$ will now be restricted.  If you draw a random horizontal line, you will see that $x$ ranges from $0$ to $y$, and we now have
$$\int_{0}^{2} \int_{0}^{y} 1 dx dy$$
