Can I write a 2-dimensional electric field as an analytic function on the complex plane? Let's consider a two-dimensional electric field $\textbf{E}=\textbf{E}(\mathbf x)$, where $\mathbf x\in \mathbb R^2$, and $\textbf{E}$ is a vector representing the direction and strength of the field at that point.
As a vector field, $\textbf{E}$ is the gradient of a scalar field $\phi(\mathbf x)$, the electric potential at point $\mathbf x$:
$$\textbf{E}(\mathbf x)=\nabla\phi(\mathbf x).
$$
As E is the gradient of a scalar field, the curl of $E$ should be zero. 
Now let's bring in complex numbers. The input and output of $E(\mathbf x)$ are both two-dimensional vectors; therefore the input and output can be written as two complex numbers. So we can define that $E(z)$ as a complex-valued function defined on $\mathbb C$.
Since the curl of $\textbf{E}$ is zero, $\frac{\partial E_x}{\partial y}=\frac{\partial E_y}{\partial x}$. This is very similar to one of the Cauchy Riemann equations.
The Cauchy-Riemann equations are
$$
u_x'=v_y'\\
v_x'=-u_y'.
$$
More details about Cauchy-Riemann Equations.
Question:
I hope that $\textbf{E}(z)$ is analytic, but apparently, that's not necessarily the case. Are there any ways to change this a bit so that $\textbf{E}(z)$ is analytic? Can electric fields be studied using analytic functions?
This is not the type of thing I see in most textbooks, so it is very difficult to explain what I mean. Please make sure you understand what I mean first before leaving a comment or a vote. If I am not clear, please ask me to clarify it.
I don't think this is a duplicate: although there are many posts on PSE about complex numbers, they are often very broad and many of them are just about simple things such as expressing sine waves with complex exponentials.
 A: $\def\RR{\Bbb R^2} \def\CC{\Bbb C} \def\bE{{\bf E}} 
\def\D#1#2{{d#1 \over d#2}} 
\def\PD#1#2{{\partial#1 \over \partial#2}} \def\curl{\mathop {\rm curl}}
\def\div{\mathop {\rm div}}$
Warning. This is a re-edited version, where the main change was redefining the relationship between $\bE$ and the holomorphic function $E(z)$. This was necessary because the Cauchy-Riemann equations had been written with the wrong sign. As a consequence some signs had to be
changed here and there. I hope not having so introduced other unintentional misprints.
A mathematical clarification. A 2D electric field is a vector field on a 2D real vector space, in other words a mapping $\ \RR\to\RR$. The complex field $\CC$ is a vector space isomorphic to $\RR$ (as a vector field). It has a richer algebraic structure, since in $\CC$ a multiplication is also defined, with properties that make it into a field. But this doesn't cancel its being an $\RR\!$ vector space.
Therefore it's perfectly legitimate to speak of our electric field as a function $E:\ \CC\to\CC$. At the same time coordinates $x$, $y$ in $\RR\!$ are $\Re z$, $\Im z$, with $z\in\CC$. Components $E_x$, $E_y$ could be identified with $\Re E$ and $\Im E$, if not for a sign problem. 
You aren't exactly right that 
$\curl \bE=0$ may be seen as one of the Cauchy-Riemann equations. Actually it says
$$\PD{}y\,{\Re E} = -\PD{}x\,{\Im E}$$
so we have to adjust a sign, defining
$$E_x = \Re E \quad{\rm but}\quad 
E_y = -\Im E.$$
What about the second C-R equation? let's try:
$$\PD{}x\,{\Re E} = \PD{}y\,{\Im E}.$$
$$\PD{E_x}x = -\PD{E_y} y$$
$$\div \bE = 0.$$
We got it! This is another Maxwell equation $\bE$ obeys in an uncharged homogeneous dielectric. 
Finally, about electrostatic potential. It would be nice if we could write
$$E = -\D Wz$$
with $W$ some holomorphic function. Observe that 
$$-\D Wz = -\PD{}x\,(\Re W + i\,\Im W)$$
and (since $W$ is holomorphic) the RHS can also be written
$$-\PD{}x\,\Re W + i\,\PD{}y\,\Re W.$$
Then 
$$E_x = -\PD{}x\,\Re W \qquad 
E_y = -\PD{}x\,\Re W$$
$$\Re W = \phi.$$
It remains to understand the physical meaning of $\Im W$. Would you like to try?
Hint: look for an interpretation of its level curves.
A: I am not sure about the question. But I'll give it a try. Since an electrostatic field is irrorational i.e.$\boldsymbol{\nabla}\times\textbf{E}(\textbf{x})=0$, it amounts to $$\frac{\partial E_x}{\partial y}=\frac{\partial E_y}{\partial x}.\tag{1}$$ Please note that $$
\frac{\partial }{\partial z} =
\frac{1}{2}\left(
  \frac{\partial }{\partial x}- i\frac{\partial}{\partial y}
\right), 
\quad 
\frac{\partial }{\partial z^*} =
\frac{1}{2}\left(
  \frac{\partial }{\partial x} + i\frac{\partial}{\partial y}
\right).
$$
Now, in Cartesian coordinates the electric field can be decomposed as $$\textbf{E}(\textbf{x})=\textbf{E}(x,y)=\hat{\bf{x}}E_x(x,y)+\hat{\bf{y}}E_y(x,y)$$ when written in terms of $(x,y)$. Writing in terms of a different set of independent variables $z,z^*$, $$E_x(x,y)\to \tilde{E}_x(z,z^*),~{\rm and}~E_y(x,y)\to \tilde{E}_y(z,z^*)\tag{2}$$ where '$\tilde{}$' signifies that the functional dependence, in general, is different. Now the relation $(1)$ becomes $$i\Big(\frac{\partial}{\partial z}-\frac{\partial}{\partial z^*}\Big)\tilde{E}_x=\Big(\frac{\partial}{\partial z}+\frac{\partial}{\partial z^*}\Big)\tilde{E}_y.\tag{3}$$
Now, $f$ is an analytic function of $z$ if $$\frac{\partial f}{\partial z^*}=0.\tag{4}$$ When $\tilde{E}_{x,y}$ are analytic functions, they'll satisfy $\frac{\partial \tilde{E}_x}{\partial z^*}=\frac{\partial \tilde{E}_y}{\partial z^*}=0.$ Therefore, $(3)$ simplifies to
$$\frac{\partial}{\partial z}(\tilde{E}_x+i\tilde{E}_y)=0.$$ Therefore, for $E_x$ and $E_y$ to be analytic, the necessary condition is that $\tilde{E}_x+i\tilde{E}_y$ must be independent of $z$.
