The function \(f(x,y) = a - \frac{a(|x-y| + |x+y|)}{2b}\) over the interval \([-b.b] \times [-b,b]\) describes a square pyramid with height \(a\) and side length \(2b\text{.}\) What is the volume of such a pyramid? Doing the integral directly is difficult with the various evaluations of the absolute value terms. I could try to simplify by integrating over one quarter of pyramid with the interval \([0,b] \times [0,b]\text{,}\) then multiply by 4 to get the entire area. However, this doesn’t solve the problem with the absolute value terms; over this quarter, there are still essentially two pieces of the function. I need to split the domain further into two regions: one where \(x>y\) and one where \(x\lt y\text{.}\) In those regions, I can drop the abosolute value in the function and do a reasonable integral. In the interval \([0,b] \times [0,b]\text{,}\) those two regions are triangles, so I need to integrate over triangles. Triangles are not intervals, so I need a new technique.
I can describe the first triangle (where \(y\lt x\)) by saying that \(x \in [0,b]\text{,}\) then, once we’ve set an \(x\) value, \(y \in [0, x]\text{.}\) This is indicated in the triangle with vertical lines in Figure 7.3.2, showing that for each set \(x\) value, the \(y\) value has a bound based on the matching \(x\) coordinate. I can use this variable bound in an iterate integral. Let \(T\) represent the triangle.
\begin{equation*}
\int_T f(x,y) dA = \int_0^b \int_0^x f(x,y) dy dx
\end{equation*}
I could have reversed the order. If I have \(y \in
[0,b]\) then the condition \(y\lt x\) means that \(x \in
[y,b]\text{.}\) This is indicated by the triangle with horizontal lines in Figure 7.3.2.
\begin{equation*}
\int_T f(x,y) dA = \int_0^b \int_y^b f(x,y) dx dy
\end{equation*}
Now I will evaluate the square pyramid integral. The function was \(f(x,y) = a - \frac{a(|x-y| + |x+y|)}{2b}\text{.}\) On the triangle in \([0,b] \times [0,b]\) where \(y\lt x\text{,}\) the absolute values are \(|x-y| = x-y\) and \(|x+y| = x+y\text{,}\) so the function is \(a - \frac{a(x-y+x+y)}{2b} = a -
\frac{2ax}{2b} = a - \frac{ax}{b}\text{.}\)
\begin{align*}
\int_T f(x,y) dA \amp = \int_0^b \int_0^x a - \frac{ax}{b}
dy dx\\
\amp = \int_0^b \left. ay - \frac{axy}{b} \right|_0^x dx\\
\amp = \int_0^b ax - \frac{ax^2}{b} dx\\
\amp = \left. \frac{ax^2}{2} - \frac{ax^3}{3b} \right|_0^b\\
\amp = \frac{ab^2}{2} - \frac{ab^3}{3b} = \frac{ab^2}{2} -
\frac{ab^2}{3} = \frac{ab^2}{6}
\end{align*}
This measures one eighth of the total pyramid, so the total volume is \(\frac{4ab^2}{3}\text{.}\)