# Check Divergence Theorem on Unit Cube

1. Dec 28, 2008

1. The problem statement, all variables and given/known data
Check the Divergence Theorem $\int_V(\nabla\cdot\bold{v})\,d\tau=\oint_S\bold{v}\cdot d\bold{a}$

using the function $\bold{v}=<y^2, 2xy+z^2, 2yz>$ and the unit cube below.

Now when I calculate the divergence I get
$(\nabla\cdot\bold{v})=2y+2x+2y$

but Griffith's says that it is 2(x+y)

before I continue, I need to know what the heck I am missing?

2. Dec 29, 2008

### Defennder

How did you get that? You should have $$\frac{\partial v_x}{\partial x} + \frac{\partial v_y}{\partial y} + \frac{\partial v_z}{\partial z}$$. Check your first term $$\frac{\partial v_x}{\partial x}$$.

3. Dec 29, 2008