φ[x_,y_,z_]:=(1/(Sqrt[(((x-1))^2)+(y^2)+(z^2)]))-(1/(Sqrt[(((x+1))^2)+(y^2)+(z^2)]))

ContourPlot[(x^2)+(y^2),{x,-1,1},{y,-1,1},AspectRatio->1.2]

DensityPlot[φ[x,y,1/2],{x,-2,2},{y,-2,2},ColorFunction->"SunsetColors"]
ContourPlot[φ[x,y,1/2],{x,-2,2},{y,-2,2},Contours->100,ColorFunction->"SunsetColors"]

φ[x_,y_,z_]:=If[x>0,(1/(Sqrt[(((x-1))^2)+(y^2)+(z^2)]))-(1/(Sqrt[(((x+1))^2)+(y^2)+(z^2)])),0]

DensityPlot[φ[x,y,1/2],{x,-2,10},{y,-2,2},PlotRange->{-10,10},ColorFunction->"SunsetColors"]
ContourPlot[φ[x,y,1/2],{x,-2,10},{y,-2,2},Contours->100,ColorFunction->"SunsetColors",AspectRatio->1.9]

VectorPlot[(1/(Sqrt[(x^2)+(y^2)])){x,y},{x,-.2,.2},{y,-.2,.2},AspectRatio->1.2]

VectorDensityPlot[{(1/(Sqrt[(x^2)+(y^2)])){x,y},(Sqrt[(x^2)+(y^2)])},{x,-.2,.2},{y,-.2,.2},AspectRatio->1.2]

grad[func_]:={D[func,x],D[func,y],D[func,z]};

φ[x_,y_,z_]:=(1/(Sqrt[(((x-1))^2)+(y^2)+(z^2)]))-(1/(Sqrt[(((x+1))^2)+(y^2)+(z^2)]))
El[x_,y_,z_]:=Simplify[-grad[φ[x,y,z]]]

El[x,y,1/2]

VectorPlot[{((-1+x)/((((1/4)+(((-1+x))^2)+(y^2)))^(3/2)))-((1+x)/((((1/4)+(((1+x))^2)+(y^2)))^(3/2))),(y/((((1/4)+(((-1+x))^2)+(y^2)))^(3/2)))-(y/((((1/4)+(((1+x))^2)+(y^2)))^(3/2)))},{x,-2,2},{y,-2,2}]

VectorDensityPlot[{{((-1+x)/((((1/4)+(((-1+x))^2)+(y^2)))^(3/2)))-((1+x)/((((1/4)+(((1+x))^2)+(y^2)))^(3/2))),(y/((((1/4)+(((-1+x))^2)+(y^2)))^(3/2)))-(y/((((1/4)+(((1+x))^2)+(y^2)))^(3/2)))},φ[x,y,1/2]},{x,-2,2},{y,-2,2}]

val=0
If[val>0,Print["Positivo"],Print["Negativo"]]

VectorDensityPlot[{{If[x>0,((-1+x)/((((1/4)+(((-1+x))^2)+(y^2)))^(3/2)))-((1+x)/((((1/4)+(((1+x))^2)+(y^2)))^(3/2))),0],If[x>0,(y/((((1/4)+(((-1+x))^2)+(y^2)))^(3/2)))-(y/((((1/4)+(((1+x))^2)+(y^2)))^(3/2))),0]},If[x>0,φ[x,y,1/2],0]},{x,-1,2},{y,-2,2},VectorPoints->20]