I'm studying a paper which has a PDE of the form
$$\frac{\partial p}{\partial L}(L,n) = A\bigg((n^2-1)\frac{\partial p}{\partial n}(L,n)\bigg),\quad n>1,$$ with a Dirac delta initial condition $p(L=0,n) = \delta(n-1).$ Also note that $$n = \frac{2-\tau}{\tau},\quad \tau\in[0,1],\quad n\in[1,\infty).$$ To solve this PDE they then denote $P_{-\frac12+i\mu}(n),$ $n\geq1,\mu\geq 0$ the Legendre function of the first kind, which is the solution of
$$\frac{d}{dn}(n^2-1)\frac{d}{dn}P_{-\frac12+i\mu}(n) = \bigg(\mu^2+\frac14\bigg)P_{-\frac12+i\mu}(n),\quad P_{-\frac12+i\mu}(1)=1.$$ They then say that the Legendre function has the integral representation $$P_{-\frac12+i\mu}(n) = \frac{\sqrt{2}}{\pi}\cosh{(\pi\mu)}\int_{0}^{\infty}\frac{\cos{(\mu\tau)}}{\sqrt{\cosh{(\tau)}+n}}d\tau.$$
I'm completely stuck to how they get this integral representation, and why they would choose a Legendre polynomial of this form. I would really appreciate help on how to obtain this integral representation, thank you!