Scalar Potential of a Continuous Ring

In this worksheet you will examine the scalar potential due to a continuous ring of charge with radius R=1 and with linear charge density given by (λ/(4πϵ))=1.

The scalar potential is given by an elliptic integral, which Mathematica cannot do in general.

V=(∫_0^(2π))(1/(Sqrt[(r^2)+1-2r cos(ϕ-ϕ')+(z^2)]))dϕ'

Clear[r,z,ϕ]

Integrate[1/Sqrt[r^2+1-2r Cos[ϕ-ϕ']+z^2],{ϕ',0,2π},Assumptions->{r>0,z>0}]

?EllipticF

Mathematica can "do" the integral for particular values of the coordinates r, ϕ, and z.

r:=4
ϕ:=0
z:=2
Integrate[1/Sqrt[r^2+1-2r Cos[ϕ-ϕ']+z^2],{ϕ',0,2π}]

?EllipticK

N[%%]

It can also use this numerical evaluation to plot the potential, but this is a slow process.  How can we speed it up?  First, let's exploit the symmetries of the problem.  Since the value of the potential is independent of ϕ, we do not need to plot it for all values of ϕ.  Instead, we can choose ϕ=0 and plot V as a color on the r and z plane.

We therefore compute V=(∫_0^(2π))(1/(Sqrt[(r^2)+1-2r cos(ϕ')+(z^2)]))dϕ'

Clear[r,ϕ,z]
V=Integrate[1/Sqrt[r^2+1-2r Cos[ϕ']+z^2],{ϕ',0,2π}];

Plot3D[V,{r,0,3},{z,-1,1},AxesLabel->{r,z}, ColorFunction-> Hue,ViewPoint->{0,0,Infinity},MeshFunctions->{#3 &}]

by Corinne Manogue