# Problem on electric field

1. Dec 25, 2005

### Reshma

I have the electric field in a region give by:
$$\vec E = \frac{k}{\epsilon_0 a^4} \left(ax^2\hat x + yz^2\hat y + y^2z\hat z\right)$$
where 'k' and 'a' are constants.
There are few questions I need to solve.

1: Is the field conservative?
A: Yes. I computed the curl and found it equal to zero.
$$\nabla \times \vec E = 0$$

2: Calculate the charge density at a point P(x,y,z).
A: I applied the differential form of Gauss's law.
$$\nabla \cdot \vec E = \frac{\rho}{\epsilon_0}$$
$\rho$ is the charge density.
So, I got the charge density as:
$$\rho = \epsilon_0 \left[2ax + y^2 + z^2\right]$$
Please verify if my method is correct.

3: Determine the charge enclosed in a cube of side 'a' with one of its corners at the origin and sides parallel to x,y and z axes.
A: I applied Gauss's law here too!
$$\int \vec E \cdot d\vec a = \frac{Q_{enclosed}}{\epsilon_0}$$
How do I calculate the flux here?

Last edited: Dec 25, 2005
2. Dec 25, 2005

### Tom Mattson

Staff Emeritus

Right again.

Calculate it over each face of the cube, one at a time. Here's a hint: For the two faces that are parallel to the yz-plane, the unit normals are $\hat{i}$ and $-\hat{i}$.

3. Dec 25, 2005

### Tide

Problem 3 is ambiguous since any one of the 8 corners of the cube could be at the coordinate origin - which is probably a hint at what the answer will be! :)

All you need to do is recognize that $d\vec a$ is in the direction of the normal to the surface and consists of products of dxdy, dxdz and dydz - then integrate over all 6 faces of the cube.

4. Dec 27, 2005

### Reshma

Thanks Tom Mattson and Tide for looking into my problem!
Er..actually I made a serious blunder here :uhh: .
I forgot to multiply the constant factor in the electric field expression. So the charge density is:
$$\rho = \frac{k}{\epsilon_0 a^4} \epsilon_0 \left[2ax + y^2 + z^2\right]$$
$$\rho = \frac{k}{a^4} \left[2ax + y^2 + z^2\right]$$

5. Dec 27, 2005

### Reshma

Thanks, I tried it. There are 6 faces in all.
1] x = a, $d\vec a = dydz\hat x$

$$\frac{k}{\epsilon_0 a^4} \int_0^a \int_0^a a^2 dydz = \frac{ak}{\epsilon_0}$$

2] x = 0, $d\vec a = -dydz\hat x$
Intergal vanishes here!

3] y = a, $d\vec a = dxdz\hat y$

$$\frac{k}{\epsilon_0 a^4} \int_0^a \int_0^a az^2 dxdz = \frac{ak}{3\epsilon_0}$$

4] y = 0, $d\vec a = -dxdz\hat y$
Integral vanishes here too.

5] z = a, $d\vec a = dxdy\hat z$

$$\frac{k}{\epsilon_0 a^4} \int_0^a \int_0^a ay^2 dxdz = \frac{ak}{3\epsilon_0}$$

6] z = 0, $d\vec a = -dxdy\hat z$
Integral vanishes here.

So the total flux is:
$$\frac{ak}{\epsilon_0} + \frac{ak}{3\epsilon_0} + \frac{ak}{3\epsilon_0} = \frac{5ak}{3\epsilon_0}$$

Hence, total charge enclosed is:
$$Q_{enclosed} = \epsilon_0 \frac{5ak}{3\epsilon_0} = \frac{5ak}{3}$$

Last edited: Dec 27, 2005
6. Dec 27, 2005

### Reshma

An alternative method

I discovered yesterday that there is yet another alternative method to solve this problem. I can use the Green's theorem over a volume element.
$$Q_{enclosed} = \int_{all space} \rho dV$$
dV is the volume element given by $dV = dxdydz$
So,
$$Q_{enclosed} = \frac{k}{a^4}\int_0^a \int_0^a \int_0^a \left[2ax + y^2 + z^2\right]dx dy dz$$
The evaluation of this integral gives me the same result as above.
$$Q_{enclosed} = \frac{5ak}{3}$$