TITLE: The integral : $\frac{1}{2}\int_0^\infty x^n \operatorname{sech}(x)\mathrm dx$
QUESTION [11 upvotes]: How can I evaluate
$$\frac{1}{2}\int_0^\infty x^n \operatorname{sech}(x)\mathrm dx?$$
I was trying integration by parts but it seemed like it is getting more complicated.
$$\int_0^\infty x^n \operatorname{sech}(x)\mathrm dx=\left.2x^n\arctan\left(\tanh(x/2)\right)\right|_0^\infty-2n\int_0^\infty x^{n-1}\arctan(\tanh(x/2))\mathrm dx$$
Herein, it seems like we have to apply integration by parts $n$ times but it is not practically possible.

This question is a more general problem of the integral $\int_0^\infty \frac{x}{e^x+e^{-x}}\mathrm dx$, which I was first solving.
Let me know if there's any other method for evaluating this integral. It will be highly appreciated.

I have posted my solution employing a method using Geometric series to which this Wikipedia article helped me in finding the solution.
Please see my answer below.

REPLY [4 votes]: Alternatively
\begin{align}
\frac{1}{2}\int_0^\infty \frac{x^n}{\cosh x}dx \overset{t=e^{-x}}=&\int_0^1 \frac{(-1)^n\ln^n t}{1+t^2}dt\\
=& \>\text{Im}\int_0^1 \frac{(-1)^n i \ln^n t}{1-i t}dt=n!\>\text{Im}\>\text{Li}_{n+1}(i)
\end{align}