Average value using triple integrals Find the average value of the function $f(x,y,z)=xyz$ over the tetrahedron with vertices, $(0,0,0),(1,0,0), (1,1,0), \text{and }(1,1,1)$ 
 A: Hint:
For each fixed $z\in[0,1)$, the region of integration (in $x$ and $y$) is a triangle.  
How do you figure out which triangle?  Consider the following three lines: $L_1$, the line connecting $(0,0,0)$ to $(1,1,1)$; $L_2$, the line connecting $(1,0,0)$ to $(1,1,1)$; and $L_3$, the line connecting $(1,1,0)$ to $(1,1,1)$.
For a fixed $z_0$, the points on these three lines which have $z_0$ as their $z$-coordinate form the vertices of the triangle.
See if you can use this to come up with, for each $z$, what the corresponding $x$ and $y$ limits are; then compute the integral as either $\iiint\cdots\,dx\,dy\,dz$ or $\iiint\cdots dy\,dx\,dz$, depending on how you parameterize the triangles.
A: Begin by finding the boundary of the region.
In this tetrahedron, $0 \le z$, giving a lower bound on $z$.
Now, take the three vertices that form the top face of the tetrahedron, $(0,0,0), (1,0,0)$, and $(1,1,1)$, and find the plane through them: $z = y$. Thus, the bounds on $z$ are $0 \le z \le y$.
Next, consider the boundaries on $y$. Clearly, $0 \le y$.
Now, take the vertices that make up the edge of the tetrahedron in the greatest $y$ direction, without regard to the $z$ coordinate: $(0,0,0)$ and either $(1,1,0)$ or $(1,1,1)$, and find the line through them: $y = x$. Thus, the bounds on $y$ are $0 \le y \le x$.
Finally, consider the boundaries of $x$. Take the vertex that makes up the edge with the least $x$, without regard to $y$ or $z$: $(0,0,0)$, and take the vertex that makes up the edge with the greatest $x$: (Any of the other three, with $x = 1$). This gives that the bounds on $x$ are $0 \le x \le 1$.
Now, set up the integral itself.
$$\int\limits_{x = 0}^{1}\int\limits_{y = 0}^{x}\int\limits_{z = 0}^{y} xyz\,dz\,dy\,dx$$
$$\int\limits_{x = 0}^{1}\int\limits_{y = 0}^{x}\left[\frac{xyz^2}{2}\right]_{z = 0}^{y}$$
$$\int\limits_{x = 0}^{1}\int\limits_{y = 0}^{x}\frac{xy^3}{2}$$
$$\int\limits_{x = 0}^{1}\left[\frac{xy^4}{8}\right]_{y = 0}^x$$
$$\int\limits_{x = 0}^{1}\frac{x^5}{8}$$
$$\left[\frac{x^6}{48}\right]_{x = 0}^{1}$$
$$\frac{1}{48}$$
