Hw assignment VI: Due Nov 20  20 points 

Note: Submit solutions as a Mathematica notebook (no handwritten work will be accepted !). No late submissions.

A hollow right circular cylinder of radius b has its axis coincident with the z axis and its ends at z=0, z=L.
The potential on the end surfaces are zero while the potential on the cylinderical surface is
given by

V(ϕ,z)  =  V       0 < ϕ < π/3
V(ϕ,z) = - V       π/3 < ϕ ⩽ 2π

(a)  Find an expression for the potential anywhere inside the cylinder.
(b)  If V=10 Volts, b=0.25 meters, L=1 meter. Use the expression obtained in (a) to calculate the electric field
at the origin. Express your final, calculated value, in a cartesian system.

Since the potentials at the end caps vanish we require the following for the z-component of the solution

sin((Subscript[k, n])z) where  (Subscript[k, n])=((2πn)/L)
Because we are using oscillatory functions for the z-equation, the ρ equation becomes the modified Bessel equation
and in the region inside a particular solution has the form

(Subscript[I, m])((Subscript[k, n])ρ) sin((Subscript[k, n])z) (e^(i m ϕ))

The most general solution has the form

(∑_mn) (Subscript[a, mn])(Subscript[I, m])((Subscript[k, n])ρ) sin((Subscript[k, n])z) (e^(i m ϕ))   where the coefficients (Subscript[a, mn]) are determined from the boundary conditions at ρ=b.

i.e

V(ϕ,z) = (∑_mn) (Subscript[a, mn])(Subscript[I, m])((Subscript[k, n])b) sin((Subscript[k, n])z) (e^(i m ϕ))   multiplying by (e^(-i m' ϕ)) and integrating over ϕ, we get

(1/(2π))(∫_0^(2π))V(ϕ,z) (E^(-i m ϕ))\[DifferentialD]ϕ = (∑_n) (Subscript[a, mn]) (Subscript[I, m])((Subscript[k, n])b) sin((Subscript[k, n])z)

Where we used the orthogonality properties of the azimuthal functions. We notice that this expression is a Fourier
series in z in the interval   0 < z < L. Multipling both sides by sin((Subscript[k, i])) and integrating we get

(1/(2π))(∫_0^L)sin((Subscript[k, i])z)(∫_0^(2π))V(ϕ,z) (E^(-i m ϕ))\[DifferentialD]ϕ dz =  (Subscript[a, mi]) (Subscript[I, m])((Subscript[k, i])b)  L/2

or

(Subscript[a, mn])   = (1/(L (Subscript[I, m])((Subscript[k, n])b) ))(1/π)(∫_0^L)sin((Subscript[k, n])z)(∫_0^(2π))V(ϕ,z) (E^(-i m ϕ))\[DifferentialD]ϕ dz

The z integral gives

(∫_0^L)sin((Subscript[k, n])z)= ((2L)/(nπ))   for n an odd integer. Also

(∫_0^(2π))V(ϕ,z) (E^(-i m ϕ)) = ((2 I (-1+(E^((5 I m π)/3))) V)/m)

Integrate[V Exp[-I m ϕ],{ϕ,0,Pi/3}]-Integrate[V  Exp[-I m ϕ],{ϕ,Pi/3,2Pi}]
FullSimplify[ComplexExpand[FullSimplify[%,m ∈ Integers]]]

Therefore

(Subscript[a, mn]) =   (2/((Subscript[I, m])((Subscript[k, n])b)(π^2)n))  ((2 i (-1+(e^((5 i m π)/3))) V)/m)    for m ≠0  

 for m=0 we get

(∫_0^(2π))V(ϕ,z) dϕ = -((4 π V)/3)

and so

(Subscript[a, mn]) =   (2/((Subscript[I, m])((Subscript[k, n])b)(π^2)n))  (-((4 π V)/3)) for m=0

We take the gradient of the potential to get

-(OverHat[ρ])  (∑_mn) (Subscript[a, mn]) (∂_ρ)(Subscript[I, m])((Subscript[k, n])ρ)  sin((Subscript[k, n])z) (e^(i m ϕ)) - (OverHat[z]) (∑_mn) (Subscript[a, mn])(Subscript[I, m])((Subscript[k, n])ρ) (∂_(z ))sin((Subscript[k, n])z) (e^(i m ϕ))  - ((OverHat[ϕ])/ρ) (∑_mn) (Subscript[a, mn])(Subscript[I, m])((Subscript[k, n])ρ) sin((Subscript[k, n])z) (∂_(ϕ  ))(e^(i m ϕ))

We now take the limit as we approach the origin, since (Subscript[I, m])((Subscript[k, n])ρ) is regular at the origin the only surviving terms are

- (OverHat[z]) (∑_mn) (Subscript[a, mn])(Subscript[I, m])((Subscript[k, n])0) (Subscript[k, n]) (e^(i m ϕ)) ⟶ 0  unless m=0  ⟹  - (OverHat[z]) (∑_n) (Subscript[a, 0n]) (Subscript[k, n]) (Subscript[I, 0])(0) 
and

- ((OverHat[ϕ])/ρ) (∑_mn) (Subscript[a, mn])(Subscript[I, m])((Subscript[k, n])ρ) sin((Subscript[k, n])z) i m (e^(i m ϕ))    this term has a non-vanishing component for m=1 (which cancels the 1/ρ term) however
the sin((Subscript[k, n])z) will force this term also to zero. Therefore we simply have the surviving leading order term

- (OverHat[z]) (∑_n) (Subscript[a, 0n]) (Subscript[k, n]) = (OverHat[z]) (Underscript[ ∑, n])   (2/((Subscript[I, 0])(n π b/L )n π)) ((4 V)/3) ((n π)/L)   for n odd and we used

So in the z-direction

E = ((8V)/(3 L)) (Underscript[ ∑, n]) (1/((Subscript[I, 0])(n π b/L )))

Table[1/BesselI[0,n π 0.25],{n,1,21,2}]

This seems to converge rapidly to the value

Sum[1/BesselI[0,n π 0.25],{n,1,21,2}]

and so the magnitude of E is

8 V/3  Sum[1/BesselI[0,n π 0.25],{n,1,21,2}]/meter /. V->10 Volts