Heine's identity

In mathematical analysis, Heine's identity, named after Heinrich Eduard Heine is a Fourier expansion of a reciprocal square root which Heine presented as $$\frac{1}{\sqrt{z-\cos\psi}} = \frac{\sqrt{2}}{\pi}\sum_{m=-\infty}^\infty Q_{m-\frac12}(z) e^{im\psi}$$ where $$ Q_{m-\frac12}$$ is a Legendre function of the second kind, which has degree, m − 1⁄2, a half-integer, and argument, z, real and greater than one. This expression can be generalized for arbitrary half-integer powers as follows $$(z-\cos\psi)^{n-\frac12} = \sqrt{\frac{2}{\pi}}\frac{(z^2-1)^{\frac{n}{2}}}{\Gamma(\frac12-n)} \sum_{m=-\infty}^{\infty} \frac{\Gamma(m-n+\frac12)}{\Gamma(m+n+\frac12)}Q_{m-\frac12}^n(z)e^{im\psi},$$ where $$\scriptstyle\,\Gamma$$ is the Gamma function.