# Verifying Gauss' Law

1. Feb 12, 2010

### ryukyu

1. The problem statement, all variables and given/known data
For the given flux density: $$\vec{D}$$=(2y2+z)$$\widehat{x}$$+(4xy)$$\widehat{y}$$^+(xz)$$\widehat{z}$$
a)Determine the charge density.
b)Find the total charge enclosed if the surface is 0<x<1, 0<y<1, 0<z<1 (unit cube)
c)Confirm Gauss’s law by finding the net flux through the surface of the volume.

2. Relevant equations

3. The attempt at a solution

I used divergence to find the $$\rho$$v=5x

To find Qenc I integrated $$\int\int\int$$5xdxdydz and came up with
Qenc=5/2 C

The last step I know is to verify that $$\oint$$$$\vec{D}$$dS=Qenc.

From what I gather since the divergence only has an x-component we will integrate only the x-component over the dxdydz, but this gives me 7/2. I'm guessing both are incorrect, but obviously at least one of them is.

2. Feb 12, 2010

### ehild

The divergence is a scalar, and you have to integrate the flux density for all sides of the cube. Remember that the surface element dS is a vector normal to the surface.

ehild

3. Feb 12, 2010

### ryukyu

Thanks for the response and the insight.

So for the top of said cube I would integrate the z-hat coefficient by dydx?
the bottom by z-hat (-dydx)
the right by y-hat (dxdz)
left by y-hat(-dxdz)
front by x-hat(dydz)
and back x-hat(-dydz)...

4. Feb 12, 2010

### ehild

It looks OK.

ehild

5. Mar 16, 2010

### ryukyu

I apologize for not saying thanks again. I do find this site a valuable resource in attempting to learn this material instead of just blindly using equations and hoping that things work out.

6. Mar 16, 2010

### ehild

You are welcome.

ehild