(* Jackson 3.1 *)
(* ------------- *)
Clear[a,b]

Integrate[LegendreP[l,x],{x,0,1}]

c[l_]:=Sqrt[Pi]/2/Gamma[1-l/2]/Gamma[(3+l)/2]

Table[c[n],{n,0,4}]

A[l_]:=(2*l+1)/2*c[l]*(a^(l+1)-(-1)^l*b^(l+1))/(a^(2*l+1)-b^(2*l+1))

Table[A[n],{n,0,4}]

B[l_]:=(2*l+1)/2*c[l]*(a^(l+1)*b^(2*l+1)-(-1)^l*b^(l+1)*a^(2*l+1))/(b^(2*l+1)-a^(2*l+1))

Table[B[n],{n,0,4}]

phi4[r_,x_]:=Sum[(A[n]*r^n+B[n]/r^(n+1))*LegendreP[n,x],{n,0,4}]
phi4[r_,x_]:=-0.1 /; r<a
phi4[r_,x_]:=1.1/; r>b

phi4[rr,Cos[th]]

a=1;b=2;
phi[r_,x_]:=Sum[(A[n]*r^n+B[n]/r^(n+1))*LegendreP[n,x],{n,0,100}]/; (r>1.0 && r<2.0)
phi[r_,x_]:=-0.1 /; (r<1.0 && x<0)
phi[r_,x_]:=-0.1/; (r>2.0 && x>0)
phi[r_,x_]:=1.1 /; (r<1.0 && x>0)
phi[r_,x_]:=1.1/; (r>2.0 && x<0)

ContourPlot[phi[Sqrt[x^2+y^2],y/Sqrt[x^2+y^2]],{x,0,2},{y,-2,2},PlotPoints->50]

(* ContourPlot[phi4[Sqrt[x^2+y^2],y/Sqrt[x^2+y^2]],{x,0,2},{y,-2,2},PlotPoints->50] *)

Plot3D[phi[Sqrt[x^2+y^2],y/Sqrt[x^2+y^2]],{x,0,2},{y,-2,2},PlotPoints->50]