I have been asked to calculate the Electric Potential ($V$) in the two planes $z=0$ and $z=1$ produced by a linear distribution of charge given by:
$$\lambda=(\cos{\phi})^2$$
whose shape is a circumference (ring) around the origin of constant radius $R$ ($\phi$ here denotes the polar angle). Moreover, we have been told to integrate charge infinitesimals.
My attempt:
We will be using cylindrical coordinates, so let $(\rho, \phi, z)$ be the point whose potential we want to calculate and $(R, \phi', 0)$ the point of the infinitesimal of charge we are integrating.
The potential created by a differential of charge can be calculated as:
$$dV=k\frac{dq}{|\vec{r}-\vec{r}'|}$$
Where $k$ is a constant, $\vec{r}$ is the position vector of the point whose potential we are calculating and $\vec{r}'$ is the position vector of the differential of charge. Then,
$$V=k\int_l\frac{\lambda dl}{|\vec{r}-\vec{r}'|}$$
By using the law of cosines and as $|\vec{r}'|=R$, we have that $|\vec{r}-\vec{r}'|=\sqrt{\rho^2+z^2+R^2-2rR\cos{(\phi-\phi')}}$. Hence,
$$V=k\int_0^{2\pi} \frac{(\cos{\phi'})^2 R \ d\phi'}{\sqrt{\rho^2+z^2+R^2-2\rho R\cos{(\phi-\phi')}}}$$
My problem is that I do not know how to continue, since I am not able to solve the integral. Besides, I am not very sure about what I have done, since it may be wrong.
Any help will be welcomed. Thank you
First, a general remark. Please, always get rid of unnecessary parameters, which do not involve the variable of integration. You will make your life much easier that way.
For example:
$$V=\frac{k R}{\sqrt{\rho^2+z^2+R^2}}\int_0^{2\pi} \frac{(\cos{\phi'})^2 \ d\phi'}{\sqrt{1-b\cos(\phi-\phi')}}$$
$$b=\frac{2 \rho R}{\rho^2+z^2+R^2}$$
So we only need to deal with the following integral with two parameters:
$$V'=\int_0^{2\pi} \frac{(\cos{\phi'})^2 \ d\phi'}{\sqrt{1-b\cos(\phi-\phi')}}$$
By the form of the denominator we can immediately guess the connection with elliptic integrals. So we need to transform the variable to fit the standard form. First:
$$\theta=\phi'-\phi$$
$$V'=\int_{-\phi}^{2\pi-\phi} \frac{(\cos(\theta+\phi))^2 \ d\theta}{\sqrt{1-b\cos \theta }}=\int_{-\phi}^{2\pi-\phi} \frac{(\cos \phi \cos \theta-\sin \phi \sin \theta)^2 \ d\theta}{\sqrt{1-b\cos \theta }}=$$
$$=\cos^2 \phi \int_{-\phi}^{2\pi-\phi} \frac{\cos^2 \theta d\theta}{\sqrt{1-b\cos \theta }}- \sin 2 \phi \int_{-\phi}^{2\pi-\phi} \frac{\cos \theta \sin \theta d\theta}{\sqrt{1-b\cos \theta }}+\sin^2 \phi \int_{-\phi}^{2\pi-\phi} \frac{\sin^2 \theta d\theta}{\sqrt{1-b\cos \theta }}=$$
$$=\cos^2 \phi \int_{-\phi}^{2\pi-\phi} \frac{d\theta}{\sqrt{1-b\cos \theta }}- \sin 2 \phi \int_{-\phi}^{2\pi-\phi} \frac{\cos \theta \sin \theta d\theta}{\sqrt{1-b\cos \theta }}-\cos 2 \phi \int_{-\phi}^{2\pi-\phi} \frac{\sin^2 \theta d\theta}{\sqrt{1-b\cos \theta }}=$$
$$=\cos^2 \phi V_1-\sin 2 \phi V_2-\cos 2 \phi V_3$$
This allows us to deal with three integrals separately.
Now we need to do a half-angle substitution to get the desired form:
$$\theta=2u$$
And then, for convenience:
$$t=\cos u$$
The first integral:
$$V_1=2\int_{-\phi/2}^{\pi-\phi/2} \frac{du}{\sqrt{1-b\cos 2 u }}=2\int_{-\phi/2}^{\pi-\phi/2} \frac{\sin u du}{\ sin u \sqrt{1+b-2b\cos^2 u }}=$$
$$=\frac{2}{\sqrt{1+b}}\int_{-\cos (\phi/2)}^{\cos (\phi/2)} \frac{dt}{\sqrt{1-t^2} \sqrt{1-a^2 t^2 }}=\frac{4}{\sqrt{1+b}}\int_{0}^{\cos (\phi/2)} \frac{dt}{\sqrt{1-t^2} \sqrt{1-a^2 t^2 }}$$
$$a^2=\frac{2b}{1+b}$$
The second integral:
$$V_2=2\int_{-\phi/2}^{\pi-\phi/2} \frac{\sin 2u \cos 2u~ du}{\sqrt{1-b\cos 2 u }}=4\int_{-\phi/2}^{\pi-\phi/2} \frac{\cos 2 u \cos u \sin u du}{ \sqrt{1+b-2b\cos^2 u }}=$$
$$=\frac{4}{\sqrt{1+b}}\int_{-\cos (\phi/2)}^{\cos (\phi/2)} \frac{t (2t^2-1)dt}{\sqrt{1-a^2 t^2 }}=0$$
Integrating odd function over a symmetric interval gives us zero.
Now for the last integral:
$$V_3=2\int_{-\phi/2}^{\pi-\phi/2} \frac{\sin^2 2u ~ du}{\sqrt{1-b\cos 2 u }}=8\int_{-\phi/2}^{\pi-\phi/2} \frac{\sin^2 u \cos^2 u du}{ \sqrt{1+b-2b\cos^2 u }}=$$
$$=\frac{8}{\sqrt{1+b}}\int_{-\cos (\phi/2)}^{\cos (\phi/2)} \frac{t^2 \sqrt{1-t^2}dt}{\sqrt{1-a^2 t^2 }}=\frac{16}{\sqrt{1+b}}\int_{0}^{\cos (\phi/2)} \frac{t^2 \sqrt{1-t^2}dt}{\sqrt{1-a^2 t^2 }}$$
So we need to find two integrals:
$$J_1=\int_{0}^{\cos (\phi/2)} \frac{dt}{\sqrt{1-t^2} \sqrt{1-a^2 t^2 }}$$
$$J_2=\int_{0}^{\cos (\phi/2)} \frac{t^2 \sqrt{1-t^2}dt}{\sqrt{1-a^2 t^2 }}$$
$J_1$ is called "incomplete elliptic integral of the first kind" (see the link above).
$J_2$ is more complicated, but with some effort can be expressed in terms of incomplete elliptic integrals too. For example, we can write:
$$\frac{t^2 \sqrt{1-t^2}}{\sqrt{1-a^2 t^2 }}=\frac{1}{a^2} \left(\frac{ \sqrt{1-t^2}}{\sqrt{1-a^2 t^2 }}-\sqrt{1-t^2} \sqrt{1-a^2 t^2} \right)$$
The first terms gives us "incomplete elliptic integral of the second kind", while the second (for the complete case) can be found in this answer.