I recently came across a question in my graduate course where we have to calculate the characteristic function for the Logistic distribution. The Logistic distribution we are working with is given by the following PDF: $$ f(x) = \frac{e^{-x}}{(1 + e^{-x})^2}. $$
The way that I went about doing this is the following: $$E\left[ e^{itX} \right] = E[\cos(tX)] + iE[\sin(tX)]. $$ The $E[\sin(tX)] = 0$.
The real problem for me comes when calculating $E[\cos(tX)]$. I tried to express $\cos$ in its exponential representation, but I didn't get too far with that. Upon plugging this integral into WolframAlpha, it says that the hypergeometric function is used for it. Any thoughts on how I can analytically compute this? I'd be happy to use the hypergeometric function, but I don't quite see the connection between that and $\text{csch}(x)$, which is part of the result that WolframAlpha gives (and this result matches the characteristic function listed for the Logistic distribution).
Edit: I would like to be able to do this problem without a computer and solely pencil and paper. This is what I mean by an analytic solution.
This integral can be evaluated with elementary steps and knowledge of basic facts about Beta and Gamma functions (such as the most elementary portions of Whitaker & Watson, A Course of Modern Analysis (4th Ed.) Chapter 12).
In the following I emulate the approach taken to evaluate a related integral at https://math.stackexchange.com/a/2828293/1489 .
First, substitute $y = e^{-x}:$
$$\begin{aligned} E\left[e^{itX}\right] = \int_{-\infty}^\infty e^{itx}\,\frac{e^{-x}}{(1+e^{-x})^2}\,\mathrm{d}x = \int_0^\infty y^{-it}\,\frac{y}{(1+y)^2}\,\frac{\mathrm{d}y}{y} = \int_0^\infty \frac{y^{-it}}{(1+y)^2}\,\mathrm{d}y. \end{aligned}$$
This is a well-known expression for the Beta function. Simplify it using the basic relations $\Gamma(2)=1,$ $\Gamma(1+z)=z\Gamma(z),$ $\Gamma(z)\Gamma(1-z)=\pi\csc(\pi z),$ and $\csc(ix) = i\operatorname{csch(x)}:$
$$\begin{aligned} \int_0^\infty \frac{y^{-it}}{(1+y)^2}\,\mathrm{d}y &= B\left(-it+1, 1-it\right) & \\ & =\frac{\Gamma(1-it)\Gamma(1+it)}{\Gamma(2)} \\ &= \Gamma(1-it)\Gamma(1+it) \\ &= (-it)\Gamma(-it)\Gamma(1+it)\\ &= -it \pi \csc(\pi t i) \\ &= \pi t \operatorname{csch}(\pi t). \end{aligned}$$
This procedure readily generalizes to integral powers larger than $2$ in the denominator.