Magnetic fields and the complex plane The electrostatic potential $\varphi$ must satisfy Laplace's equation in regions without charge:
$$\nabla^2 \varphi = 0.$$
If there is no $z$ dependence in the problem we are solving, we can choose the real or complex part of a holomorphic function to be an acceptable potential.
I am interested in the analogy of this setup for magnetic fields.  If you have a current carrying wire perpendicular to a plane, then the contour integral of the magnetic field in the plane on a closed loop $\gamma$ will be
$$\int_\gamma \vec{B}\cdot \vec{dr} = \mu_0 I$$
where $\mu_0$ is a constant and $I$ is the current in the wire.  In the plane, the magnetic field is a 2-dimensional vector field, so this expression is reminiscent of the residue theorem: indeed, we can pick a complex function $b(z)$ with a simple pole at the location of the wire which gives the magnetic field at any point $z$ in the plane.
My questions are


*

*What are the hypotheses here, as in when can we describe the magnetic field in a plane by a meromorphic function?

*Is there a generalization of differentiable complex functions that have nonzero curl over a region?  Specifically, can we model not only the field due to a wire, but also the field due to a region of penetrating current density?  I understand that when you introduce curl you are losing the "flavor" of holomorphic functions, but I was wondering if complex variables were still useful in some way here.

 A: Note that electric fields of a collection of point charges can be modeled as meromorphic functions also.  In this way, the electric and magnetic fields are really quite similar.  It is important that the sources (whether they be charges for the electric field or currents for the magnetic field) are "pointlike."  A pointlike charge is just a point charge, while a pointlike current is one that looks like a point on a 2d cross-section--it must be a filamentary current.  So, abstract charge and current densities can't be handled by meromorphic functions.
I think for your second question, it's better think about things the other way around.  Meromorphic functions comprise a subset of more general kinds of non-holomorphic complex functions, but many of the same tools we use to study meromorphic functions (e.g. the residue theorem) have analogues in 3d vector calculus.  The residue theorem is just a special case of Stokes' theorem:
$$\oint B \cdot d\ell = \int \nabla \times B \, dA$$
when the source of $B$ (that is to say, currents) are all filamentary, then $\nabla \times B$ is composed of isolated delta functions on the area of integration, exactly in analogy to a meromorphic function with isolated non-analytic points.  But this formula is valid for all kinds of current sources, not just wires.  It is the complex analysis that is specialized, not the vector calculus.
However, you can still use complex analysis here.  Generally speaking, to convert from vector calculus on a 2d plane to complex analysis, you usually replace $\nabla$ by $\partial/\partial \bar z$.  A cross product is taking the imaginary part of complex multiplication.  A dot product is taking the real part.  You probably have to throw in some conjugations in there so that $a \cdot a = |a|^2$ for a vector $a$.
The connections between vector calculus and complex analysis are really quite vast, for they both handle the same underlying principles, just in different languages.  Another good example is the Cauchy Integral Formula.  Writing it out in the language of vector calculus shows you that it's just an application of a Green's function for the vector derivative in free space--something we use in 3d all the time!
For this reason, I generally prefer to convert from complex analysis to vector calculus, not the other way around.  The latter is, in my mind, a more natural framework for general problems and is still capable of everything complex analysis is capable of, but I imagine this is a matter of preference.
