Evaluate an integral or Fourier coefficients Consider an integral
$$
\int_0^\pi \frac{\cos(kx)}{\cosh(ax)}\ dx
$$
there $k\in 
\mathbb{Z}, a\in \mathbb{R}.$
Of course that is Fourier coefficient for the function $f(x)=\frac{1}{\cosh(ax)}.$
Question 1. Is it possible to evaluate this integral via some known special functions or named numbers?
Question 2. Is it possible to evaluate the sign of this integral depending on $k$? 
 A: For $a \neq 0$, the integral is
\begin{equation}
I = \frac{1}{2 a} \int^{\pi a}_{-\pi a} \! dy \, \frac{e^{(1 + i k/a) y}}{1 + e^{2 y}} .
\end{equation}
Let $s = e^{2 y}$ to obtain
$$
I = \frac{1}{2 a} \int^{e^{2 \pi a}}_{e^{-2 \pi a}} \! ds \, \frac{s^{-1/2 + i k/2 a}}{1 + s} .
$$
Then let $t = s/(s + 1)$ to obtain
$$
I = \frac{1}{2 a} \int^{(1 + e^{-2\pi a})^{-1}}_{(1 + e^{2\pi a})^{-1}} \! dt \, t^{-1/2 + i k/2 a} (1 - t)^{-1/2 - i k/2 a} .
$$
Therefore the result is expressed in terms of incomplete Beta functions as
$$
I = \frac{1}{2 a} [B_{(1 + e^{-2\pi a})^{-1}} (1/2 + i k / 2 a, 1/2 - i k/2 a) - B_{(1 + e^{2 \pi a})^{-1}} (1/2 + i k / 2 a, 1/2 - i k/2 a)] ,
$$
where
$$
B_x(a, b) = \int_0^x \! dt \, t^{a - 1} (1 - t)^{b - 1} .
$$
The original integral with the upper limit $\pi$ replaced by $\infty$ is a fairly well-known Fourier transform, and can be found in Gradshteyn and Ryzhik, for example.  Instead of incomplete Beta functions, there is the usual Beta function (the second and third forms of the integrals above would correspond to standard formulae for the Beta function as integrals on $[0, \infty]$ and $[0, 1]$).  Then there is a simplification using the Euler reflection formula, leading to the result stated by Lucian.
A: Answer to question 1:
$$\int_0^\pi \frac{\cos(kx)}{\cosh(ax)}\ dx=-\frac{\pi  }{2 a\text{cosh}\left(\frac{\pi  k}{2 a}\right)}$$
$${}+{\rm Re}\,\left[\frac{2e^{\pi  (a+i k)}}{a+i k} \, _2F_1\left(1,\frac{a+i k}{2 a};\frac{i k}{2 a}+\frac{3}{2};-e^{2 a \pi }\right)\right]$$
