A mathematically tiresome part of your solution can be significantly simplified if you make use of the concept of streamfunction: fairly long and mathematical calculations with electrical potential can be substituted with a relatively simple geometrical task. While a curl-free vector field can be expressed in terms of the scalar potential, to represent an incompressible vector field in a similar manner, a vector potential is required. However, for two-dimensional geometry, the vector potential reduces down to essentially a scalar function, referred to as the streamfunction. For instance, if we deal with a fluid flow, the streamfunction gives the total fluid flux (volume flow rate) flowing between a given point and left infinity upwards.