Integration of complicated trignometric function While solving for power radiation of an dipole antenna, i got stuck at this step during calculation.
$\displaystyle \int_0^{\pi}\frac{cos^2(\frac{\pi}{2}cos\theta)}{sin\theta} d\theta$
the methods i currently have in mind are numeric integration using software like MATLAB or substituting the taylor series.
however, I would like to know if there is any elegant closed form substitution by means of variable change etc.  
replacing $cos\theta$ by $t$, and multiplying the numerator and denominator by $sin\theta$, I got ,
$\displaystyle \int_{-1}^{1}\frac{cos^2(\frac{\pi}{2}t)}{1-t^2} dt$
However, I don't know how to proceed after this step
 A: Substituting $t=\cos{\theta}$ is a good first step. After that, note that the integrand is now an even function of $t$, so the integral from $t=-1$ to $t=1$ will be equal to twice the integral $t=0$ to $t=1$. Next, I would recommend rewriting the integrand using the partial fraction decomposition,
$$\frac{2}{1-t^2}=\frac{1}{1+t}+\frac{1}{1-t},$$
and the trigonometric power-reduction identity,
$$\cos^2{\varphi}=\frac{1+\cos{\left(2\varphi\right)}}{2}.$$
Thus,
$$\begin{align}
\mathcal{I}
&=\int_{0}^{\pi}\frac{\cos^2{\left(\frac{\pi}{2}\cos{\theta}\right)}}{\sin{\theta}}\,\mathrm{d}\theta\\
&=\int_{-1}^{1}\frac{\cos^2{\left(\frac{\pi}{2}t\right)}}{1-t^2}\,\mathrm{d}t\\
&=2\int_{0}^{1}\frac{\cos^2{\left(\frac{\pi}{2}t\right)}}{1-t^2}\,\mathrm{d}t\\
&=\int_{0}^{1}\left(\frac{\cos^2{\left(\frac{\pi}{2}t\right)}}{1+t}+\frac{\cos^2{\left(\frac{\pi}{2}t\right)}}{1-t}\right)\,\mathrm{d}t\\
&=\int_{0}^{1}\frac{\cos^2{\left(\frac{\pi}{2}t\right)}}{1+t}\,\mathrm{d}t+\int_{0}^{1}\frac{\cos^2{\left(\frac{\pi}{2}t\right)}}{1-t}\,\mathrm{d}t\\
&=\frac12\int_{0}^{1}\frac{1+\cos{\left(\pi t\right)}}{1+t}\,\mathrm{d}t+\frac12\int_{0}^{1}\frac{1+\cos{\left(\pi t\right)}}{1-t}\,\mathrm{d}t.\\
\end{align}$$
Transform the first integral in the last line above using the substitution $t=2u-1$ and transform the second integral using the substitution $t=1-v$ using the respective trigonometric identities:
$$\cos{\left(\pi(2u-1)\right)}=-\cos{\left(2\pi u\right)},$$
and
$$\cos{\left(\pi(1-v)\right)}=\cos{\left(\pi\right)}\cos{\left(\pi v\right)}+\sin{\left(\pi\right)}\sin{\left(\pi v\right)}=-\cos{\left(\pi v\right)},$$
both of which can be derived from the single angle-addition identity,
$$\cos{\left(\alpha+\beta\right)}=\cos{\left(\alpha\right)}\cos{\left(\beta\right)}-\sin{\left(\alpha\right)}\sin{\left(\beta\right)}.$$
This yields,
$$\begin{align}
\mathcal{I}
&=\frac12\int_{0}^{1}\frac{1+\cos{\left(\pi t\right)}}{1+t}\,\mathrm{d}t+\frac12\int_{0}^{1}\frac{1+\cos{\left(\pi t\right)}}{1-t}\,\mathrm{d}t\\
&=\frac12\int_{\frac12}^{1}\frac{1+\cos{\left(\pi (2u-1)\right)}}{u}\,\mathrm{d}u+\frac12\int_{0}^{1}\frac{1+\cos{\left(\pi (1-v)\right)}}{v}\,\mathrm{d}v\\
&=\frac12\int_{\frac12}^{1}\frac{1-\cos{\left(2\pi u\right)}}{u}\,\mathrm{d}u+\frac12\int_{0}^{1}\frac{1-\cos{\left(\pi v\right)}}{v}\,\mathrm{d}v\\
&=\frac12\int_{\pi}^{2\pi}\frac{1-\cos{\left(x\right)}}{x}\,\mathrm{d}x+\frac12\int_{0}^{\pi}\frac{1-\cos{\left(x\right)}}{x}\,\mathrm{d}x\\
&=\frac12\int_{0}^{2\pi}\frac{1-\cos{\left(x\right)}}{x}\,\mathrm{d}x\\
&=\frac12\operatorname{Cin}{\left(2\pi\right)}\\
&=\frac{\gamma+\ln{\left(2\pi\right)}-\operatorname{Ci}{\left(2\pi\right)}}{2}.
\end{align}$$
A: Hint
Use the double angle formula for the numerator $$\cos^2(z)=\frac 12\big(\cos(2z)+1\big)$$
Use partial fraction decomposition for the denominator and, for each of the resulting integral, make another change of variable to arrive to something looking like $$\int \frac{\cos(z)}{z}dz$$ By the end, you will arrive to  $$\displaystyle \int\frac{cos^2(\frac{\pi}{2}t)}{1-t^2} dt=\frac{1}{4} \Big(-\text{Ci}(\pi -\pi  t)+\text{Ci}(\pi  t+\pi )+\log (1-t)-\log (t+1)\Big)$$ and, as a result, $$\displaystyle \int_0^{\pi}\frac{cos^2(\frac{\pi}{2}cos\theta)}{sin\theta} d\theta=\frac{1}{2} \Big(\gamma +\log (2 \pi )-\text{Ci}(2 \pi )\Big)$$
