Demonstrate the divergence theorem for the vector field below, using a cube of side L with a corner at the origin of the coordinate system and edges lying along the positive x, y and z axes. (In other words, demonstrate that the divergence of the vector field integrated over the volume of the cube equals to the total flux of the vector field over the surface of the cube.)
\vec{A} = y\hat{y}
Calculate the line integral for the vector field using two different paths in the xy plane:
a) from point (0,0) to point (1,0) to point (1,1)
b) from point (0,0) to point (0,1) to point (1,1)
Compare these results.