### Double integrals

Given a function and a set , the integral

is simply the volume under the graph of over the given set.

Assume that we would like to calculate the volume of a pyramid with a base in form of a isosceles right triangle (with boundary of axes and line ) and height , so in point the height is given by the following formula . So the volume is

where is the triangle mentioned above.

How to calculate this integral? It will be described below.

### Fubini Theorem

Fubini theorem states that such an integral is the integral over of the integral over , and i the same as integral over of the integral over , in other words (for functions nice enough):

where and are such that

Obviously you have to treat the outer variable as a constant parameter when calculating the inner integral.

Therefore, returning to our example of the pyramid, the section at has area , so the volume is:

which is consistent with our knowledge about geometry.