s lies in the xy plane, an angle φ up from the x axis. The relevant equations are:
x = r sin θ cos φ y = r sin θ sin φ z = r cos θ 
r = √ (x^{2} + y^{2 }+
z^{2}) θ = arctan( √ (x^{2} + y^{2}) / z ) φ = arctan( y / x ) 
Laplace's equation for the potential in the absence of sources is:
Ñ^{2}Φ = 0
Ñ^{2} in spherical coordinates is:
1  ∂  ∂  1  ∂  ∂  1  ∂  
Ñ^{2}  = 


r^{2} 

+ 


sin θ 

+ 


r^{2}  ∂r  ∂r  r^{2}sin θ  ∂θ  ∂θ  r^{2}sin^{2}θ  ∂φ^{2} 
We'll presume that our solution is separable, that is Φ( r, θ, φ ) = R(r)P(θ)Q(φ). We can check the separability assumption later. Laplace's equation is a second order differential equation, so if we find two unique solutions we've done it. Generally speaking, if the boundary conditions are separable, there's a good chance the solution is separable. If the boundary conditions are not separable, most likely we're hosed. Now,
Ñ^{2}Φ(r,θ,φ) = Ñ^{2}R(r)P(θ)Q(φ).
P is independent of r and φ, so it can be pulled through the r and φ partial derivatives. Similarly R is independent of θ and z, so it can be pulled through the θ and φ partial derivatives. Q is independent of r and θ, so it can be pulled through the r and θ partial derivatives.
PQ  ∂  ∂R  RQ  ∂  ∂P 

∂Q  
Ñ^{2}RPQ  = 


r^{2} 

+ 


sin θ 

+ 


r^{2}  ∂r  ∂r  r^{2}sin θ  ∂θ  ∂θ  r^{2}sin^{2}θ  ∂φ^{2} 
Now multiply the entire equation by r^{2}sin^{2}θ / RPQ:
sin^{2}θ  ∂  ∂R  sin θ  ∂  ∂P 

∂Q  
Ñ^{2}RPQ  = 


r^{2} 

+ 


sin θ 

+ 



∂r  ∂r  P  ∂θ  ∂θ  Q  ∂φ^{2} 
Now there's a portion which depends only on φ. We'll set that portion equal to a separation variable, m^{2}.
∂^{2}Q  

= m^{2}Q 
∂φ^{2} 
sin^{2}θ  ∂  ∂R  sin θ  ∂  ∂P  


r^{2} 

+ 


sin θ 

= m^{2} 
R  ∂r  ∂r  P  ∂θ  ∂θ 
We can solve the Q equation immediately  this is just sines and cosines. We'll choose to represent the solutions as Q = A_{m}cos mφ + B_{m} sin mφ. The remaining equation still needs a bit of work. If m = 0, the solution is Q = A_{0} + B_{0} φ. Normally B_{0} will be zero, as the linear solution rarely makes any physical sense. So m = 0 normally means we're dealing with a problem which has symmetry about the z axis, often referred to as azimuthal symmetry. These problems come up with some frequency, so we'll look into them in more detail in a moment.
We'll divide the remaining equation through by sin^{2}θ, resulting in:
1  ∂  ∂R  1  ∂  ∂P 




r^{2} 

+ 


sin θ 

 

= 0 
R  ∂r  ∂r  P sin θ  ∂θ  ∂θ  sin^{2}θ 
Now there's a portion which depends only on r. We'll set that portion equal to a separation variable, l(l+1). This seems to come out of thin air a bit  it's because this equation has been solved for over a hundred years, and it's well known now what to do at each stage. While we're at it, we'll substitute U(r) = rR(r), another trick known for a hundred years. In the 1880's, when all physics problems were known to be solved and all that was left for the graduate students was the next few decimal places, this is all graduate students did: mess with Laplace's equation in various coordinate systems.
∂  ∂U/r  ∂  ∂U  ∂U  ∂^{2}U  
r 

r^{2} 

= l(l+1) U =  r 

r 

 r 

= r^{2} 

∂r  ∂r  ∂r  ∂r  ∂r  ∂r^{2} 
1  ∂  ∂P  m^{2}P  


sin θ 

 

+ l(l+1) P  = 0 
sin θ  ∂θ  ∂θ  sin^{2}θ 
We'll try a polynomial, r^{k}, in the equation for U. Immediately we see that k(k1) = l(l+1). This is a simple quadratic, so U = A_{l}r^{l+1} + B_{l}r^{l}. More to the point, U/r, which is the r dependence of our final solution, is U/r = A_{l}r^{l} + B_{l}r^{l1}.
The equation for P is usually recast in terms of x = cos(θ), dx = sin(θ)dθ, sin^{2}θ = 1  x^{2}. Now,
∂  ∂P  m^{2}P  

(1  x^{2}) 

 

