# Confusion with the divergence of E fields

Tags:
1. Dec 28, 2015

### maNoFchangE

Suppose I have electric field of the form $\mathbf{E} = 3x\mathbf{i} + 3y\mathbf{j}$. Calculating the charge density gives me $\rho = \epsilon_0 \nabla\cdot\mathbf{E} = 6\epsilon_0$.
But now if I turn one of the components of the field in the opposite direction, for example $\mathbf{E} = 3x\mathbf{i} - 3y\mathbf{j}$, then the charge density vanishes. I am confused with this because the only difference between the first and the second fields is just the direction, geometrically they are similar. Where do I go wrong?

2. Dec 28, 2015

### theodoros.mihos

You are on a 2D world. What must be $\rho$ on 3D world to make a field like $\mathbf{E} = 3x\hat{\mathbf{i}}+3y\hat{\mathbf{j}} + 0\hat{\mathbf{k}}$?

3. Dec 28, 2015

### Fightfish

Do these look "geometrically similar" to you?

4. Dec 28, 2015

### maNoFchangE

The divergence of such a field is $6\epsilon$, so this kind of charge distribution may generate that field.
@Fightfish ah I see so they are actually quite different.

5. Dec 28, 2015

### theodoros.mihos

A constant surface charge density $\rho$ make a field $\mathbf{E} = c\mathbf{k}$, for infinity surface. Flux by point sources relates by $1/r^2$ for 3D, by $1/r$ for 2D and are constants for 1D. Just trust your calculation.