We first calculate the left side of the Divergence Theorem using four flux integrals (one for each of the four boundary surfaces) as illustrated in
Figure 12.12.9. We will need to parametrize each of the four faces which we will call
\(S_1\) (in magenta),
\(S_2\) (in yellow),
\(S_3\) (in blue), and
\(S_4\) (in green).
\begin{align*}
\vr_1(s,t)\amp= \langle 0,s,t \rangle\\
\vr_2(s,t)\amp= \langle s,0,t \rangle\\
\vr_3(s,t)\amp= \langle s,t,0 \rangle\\
\vr_4(s,t)\amp= \langle s,t,1-s-t \rangle
\end{align*}
where all of these parameterization use \(0\leq s \leq 1\) and \(0 \leq t \leq 1-s\text{.}\) These parameterizations have the corresponding normal vectors:
\begin{align*}
\vn_1 \amp = \langle 1,0,0 \rangle\\
\vn_2 \amp = \langle 0,-1,0 \rangle\\
\vn_3 \amp = \langle 0,0,1 \rangle\\
\vn_4 \amp = \langle 1,1,1 \rangle
\end{align*}
Notice that \(\vn_1\) and \(\vn_3\) point into \(Q\) while \(\vn_2\) and \(\vn_4\) point out of \(Q\text{.}\) We will take into account the idea that we will need to calculate the flow out of \(Q\) when we sum our flux integrals later.
We set up and evaluate each of these flux integrals using
Theorem 12.9.7:
\begin{align*}
S_1\amp : \int_0^{1} \int_0^{1-s} \langle (0)s-t,st-e^1,t(0-s) \rangle \cdot \langle 1,0,0 \rangle \, dt\, ds\\
S_2\amp : \int_0^{1} \int_0^{1-s} \langle s(0)-t,0(t)-e^s,t(s-0) \rangle \cdot \langle 0,-1,0 \rangle \, dt\, ds\\
S_3\amp : \int_0^{1} \int_0^{1-s} \langle st-0,t(0)-e^s, 0(s-t) \rangle \cdot \langle 0,0,1 \rangle \, dt\, ds\\
S_4\amp : \int_0^{1} \int_0^{1-s} \langle st-(1-s-t),t(1-s-t)+e^s,(1-s-t)(s-t) \rangle \\
\amp \quad \quad \quad \quad \cdot \langle 1,1,1 \rangle \, dt\, ds
\end{align*}
A strategy we can use to make our calculations more efficient is to note that we can subtract the first and third integrals from the second and fourth (remember the direction of flux) and do one integral. We can do this because the bounds on all of our parameterizations is the same. If we write out everything, we have:
\begin{align*}
S_1\amp : \int_0^{1} \int_0^{1-s} -t \, dt\, ds\\
S_2\amp : \int_0^{1} \int_0^{1-s} -e^s \, dt\, ds\\
S_3\amp : \int_0^{1} \int_0^{1-s} 0 \, dt\, ds\\
S_4\amp : \int_0^{1} \int_0^{1-s} -1+2s+t+e^s-s^2 \, dt\, ds
\end{align*}
Combining these we have:
\begin{align*}
S_4-S_1+S_2-S_3: \amp \quad \int_0^{1} \int_0^{1-s} -1+2s+2t-s^2 \, dt\, ds\\
\amp \int_0^1 (s-1)^2 s \, ds
\end{align*}
which evaluates to \(\frac{1}{12}\text{.}\)