Find the integral: $\frac{1}{2\pi}\int_{-\pi}^{\pi}Q_r^2(\theta) \, d\theta$ Let, $\displaystyle Q_r(\theta) = \frac{r \sin \theta}{1 - 2r\cos \theta + r^2}$ Find the integral: $\frac{1}{2\pi}\int_{-\pi}^{\pi}Q_r^2(\theta) \, d\theta$.
I know one thing that $Q_r(\theta)$ is the imaginary part of the series $\displaystyle\frac{1}{1-re^{i\theta}}$. I am not sure how to proceed next. Squaring the term $Q_r(\theta)$ results in something that is not very suitable to integrate. I am sure there is some easier and shorter method to do it.
 A: As you know that $Q_r(\theta)=\Im(1-re^{i\theta})^{-1}$, you have $$Q_r(\theta)=\sum_{n=1}^\infty r^n\sin n\theta$$ for $|r|<1$. Now Parseval's theorem gives $$\frac1{2\pi}\int_{-\pi}^\pi Q_r^2(\theta)\,d\theta=\frac12\sum_{n=1}^\infty r^{2n}=\frac{r^2}{2(1-r^2)}.$$ For $|r|>1$, replace $r$ by $1/r$.
A: Integrate both sides of the equation
$$\left( \frac{2r\sin \theta}{1 - 2r\cos \theta + r^2}\right)’
=-\frac{1+r^2}{1 - 2r\cos \theta + r^2}+\frac{(1-r^2)^2}{(1 - 2r\cos \theta + r^2)^2}
$$
to establish
$$
\int_0^\pi \frac{(1-r^2)^2}{(1 - 2r\cos \theta + r^2)^2}d\theta
= \int_0^\pi \frac{1+r^2}{1 - 2r\cos \theta + r^2}d\theta
$$
Then
\begin{align}
I(r)=& \int_0^\pi\left( \frac{r \sin \theta}{1 - 2r\cos \theta + r^2}\right)^2d\theta \\
=&\int_0^\pi \left(-\frac14 + \frac{1+r^2}{2(1 - 2r\cos \theta + r^2)}-\frac{(1-r^2)^2}{4(1 - 2r\cos \theta + r^2)^2}\right)d\theta\\
=&-\frac\pi4 +\frac{1+r^2}4 \int_0^\pi  \frac{1}{1 - 2r\cos \theta + r^2}d\theta \\
=&-\frac\pi4 +\frac{1+r^2}4 \int_0^\pi  \frac{1+r^2}{(1 +r^2)^2- 4r^2\cos^2\theta }d\theta \\
=&-\frac\pi4 +\frac{1}2 \int_0^{\pi/2} \frac{d(\tan \theta)}{\tan^2 \theta + (\frac{1-r^2}{1+r^2})^2}\\
 =&-\frac\pi4 +\frac{1+r^2}{1-r^2}\frac\pi4= \frac{\pi r^2}{2(1-r^2)}
\end{align}
Thus
$$\frac{1}{2\pi}\int_{-\pi}^{\pi}Q_r^2(\theta)d\theta
=\frac1\pi I(r)= \frac{r^2}{2(1-r^2)}
$$
