In Example $1.8$ in the electrodynamics textbook by Griffiths, he calculates the volume integral over a prism. The prism is formed of two triangles in the xy plane, with sides $x=0$ to $x=1$, $y=0$ to $y=1$, and $x=1$ to $y=1$. One located at $z=0$ connected to the other at $z=3$.
It is stated that the integral can be done in any order. For example, starting with $x$ it is state that it goes from $0$ to $(1-y)$, and that $y$ goes from $0$ to $1$, and that $z$ goes $0$ to $3$.
But if $x$ goes from $0$ to $1-y$, then does not $y$ go from $0$ to $1-x$ also?
Could someone explain please?
Let's say you have to compute the integral of a function $f=f(\vec{x})$ inside the prism. $\int_{V} f(\vec{x}) dV$. In order to compute the integral you need to parametrize the volume of the prism. In order to cover all the volume you need to let x, y, z take all the values inside the prism. Since the boundaries of z do not depend on x or y, you can let z assume all the values from 0 to 3 without any constraint. Next you want to let y assume all the values needed: it goes from 0 to 1 without any constraint either. But now, if y is fixed (i.e y = 0.3), x can't assume any value from 0 to 1: it can just go from 0 to 1-y (-> x = 1 - 0.3 = 0.7). This way you are covering all the region of interest.
$$\int_{z=0}^{z=3} dz \ \left\{ \int_{y=0}^{y=1} dy \ \left[ \int_{x=0}^{x=1-y} dx \, f(x,y,z)\right] \right\} = \int_{\rm prism} f(\vec{x}) dV.$$