(*      BOUNDED SPHERICAL HARMONICS IN CYLINDRICAL COORDINATES            *)

(* Legendre Polynomials as functions of x  *)


P0=1;
P01=x;
P02=Simplify[((3*x*P01-1*P0)/2)];
P03=Simplify[((5*x*P02-2*P01)/3)];
P04=Simplify[((7*x*P03-3*P02)/4)];
P05=Simplify[((9*x*P04-4*P03)/5)];
P06=Simplify[((11*x*P05-5*P04)/6)];
P07=Simplify[((13*x*P06-6*P05)/7)];
P08=Simplify[((15*x*P07-7*P06)/8)];
P09=Simplify[((17*x*P08-8*P07)/9)];

P1[x_]=P01;
P2[x_]=P02;
P3[x_]=P03;
P4[x_]=P04;
P5[x_]=P05;
P6[x_]=P06;
P7[x_]=P07;
P8[x_]=P08;
P9[x_]=P09;

(* HARMONIC AXISYMMETRIC BOUNDED POTENTIALS IN TERMS OF r,z *)

R1=Sqrt[(r^2+z^2)];
F0=1
F1=Expand[Simplify[R1*P1[(z/R1)]]]
F2=Expand[Simplify[R1^2*P2[(z/R1)]]]
F3=Expand[Simplify[R1^3*P3[(z/R1)]]]
F4=Expand[Simplify[R1^4*P4[(z/R1)]]]
F5=Expand[Simplify[R1^5*P5[(z/R1)]]]
F6=Expand[Simplify[R1^6*P6[(z/R1)]]]
F7=Expand[Simplify[R1^7*P7[(z/R1)]]]
F8=Expand[Simplify[R1^8*P8[(z/R1)]]]
F9=Expand[Simplify[R1^9*P9[(z/R1)]]]