Solve $\int_{-\infty}^{\infty} \text{sech}^2(x-a)\text{sech}^2(x+a)\ \mathrm{d}x$

integrationtrigonometric-integrals

I am wondering if anyone knows a trick on how to solve this integral $$f(a)=\int_{-\infty}^{\infty} \text{sech}^2(x-a)\text{sech}^2(x+a)dx.$$ The answer should be a function of $a$.

Basically I am trying to reproduce some results from a paper. I've tried Matlab/Wolfram/Mathematica to no avail.

Best Answer

Use the exponential definition, $\operatorname{sech}(x)=\frac{2}{e^{x}+e^{-x}}$, to rearrange the integrand.

$$\begin{aligned}\operatorname{sech}^2(x-a)\operatorname{sech}^2(x+a)&=\left(\frac{2}{e^{x-a}+e^{-(x-a)}}\right)^2\left(\frac{2}{e^{x+a}+e^{-(x+a)}}\right)^2 \\ &=\frac{16}{\left(e^{2x}+e^{-2x}+c\right)^2} \end{aligned}$$

where $c=e^{2a}+e^{-2a}=\frac{2}{\operatorname{sech}(2a)}$. The integrand is an even function, so $f(a)=32\int_{0}^{+\infty}\frac{1}{\left(e^{2x}+e^{-2x}+c\right)^2}\ \mathrm{d}x$. Substitute $t=e^{2x}$, $\mathrm{d}x=\frac1{2t}\mathrm{d}t$.

$$\begin{aligned}f(a)&=32\int_1^{+\infty}\frac{1}{(t+1/t+c)^2}\cdot\frac{1}{2t}\ \mathrm{d}t \\ &=16\int_1^{+\infty}\frac{t}{(t^2+ct+1)^2}\ \mathrm{d}t \end{aligned}$$

It then suffices to use the standard integrals of $\frac{x}{(Ax^2+Bx+C)^n}$ and $\frac{1}{Ax^2+Bx+C}$. To avoid confusion (since unfortunately we've chosen the same letters), I'll only refer to the constants from the integral table in capitals.

$$\begin{aligned}f(a)&=16\left[-\frac{ct+2}{(4-c^2)(t^2+ct+1)}-\frac{c}{4-c^2}\int\frac{1}{(t^2+ct+1)}\ \mathrm{d}t\right]_1^{+\infty} \\ &=16\left[-\frac{ct+2}{(4-c^2)(t^2+ct+1)}-\frac{c}{4-c^2}\left(\frac{1}{\sqrt{c^2-4}}\ln\left|\frac{2t+c-\sqrt{c^2-4}}{2t+c+\sqrt{c^2-4}}\right|\right)\right]_1^{+\infty} \end{aligned} $$

Note that $4-c^2<0$ except when $a=0$. Hence, we used the integral in the table for the case $4AC-B^2<0$.

As $t\to+\infty$, the $t^2$ in the denominator of the first term dominates, so the term tends to $0$. Likewise, the argument of the logarithm tends to $1$, so the second term tends to $0$. Hence, we just substitute $t=1$ and remember to take the negative sign since it's the integral's lower bound.

$$ \begin{aligned} f(a)&=-16\left[-\frac{c+2}{(4-c^2)(1+c+1)}-\frac{c}{4-c^2}\left(\frac{1}{\sqrt{c^2-4}}\ln\left|\frac{2+c-\sqrt{c^2-4}}{2+c+\sqrt{c^2-4}}\right|\right)\right] \\ &= \frac{16}{(4-c^2)}\left(1+\frac{c}{\sqrt{c^2-4}}\ln\left(\frac{c-\sqrt{c^2-4}}{2}\right)\right) \\ \end{aligned}$$

Note that $c>0$, which allowed us to simplify the absolute value in the logarithm.

Now, to find $f(a)$ in terms of $a$, we substitute back $c=e^{2a}+e^{-2a}$ and find

$$ \begin{aligned} f(a)&=\frac{16}{-(e^{4a}-2+e^{-4a})}\left(1+\frac{e^{2a}+e^{-2a}}{\sqrt{(e^{4a}-2+e^{-4a})}}\ln\left(\frac{e^{2a}+e^{-2a}-\sqrt{(e^{4a}-2+e^{-4a})}}{2}\right)\right) \\ &=\frac{-16}{(e^{2a}-e^{-2a})^2}\left(1+\frac{e^{2a}+e^{-2a}}{e^{2a}-e^{-2a}}\ln\left(\frac{e^{2a}+e^{-2a}-e^{2a}+e^{-2a}}{2}\right)\right) \\ &=\frac{16}{(e^{2a}-e^{-2a})^2}\left(2a\frac{e^{2a}+e^{-2a}}{e^{2a}-e^{-2a}}-1\right) \\ &=4\left(2a\frac{e^{2a}+e^{-2a}}{e^{2a}-e^{-2a}}-1\right)\left(\frac{2}{e^{2a}-e^{-2a}}\right)^2 \\ &=4\left(2a\coth(2a)-1\right)\operatorname{csch}^2(2a) \end{aligned}$$

Where, in the second line, we have used $(e^{4a}-2+e^{-4a})=(e^{2a}-e^{-2a})^2$. Hence, the solution to the integral agrees with the one given by Wolfram Alpha.