1

I would like to know how to compute

$$\int_{-\pi/2}^{\pi/2}(\log{(\sec{\theta})})^n\,\mathrm{d}\theta$$

for $n \in \mathbf{N}$. This is as far as I was able to reduce the problem of the integral

$$\int_{-\infty}^\infty \frac{(\log({A\sqrt{z^2 + \tau^2}}))^n}{z^2+\tau^2} \, \mathrm{d}z$$

to follow some work in this paper. My Mathematica installation can compute the top integral for $n=1,\, 2$, but only very slowly and the paper warns that Mathematica sometimes computes the wrong answer.

Diffycue
  • 836
  • 2
    Your integral is just $2 (-1)^n \int_0^\frac{\pi}{2} \ln^n(\cos x) dx$. Which can be evaluated by considering $I(k) =\int_0^\frac{\pi}{2} (\cos x)^kdx$ and differentiating $n$ times with respect to $ k$. – Zacky Oct 20 '18 at 21:41
  • 1
    @Dahaka Thanks! If you just copy/paste that into an answer I can accept it :) – Diffycue Oct 20 '18 at 21:45
  • Done! I was thinking that you desire to find a closed form, which I'm not sure how can it be done (it's final form), but I am pretty sure it's a sum that involves some Stirling numbers of the second kind. Maybe this is also of your interest: https://math.stackexchange.com/q/2733728/515527. – Zacky Oct 20 '18 at 21:52

1 Answers1

3

Since the integrand is an even function and $\ln^n(\sec x)=(-\ln(\cos x))^n$ we have that: $$\Omega=\int_{-\pi/2}^{\pi/2}(\log{(\sec{x})})^n\,\mathrm{d}x=2(-1)^n \int_0^\frac{\pi}{2} \ln^n(\cos x)dx$$ This can be computed by considering $$I(k)=\int_0^\frac{\pi}{2} (\cos x)^k dx = \frac12 B\left(\frac{k+1}{2},\frac12\right)$$ And differentiating with respect to $k$, and putting $k=0$ afterwards gives a way to compute up to how much log powers you desire to find. Namely for your integral: $$\Omega= 2(-1)^n \frac{\partial^n}{\partial k^n}\frac12B\left(\frac{k+1}{2},\frac12\right)\large|_{k=0}=(-1)^n\sqrt{\pi}\frac{\partial^n}{\partial k^n} \left(\frac{\Gamma\left(\frac{k+1}{2}\right)}{\Gamma\left(\frac{k}{2}+1\right)}\right)\large|_{k=0} $$

Zacky
  • 30,116
  • 1
    And is there a "nice" expression you can write after taking $n$ derivatives of the ratio of the Gamma functions and setting $k=0$? – Mark Viola Oct 20 '18 at 22:21