General solution to $\int_0^\infty\left[1-\tanh{\left(\frac{z+p}{\delta}\right)^{2n}}\right]\text{d} z$

calculusreal-analysis

I've already tried to use the Feynman integration technique and some other differentiation under the integral sign methods but cannot seem to crack this problem. Any push in the right direction would be appreciated. Reciting, we're interested in:
$$\int_0^\infty\left[1-\tanh{\left(\frac{z+p}{\delta}\right)^{2n}}\right]\text{d} z$$

with $p\geq 0$, $\delta>0$ and $n \in \mathbb N$.

Best Answer

Without bounds, your integral can be expressed in terms of the incomplete beta function $\operatorname{B}_z(a, b)$, where $$ \int\left[1-\tanh^{2n}{\left(\frac{z+p}{\delta}\right)}\right]\text{d}z = z - \frac{\delta}{2}\operatorname{B}_{\tanh^2\left(\frac{z+p}{\delta}\right)}\left(n+\frac{1}{2}, 0\right) + C, $$ but this is quite unhandable for your given bounds. Following this source (integral 2.424.3), check that $$ \int \tanh^{2n}z \mathrm{d}z = z-\sum_{k=1}^n\frac{\tanh^{2n-2k+1}z}{2n-2k+1}. $$

You can derive this result taking into account that $$ \tanh^{2n}z = (1-\operatorname{sech}^2z)^n = \sum_{k=0}^n\binom{n}{k}(-1)^k\operatorname{sech}^{2k}z. $$

Going back to your integral, let $u:= (z+p)/\delta$, so $$ \begin{aligned} \int^\infty_0\left[1-\tanh^{2n}{\left(\frac{z+p}{\delta}\right)}\right]\text{d}z &= \int^\infty_0\mathrm{d}z - \delta\int^\infty_{p/\delta}\tanh^{2n}u\mathrm{d}u \\ &= \delta\sum_{k=1}^{n}\frac{1-\tanh^{2n-2k+1}\left(p/\delta\right)}{2n-2k+1}. \end{aligned} $$