+ l(l+1) P  = 0 
∂x  ∂x  1  x^{2} 
If m is zero, we are looking at Legendre's equation. We'll consider those solutions first. Remember, m = 0 means we're looking at problems with azimuthal symmetry, that is we're looking at problems that are symmetric about the z axis.
The solution to Legendre's equation is the Legendre polynomials.
Remember,
we're working in x = cos(θ), so 1 ≤
x ≤ 1, as π ≤
θ ≤ π. We require that our solutions converge and are finite
over this interval. It can be shown that this requirement implies that
l is zero or a positive integer. So, we need only consider integer
values
of l. The first several Legendre polynomials are:
P_{0}(cos θ)
= 1 P_{1}(cos θ) = cos θ P_{2}(cos θ) = 1/2 ( 1 + 3 cos^{2}θ ) P_{3}(cos θ) = 1/2 ( 3 cos θ + 5 cos^{3}θ ) P_{4}(cos θ) = 1/8 ( 3  30 cos^{2}θ + 35 cos^{4}θ ) P_{5}(cos θ) = 1/8 ( 15 cos θ  70 cos^{3}θ + 63 cos^{5}θ ) P_{6}(cos θ) = 1/16 ( 5 + 105 cos^{2}θ  315 cos^{4}θ + 231 cos^{6}θ ) 
1 ≤ P_{n}(x) ≤ 1  P_{n}(x) complete & orthogonal over [1, 1]  
P_{n}(0) = 0, n odd 


P_{n}(1) = 1^{n}  P_{n}(1) = 1  
P_{n}(x) = 1^{n }P_{n}(x)  P_{n}'(x) = 1^{n+1 }P_{n}'(x) 
P_{0}^{0}( x ) =  1  = 1 
P_{1}^{0}( x ) =  x  = cos θ 
P_{1}^{1}( x ) =  (1  x^{2})^{1/2}  = sin θ 
P_{2}^{0}( x ) =  1/2 (3x^{2}  1 )  = 1/2(3cos^{2}θ 1) 
P_{2}^{1}( x ) =  3x (1  x^{2})^{1/2}  = 3sin θ cos θ 
P_{2}^{2}( x ) =  3 (1  x^{2})  = 3sin^{2}θ 
P_{3}^{0}( x ) =  1/2 x (5x^{2}  3)  = 1/2 cos θ (5cos^{2}θ 3) 
P_{3}^{1}( x ) =  3/2 (1  5x^{2}) (1  x^{2})^{1/2}  = 3/2(5cos^{2}θ 1)sin θ 
P_{3}^{2}( x ) =  15 x (1  x^{2})  = 15cos θ sin^{2}θ 
P_{3}^{3}( x ) =  15 (1  x^{2})^{3/2}  = 15sin^{3}θ 
P_{4}^{0}( x ) =  1/8 (35x^{4}  30x^{2} + 3)  = 1/8 (35cos^{4}θ 30cos^{2}θ +3) 
P_{4}^{1}( x ) =  5/2 x (3  7x^{2}) (1  x^{2})^{1/2}  = 5/2 cos θ (3  7cos^{2}θ) sin θ 
P_{4}^{2}( x ) =  15/2 (7x^{2}  1) (1  x^{2})  = 15/2 (7cos^{2}θ 1) sin^{2}θ 
P_{4}^{3}( x ) =  105 x (1  x^{2})^{3/2}  = 105cos θ sin^{3}θ 
P_{4}^{4}( x ) =  105 (1  x^{2})^{2}  = 105sin^{4}θ 
P_{5}^{0}( x ) =  1/8 x (63x^{4}  70x^{2} + 15)  = 1/8 cos θ (63cos^{4}θ 70cos^{2}θ + 15) 
The Spherical Harmonics  
√  2l + 1  (lm)!  
Y_{lm}(θ,φ) = 


P_{l}^{m}( cos θ ) e^{imφ}  
4π  (l+m)! 
1 

√4π 
√3  

cos θ 
√4π 
√3  
 

sin θe^{iφ} 
√8π 
√5  

(3cos^{2}θ 1) 
4√π 
√15  
 

sin θ cos θ e^{iφ} 
√8π 
√15  

sin^{2}θ e^{i2φ} 
√32π 
√7  

(5cos^{3}θ3cos θ) 
4√π 
√21  
 

(5cos^{2}θ 1)sin θ e^{iφ} 
8√π 
√105  

cos θ sin^{2}θ e^{i2φ} 
√8π 
√35  
 

sin^{3}θ e^{i3φ} 
8√π 
3  

(35cos^{4}θ 30cos^{2}θ +3) 
16√π 
15 

 

cos θ (3  7cos^{2}θ) sin θ e^{iφ} 
4√10π 
15  

(7cos^{2}θ 1) sin^{2}θ e^{i2φ} 
8√10π 
105  
 

cos θ sin^{3}θ e^{i3φ} 
8√35π 
105  

sin^{4}θ e^{i4φ} 
16√70π 
√11  

cos θ (63cos^{4}θ 70cos^{2}θ + 15) 
16√π 