I’m teaching E&M this semester, and the following question arose as I was preparing a lecture on the mathematics needed for studying electricity and magnetism. When one talks about the divergence of a vector field, it’s nice to give a physical picture of what means geometrically. The standard picture is that a vector field has a non-zero divergence if the vector field either emanates from (positive divergence)  or converges (negative divergence) to a point. Like this positive divergence field: This vector field has a positive divergence, and no, this is not the field I'm asking you to create.

In case you’re interested, this field is simply given by . So this is a nice picture to keep in mind, and it helps you see why the vector field has zero divergence:

Ok. Now you have a geometrical picture of divergence, right? Use this understanding to tell me whether the field below has a non-zero divergence:

In this case, the geometrical picture I painted for you doesn’t give the right answer. This vector field does not diverge from a point, as the field lines are all precisely parallel. However although, the field does not emanate from a point,  it is always pointing away from the y-axis. Furthermore, the algebraic formulation of the divergence of this vector field is easily calculated: and this divergence is always negative, at any value of x.

So my question is this: is it possible to create an electric field that has globally parallel electric field lines yet still possessing  a non-zero divergence just like the plot above? If so, what charge distribution would give rise to such a field?

Does my geometrical picture of divergence need to be modified?