My original question is to calculate the indefinite integral
$$I(x) = \int \operatorname{sech}(x) \cos(x) \,\Bbb dx.$$
However, I have been unable to find a closed form expression with elementary functions. To get an idea of how the integral might behave, I asked Wolfram Alpha to calculate the direct integral from $-\infty$ to $\infty$. W.A. happily gave me:
$$\int_{-\infty}^{\infty} \operatorname{sech}(x) \cos(x) \,\Bbb dx = \pi \operatorname{sech}\frac{\pi}{2}.$$
I don’t know how to calculate this direct integral either. W.A. does not tell me how it calculated this either. I would love to know how W.A. did that calculation and if there is any way I can harness it to calculate a cleaner indefinite integral.
This came up in the soliton perturbation theory for the driven damped Nonlinear Schrodinger Equation.
– Paddy Nov 27 '23 at 19:06