4

I am trying to evaluate $$J(n)=\int_{-\infty}^{\infty} \frac{\mathrm dx}{\cosh(x)^n}=2\int_{0}^{\infty} \frac{\mathrm dx}{\cosh(x)^n}$$ for $n\in\Bbb N$. I started with $t=\tanh\frac{x}2$: $$J(n)=4\int_0^1\frac{(1-t^2)^{n-1}}{(1+t^2)^n}\mathrm dt$$ then I used the binomial theorem to get $$J(n)=4\sum_{k=0}^{n-1}(-1)^k{n-1\choose k}\int_0^1\frac{t^{2k}}{(1+t^2)^n}\mathrm dt$$ Then I used $t=\tan x$: $$J(n)=4\sum_{k=0}^{n-1}(-1)^k{n-1\choose k}\int_0^{\pi/4}\frac{\tan(x)^{2k}}{\sec(x)^{2n}}\sec(x)^2\mathrm dx$$ $$J(n)=4\sum_{k=0}^{n-1}(-1)^k{n-1\choose k}\int_0^{\pi/4}\sin(x)^{2k}(1-\sin(x)^2)^{n-k-1}\mathrm dx$$ Then I use the binomial formula again: $$J(n)=4\sum_{k=0}^{n-1}(-1)^k{n-1\choose k}\int_0^{\pi/4}\sin(x)^{2k}\sum_{r=0}^{n-k-1}(-1)^r {n-k-1\choose r}\sin(x)^{2r}\mathrm dx$$ $$J(n)=4\sum_{k=0}^{n-1}(-1)^k{n-1\choose k}\sum_{r=0}^{n-k-1}(-1)^r {n-k-1\choose r}\int_0^{\pi/4}\sin(x)^{2k+2r}\mathrm dx$$ Then I used $u=2x$: $$J(n)=2\sum_{k=0}^{n-1}(-1)^k{n-1\choose k}\sum_{r=0}^{n-k-1}(-1)^r {n-k-1\choose r}\int_0^{\pi/2}\left(\frac{1-\cos u}2\right)^{k+r}\mathrm du$$ Yup, you guessed it, I used the binomial formula next: $$J(n)=2\sum_{k=0}^{n-1}\sum_{r=0}^{n-k-1}\frac{(-1)^{k+r}}{2^{k+r}}{n-1\choose k}{n-k-1\choose r}\sum_{v=0}^{k+r}(-1)^v{k+r\choose v}\int_0^{\pi/2}\cos(x)^{v(k+r)}\mathrm dx$$ This final integral is easily calculated with the beta function, and we have $$J(n)=\sqrt{\pi}\sum_{k=0}^{n-1}\sum_{r=0}^{n-k-1}\sum_{v=0}^{k+r}\frac{(-1)^{k+r+v}}{2^{k+r}}{n-1\choose k}{n-k-1\choose r}{k+r\choose v}\frac{\Gamma\left(\frac{v(k+r)+1}2\right)}{\Gamma\left(\frac{v(k+r)}2+1\right)}$$ Is this correct? Is there any other (preferably quicker) way of computing this?

