Lecture 3 Separation of Variables Today’s topics 1. Solving electrostatic problems – continued 2. Specifying boundary conditions 3. Calculating the surface charge on a conductor 4. Separation of variables in 2-D and 3-D geometries 5. Some problems using separation of variables Boundary conditions 1. The goal is to solve ∇2φ = − ρ ε0 2. Typical problems are as follows 3. The ∇2 operator has second order derivatives. Therefore we need “two” boundary conditions. 4. For the first case we can specify φ = φ0 = const . on the conductor and require that the solutions be regular over the entire closed volume. 5. For the second case we can specify φ (S 0 ) = φ0 and φ (S1 ) = φ1 6. For non-perfectly conducting surfaces we can specify the surface dependence of either φ (S ) or n ⋅ ∇φ (S ) . If we specify n ⋅ ∇φ (S ) we must also specify φ at one point anywhere in the volume to determine the arbitrary constant that can always be added to the potential. 1 7. Here is something you NEVER want to do. Consider the following class of problems. 8. In general you cannot solve Laplace’s equation in the vacuum region specifying both φ (S ) and n ⋅ ∇φ (S ) on a single surface in order to determine the unknown charge density within the volume. 9. This problem is ill conditioned and will lead to exponentially large errors. 10. Here is a 1-D example. Let φ (x , z ) = φ (x ) exp (iz ) . Then ∇2φ = φ ′′ − φ . Now solve φ ′′ − φ = 0 φ (0) = 1 φ ′ (0) = −1 φ (x ) = e −x Solution: 11. Now assume there is a small error in the specification of the boundary conditions. What happens to the solution? φ′′ − k 2φ = 0 φ (0 ) = 1 + δ φ′ (0) = −1 + δ Solution: φ (x ) = e −x + δe x 12. Note the exponentially growing contribution arising from the error. Calculating the surface charge on a perfect conductor 1. Consider the following problem ∇2φ = − ρ ε0 φ (S ) = 0 φ (V ) = regular 2 2. Near the conductor the situation is as follows ∫ ∇ ⋅ E d r′ = ∫ ρ d r′ ε0 ∫ E ⋅ n dS + ∫ E ⋅ n dS = ∫ 1 S1 2 S2 ρ d r′ ε0 3. Now, simplify the various terms ∫ ρ ρδS σS d r′ = = ε0 ε0 ε0 ∫ E ⋅ n dS = 0 σ = ρδ = surface charge density since E = 0 outside the conductor 1 S1 ∫ E ⋅ n dS = −∫ E ⋅ ndS = −E ⋅ nS = (n ⋅ ∇φ) S 2 S2 S2 4. Note that n = −n 2 is the outward normal. We now equate terms leading to the desired expression for the surface charge density in terms of the potential σ = ( n ⋅ ∇φ ) S ε0 3 Separation of variables – theory 1. Separation of variables is a good technique for solving a reasonably general class of problems satisfying Laplace’s equation. Its main limitation is that it only works in sufficiently simple geometries where separated solutions can be found. 2. The key issue with the geometry is as follows. Any separated solution satisfies Laplace’s equation regardless of the geometry. However, if the boundaries of the actual problem do not coincide with the contours where one of the separation functions is a constant, then separation of variables does not, in general, work. More on this important problem in the next lecture. 3. Below, several (but not all) geometries are discussed for which separated solutions do work. We demonstrate the procedure for 2-D and 3-D geometries. 4. As a general comment note that periodic or oscillatory separation functions are good for satisfying boundary conditions since they form complete sets. Examples: sin (n πx / a ), or J 0 (αnr / a ) with J 0 (αn ) = 0 . 5. Non-oscillatory functions are usually not useful since they do not form complete sets; that is an arbitrary function cannot be expressed as a series of separation functions of the form exp (−n πx / a ) . 6. When solving Laplace’s equation at least one set of separation functions will always be non-oscillatory. Separation of variables in a 2-D slab geometry 1. Here and below we derive the basic separation functions applicable to a specified geometry. We start with a 2-D slab where Laplace’s equation reduces to ∂ 2φ ∂ 2φ + =0 ∂x 2 ∂y 2 4 2. We now assume a separated solution of the form φ (x , y ) = X (x )Y (y ) . Laplace’s equation can now be written as 1 d 2X 1 d 2Y = − = −k 2 2 2 X dx Y dy 3. The quantity k 2 is the separation constant. It must be a constant since this is the only way a function of x can equal a function of y . 4. In general, an infinite number of k values are acceptable, depending on the dimensions of the boundaries. Thus, we must allow k → kn and then sum over all allowable kn values. The allowable values of kn cannot be determined until the boundaries are specified. 5. The separated solutions for a given n value can be written as Xn (x ) = cos (knx ) , sin (knx ) Yn (y ) = exp (kny ) , exp(−kny ) 6. The general solution for the potential has the form ∞ φ (x , y ) = ∑ (ane −kny + bne kny )e iknx −∞ 7. Observe that the general solution has non-oscillatory solutions in y and oscillatory solutions in x . 8. Clearly we can interchange the role of x and y by switching the sign of kn2 . In more general cases the kn2 can be complex. Separation of variables in a 2-D (r , θ ) cylindrical geometry 1. In cylindrical (r , θ ) geometry Laplace’s equation reduces to 1 ∂ ⎛⎜ ∂φ ⎞⎟ 1 ∂ 2φ r =0 ⎟+ r ∂r ⎜⎝ ∂r ⎠⎟ r 2 ∂θ 2 5 2. Now, let φ (r , θ ) = R (r )T (θ ) . The equation reduces to r d ⎛ dR ⎞⎟ 1 d 2T ⎜⎜r = − = k2 ⎟⎟ 2 ⎝ ⎠ R dr dr T dθ 3. For periodicity in θ choose k = ±n implying that T = exp (±in θ ) 4. The corresponding radial solutions are R = r ±n . 5. The general solution can thus be conveniently written as ∞ φ (r , θ ) = ∑ (anr n + bnr − n )e inθ −∞ Separation of variables in a 2-D (r , z ) cylindrical geometry 1. For this geometry Laplace’s equation reduces to 1 ∂ ⎛⎜ ∂φ ⎞⎟ ∂ 2φ r =0 ⎟+ r ∂r ⎜⎝ ∂r ⎠⎟ ∂z 2 2. Let φ (r , z ) = R (r ) Z (z ) . Separation of variables yields 1 d ⎛ dR ⎞⎟ 1 d 2Z ⎜⎜r = − = k2 ⎟ 2 ⎟ ⎝ ⎠ rR dr dr Z dz 3. For a geometry which has periodic boundary conditions in z over a length 2 L , we need to set kn2 = (2n π / L ) . The general solution is then given by ∞ φ (r , z ) = ∑ ⎡⎣an I 0 (knr ) + bnK 0 (knr )⎤⎦ e iknz −∞ where I 0, K 0 are modified Bessel functions. 6 2 4. For a geometry with a perfect conductor at r = a we set kn2 = − (αn / a ) where J 0 (αn ) = 0 . The general solution is ∞ φ (r , z ) = ∑ ⎡⎣ane −knz + bne knz ⎤⎦ J 0 (kna ) −∞ 5. These two solutions show that there are a variety of options in choosing the expansion functions for separation of variables. The key point is to very, very, carefully examine the geometry and the form of the boundary conditions before choosing the appropriate form of separation functions. 6. For example, how would you choose the separation functions for the slab problem below? Separation of variables in a 2-D spherical geometry with polar symmetry 1. In a spherical geometry with polar symmetry Laplace’s equation has the form 1 ∂ ⎛ 2 ∂φ ⎞⎟ 1 ∂ ⎛ ∂φ ⎞⎟ ⎜⎜r ⎜⎜sin θ ⎟⎟ + 2 ⎟=0 2 r ∂r ⎝ ∂r ⎠ r sin θ ∂θ ⎝ ∂θ ⎠⎟ 2. We let φ (r , θ ) = R (r )T (θ ) . Then Laplace’s equation becomes 1 d ⎛ 2 dR ⎞⎟ 1 d ⎛ dT ⎞⎟ 2 ⎜r ⎜sin θ =− ⎟ ⎟=k ⎟ ⎟ ⎜ ⎜ ⎝ ⎠ ⎝ ⎠ R dr dr T sin θ d θ dθ 3. Recall that in spherical geometry 0 ≤ θ ≤ π . 7 4. We now let ζ = cos θ and dζ = − sin θ dθ . The T equation becomes d dζ ⎡ dT ⎤ ⎢(1 − ζ 2 ) ⎥ + k 2T = 0 ⎢⎣ d ζ ⎥⎦ 5. For periodic solutions to exist we must choose k 2 = n (n + 1) n = 0,1, 2, 3... For this choice it follows that T = Pn (ζ ) where Pn is the Legendre polynomial. P0 = 1 Pn = P1 = ζ P2 = 1 (3ζ 2 − 1) 2 P3 = 1 (5ζ 3 − 3ζ ) 2 n 1 dn 2 ζ − 1) n n ( 2 n ! dζ 6. The R solutions are R = r n , r −n −1 . 7. The general solution is thus given by ∞ φ (r, θ ) = ∑ (anr n + bn r −n −1 ) Pn (cos θ ) 0 Separation of variables in a 3-D cylindrical geometry 1. The last geometry of interest corresponds to a 3-D cylinder. Laplace’s equation has the form 1 ∂ ⎛⎜ ∂φ ⎞⎟ 1 ∂ 2φ ∂ 2φ r + =0 ⎟+ r ∂r ⎜⎝ ∂r ⎠⎟ r 2 ∂θ 2 ∂z 2 2. Assume now that φ (r , θ, z ) = R (r )T (θ ) Z (z ) . Separation of variables is a little tricky here. Rewrite Laplace’s equation as 8 ⎡ r d ⎛ dR ⎞ r 2 d 2Z ⎤ 1 d 2T ⎟+ ⎜r ⎢ ⎥+ =0 ⎢⎣ R dr ⎜⎝ dr ⎠⎟⎟ Z dz 2 ⎥⎦ T dθ 2 3. Assume the system is periodic in both θ and z (over a length L ). Then choose the separation constants as follows 1 T 1 Z d 2T = −m 2 2 dθ 2 d 2Z ⎛ 2n π ⎞⎟ 2 = −kn = − ⎜⎜ ⎝ L ⎠⎟ dz 2 4. The T and Z solutions are given by T = e imθ Z = e iknz 5. The R equation becomes ⎞ 1 d ⎛ dR ⎞⎟ ⎛⎜ m 2 2⎟ ⎜r − + k ⎟R = 0 ⎜ ⎟ n r dr ⎜⎝ dr ⎠⎟ ⎜⎝ r 2 ⎠⎟ 6. The solution is again modified Bessel functions R = I m (knr ) , K m (knr ) 7. The general 3-D solution can now be written as φ (r , θ, z ) = ∑ ⎡⎣a m ,n I (knr ) + bmn K m (knr )⎤⎦ e imθ +iknz mn m 9 Problem 1 1. Consider the slab problem illustrated below 2. The mathematical statement of the problem is as follows ∇2φ = 0 φ (x , 0) = V0 φ (0, y ) = φ (L, y ) = 0 φ (x , ∞) = 0 3. From our earlier analysis we recall that the general solution for a 2-D slab system can be written as ∞ φ (x , y ) = ∑ (ane −kny + bne kny )e iknx −∞ 4. We will see shortly that we have made the right choice in having oscillatory solutions in x and exponential solutions in y . 5. Focus first on determining the kn which make the solution satisfy the boundary conditions on the vertical plates. This can be easily done by extending the x domain from 0 ≤ x ≤ L to −L ≤ x ≤ L as shown below. Also assume the potential at y = 0 has form illustrated. 10 6. Note that in the region 0 ≤ x ≤ L the potential coincides with the specified boundary condition. 7. Since the boundary condition in the expanded region has odd symmetry the solution for φ can be written as a sine series ∞ φ (x , y ) = ∑ (ane −kny + bne kny ) sin knx n =1 where the kn are given by kn = nπ L 8. This choice automatically guarantees that φ (0, y ) = φ (L, y ) = 0 . 9. Next, note that the boundary condition φ (x , ∞) = 0 requires that bn = 0 . 10. At this point the solution is given by ∞ φ (x , y ) = ∑ ane −kny sin knx n =1 11. The last boundary condition requires that φ (x , 0) ≡ V (x ) = ∑ an sin knx . The an can be easily found by Fourier analysis. We multiply by ∫ sin k m ∫ L ∫ L −L −L x dx . The separate terms are evaluated as follows. L V (x ) sin kmx dx = 2V0 ∫ sin 0 sin n πx m πx sin dx = Lδm −n L L m πx 2LV0 (1 − cos m π ) dx = L mπ 12. After equating the terms we find that am = 2V0 (1 − cos m π ) mπ 11 13. The complete solution is given by φ (x , y ) = 4V0 π e −kny sin kn x ∑ n n (odd ) 14. A sketch of the solution is shown below. 15. For this special case the series can actually be summed to a simple closed form as follows φ= = 4V0 e in π(x +iy )/ L Im ∑ π n n (odd ) 4V0 zn Im ∑ π n (odd ) n z = e in π(x +iy )/ L 4V0 ⎛ 1 1 + z ⎞⎟ Im ⎜⎜ ln ⎝ 2 1 − z ⎠⎟ π ⎛ sin πx / L ⎞⎟ 2V ⎟ = 0 tan−1 ⎜⎜ ⎜⎝ sinh πy / L ⎠⎟⎟ π = Problem 2 1. Let’s redo the problem of the point charge outside the conducting sphere which we previously solved by the methods of images. ∇2φ = − ρ ε0 φ (S ) = 0 12 2. To solve we first transform Poisson’s equation into Laplace’s equation by the following substitution φ (r , θ ) = q + φ (r , θ ) 4πε0l l 2 = r 2 + d 2 − 2dr cos θ 3. The function φ satisfies ∇2φ = 0 q 1 φ (a, θ ) = − 2 2 4πε0 (a + d − 2ad cos θ )1/ 2 φ (∞, θ ) = 0 4. The general 2-D spherical solution is given by −n −1 ⎤ ⎡ ⎛ r ⎞n ⎛ r ⎞⎟ ⎟ ⎢ ⎥ Pn (cos θ ) ⎜ ⎜ φ (r , θ ) = ∑ an ⎜ ⎟ + bn ⎜ ⎟ ⎢ ⎥⎦ ⎝ ⎠ ⎝ ⎠ a a 0 ⎣ ∞ 5. We must set an = 0 for regularity at ∞ . 6. The boundary condition on the surface requires that φ (a, θ ) = ∞ q ∑ b P (ζ ) = − 4πε n 0 n 0 1 (a 2 1/ 2 + d − 2ad ζ ) 2 ζ = cos θ 13 7. The bn are found using the orthogonality condition ∫ 1 −1 Pm (ζ ) Pn (ζ )d ζ = 8. We multiply the φ equation by ∫P m 2 δm −n 2m + 1 (ζ )d ζ . 9. Then ∞ ∑b ∫ n n =0 1 −1 PmPnd ζ = 2 bm 2m + 1 10. And bm = Pm (ζ ) q ⎞⎟ 1 2m + 1 ⎛⎜ ⎟⎟ ∫ ⎜⎜− 1/ 2 d ζ 2 1 ⎟ − 2 ⎝ 4πε0 ⎠ (a + d 2 − 2ad ζ ) =− q ⎛a ⎞⎟m ⎜ 4πε0d ⎜⎝d ⎠⎟ 11. The complete solution is given by φ (r , θ ) = − q 1 2 2 4πε0 (r + d − 2dr cos θ )1/ 2 q 4πε0d ∞ n ⎛a ⎞ ∑ ⎜⎝⎜d ⎠⎟⎟ 0 n +1 ⎛a ⎞⎟ ⎜ ⎝⎜ r ⎠⎟ Pn (cos θ ) 12. This form is not as convenient as the image solution. 13. However, it is the correct solution and shows how separation of variables works. 14