# Surface integral of a vector field over a cube

I tried doing the following question using divergence formula as well as surface integral for each faces yet am not able to get an answer given in the options, could someone tell me where i am going wrong?

Define I to be the value of surface integral $\int E.dS$ where dS points outwards from the domain of integration) of a vector field E [$E= (x+y^2)i + (y^3+z^3)j + (x+z^4)k$ ] over the entire surface of a cube which bounds the region ${0<x<2, -1<y<1, 0<z<2}$ . The value of I is a) $0$ b) $16$ c)$72$ d) $80$ e) $32$

Attempt: Divergence $\iint F.n\,dS = \iiint \nabla.F \, dV$

$\nabla.F$ = $1+3y^2+4 z^3$

integrating it, I get $xyz +y^3xz+z^4xy$ putting the limits, I get the answer 40.

Using the second method, integrating it over each face I get the answer 136/3.

at $x = 2$ (+i) $\iint x+y^2\,dy \,dz$
at $x = 0$ (-i) $\iint -(x+y^2)\,dy \,dz$ and similarly for the rest of the faces. Kindly help.

$\nabla.F$ = $1+3y^2+4 z^3$

integrating it, I get $xyz +y^3xz+z^4xy$ putting the limits, I get the answer 40.

Something goes wrong here. So you need: \begin{align}\iiint \nabla \cdot F \,\mbox{d}V & = \int_0^2 \int_{-1}^1 \int_0^2 \left( 1+3y^2+4 z^3 \right)\,\mbox{d}x\,\mbox{d}y\,\mbox{d}z \\[8pt] & = \int_0^2 \int_{-1}^1 \left( 6 y^2 + 8 z^3 + 2 \right)\,\mbox{d}y\,\mbox{d}z \\[8pt] & = \int_0^2 \left( 16 z^3 + 8 \right) \,\mbox{d}z \\[8pt] & = 80 \end{align} And that's one of the possible answers.

I suggest you check your work for the different surface integrals as well and if you can't find your mistake, give the calculations you did for one side in more detail so we can see where it goes wrong.

• Thank you very much! I didn't realize until now that putting the limits after integrating all the Variables was wrong way to do. Apr 4, 2017 at 15:24
• Just inquiring. If I calculate the surface integral individually over each face by using each of the components separately and then sum it , will the result be equal. Will that be right ? Apr 4, 2017 at 15:44
• Yes it also correct but more longer it will be. Apr 4, 2017 at 15:58
• @Shashaank Indeed, by the divergence theorem, this is the same as the surface integral of the vector field over the (entire) cube, which you can calculate by integrating over the 6 different faces seperately. Apr 4, 2017 at 16:03
• @StackTD OK thanks. Apr 4, 2017 at 16:41