clathratus
  • 17,161
  • What about letting $t^2=y$ in: $J(n)=4\int_0^1\frac{(1-t^2)^{n-1}}{(1+t^2)^n}\mathrm dt$ Followed by a $\frac{1-y}{1+y}=x$? One might get something like:$$2\int_0^1 \frac{x^{n-1}}{\sqrt{1-x^2}} dx$$ Another $x^2=t$ and Beta function is ready, if I did my computation correctly. – Zacky Feb 06 '19 at 23:02
  • 1
    Also worth remembering that as a result of this integral we also have:

    $$ \int_{-\infty}^{\infty} \ln^{p}\left|\frac{1}{\cosh(x)} \right|:dx = \lim_{n \rightarrow 0^+} \frac{d^p}{dn^p}\left[J(n) \right] = \lim_{n \rightarrow 0^+} \frac{d^p}{dn^p}\left[\frac{\Gamma\left(\frac{n}{2} \right)\Gamma\left(\frac{1}{2} \right)}{\Gamma\left(\frac{n + 1}{2} \right)} \right]$$

    –  Feb 07 '19 at 07:15
  • 1
    @DavidG Very true :) – clathratus Feb 07 '19 at 16:08
  • My first attempt was:$$I=\int_{-\infty}^\infty\cosh(x)^{-n}dx=\int_{-\infty}^\infty\left(\frac{e^x+e^{-x}}{2}\right)^{-n}dx=\int_{-\infty}^\infty2^n\left(e^x+e^{-x}\right)^{-n}dx$$ $$\int_{-\infty}^\infty2^n\left[e^x\left(1+e^{-2x}\right)\right]^{-n}dx=\int_{-\infty}^\infty2^ne^{-nx}\left(1+e^{-2x}\right)^{-n}dx=\int_{-\infty}^\infty\sum_{i=0}^\infty\frac{(-1)^i(n+i)!e^{-2ix}}{n!}dx$$ $$I=\sum_{i=0}^\infty\frac{(-1)^i(n+i)!}{n!}\int_{-\infty}^\infty e^{-2ix}dx=\sum_{i=0}^\infty\frac{(-1)^i(n+i)!}{n!}\left[\frac{e^{-2ix}}{-2i}\right]_{-\infty}^\infty$$ But this is not convergent – Henry Lee Feb 07 '19 at 23:05
  • @HenryLee maybe $\int_{\Bbb R}e^{-nx}(1+e^{-2x})^{-n}dx$ is a beta integral... – clathratus Feb 07 '19 at 23:51
  • @clathratus Ah yes I forgot to bring back in the $e^{-nx}$ term after writing it as a summation, although this wont affect the convergence. Not sure if I can get it from this to Beta function, although the original integral can as others have showed – Henry Lee Feb 08 '19 at 01:21
  • 1
    @HenryLee Sure you can. $t=e^x$ gives $$I=2^n\int_0^\infty \frac{t^{n-1}dt}{(1+t^2)^n}$$ Then use $$B(a,b)=2\int_0^\infty \frac{x^{2b-1}dx}{(1+t^2)^{a+b}}$$ – clathratus Feb 08 '19 at 03:51

2 Answers2

9

For a quicker way, substitute $e^x = \tan(\theta/2)$ to obtain

$$ \int_{-\infty}^{\infty} \frac{\mathrm{d}x}{\cosh^n x} = \int_{0}^{\pi} \sin^{n-1}\theta \, \mathrm{d}\theta = \frac{\Gamma(\frac{n}{2})\Gamma(\frac{1}{2})}{\Gamma(\frac{n+1}{2})}. $$

The second step follows from the beta function identity, although a much more elementary solution is also available.


For your computation, you made a mistake when expanding the integral of cosine power. Specifically, the correct expansion would be

$$ \int_{0}^{\frac{\pi}{2}} \left( \frac{1 - \cos u}{2} \right)^{k+r} \, \mathrm{d}u = \frac{1}{2^{k+r}} \sum_{v=0}^{k+r} (-1)^v \binom{k+r}{v} \int_{0}^{\frac{\pi}{2}} \cos^v u \, \mathrm{d}u. $$

Compare this with your expansion

$$ \int_{0}^{\frac{\pi}{2}} \left( \frac{1 - \cos u}{2} \right)^{k+r} \, \mathrm{d}u \stackrel{?}= \frac{1}{2^{k+r}} \sum_{v=0}^{k+r} (-1)^v \binom{k+r}{v} \int_{0}^{\frac{\pi}{2}} \color{red}{\boxed{\cos^{v(k+r)} u}} \, \mathrm{d}u. $$

Sangchul Lee
  • 167,468
6

$$J(n)=2\int_0^\infty \frac{dx}{\cosh^n(x)}$$Using the sub: $u=\frac{1}{\cosh(x)}$, $dx=\frac{-du}{u\sqrt{1-u^2}}$, it is easy to convert the integral into the one @Zacky provided in the comments. $$J(n)=2\int_0^1 \frac{u^{n-1}}{\sqrt{1-u^2}}du$$ From there we can make another sub $u=\sqrt{x}$, $du=\frac{dx}{2\sqrt{x}}$. $$J(n)=\int_0^1\frac{x^{\frac{n}{2}-1}}{\sqrt{1-x}}dx$$ Using the Beta Function one can then easily deduce that $$J(n)=B\left(\frac{n}{2},\frac{1}{2}\right)=\frac{\Gamma(\frac{n}{2})\Gamma(\frac{1}{2})}{\Gamma(\frac{n+1}{2})}$$

Archisman Panigrahi
  • 2,156
  • 2
  • 19
  • 30
aleden
  • 4,007