0

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.

Rócherz
  • 3,976
Paddy
  • 457
  • For what purpose are you interested in this integral? – Ninad Munshi Nov 27 '23 at 01:40
  • 2
    Integral of $\cos(x)/\operatorname{cosh}(x)$ over $\Bbb R$ here. – Rócherz Nov 27 '23 at 09:06
  • @NinadMunshi, this particular problem was for something I wanted to do for myself. The actual problem that I want to solve is this: https://math.stackexchange.com/questions/4813731/closed-form-expression-for-an-integral-with-a-cosine-function

    This came up in the soliton perturbation theory for the driven damped Nonlinear Schrodinger Equation.

    – Paddy Nov 27 '23 at 19:06
  • You can also see here for more evaluations of the definite integral. – Robert Lee Nov 28 '23 at 08:29

1 Answers1

2

$$I(x) = \int\cos (x)\, \text{sech}(x) \,dx=\int \frac{e^{(1-i) x}+e^{(1+i) x}}{e^{2 x}+1}\,dx$$

Use $$\int \frac{e^{a x}}{e^{b x}+1}\, dx=\frac{e^{a x} }{a}\,\, \, _2F_1\left(1,\frac{a}{b};\frac{a+b}{b};-e^{b x}\right)$$ where appears the Gaussian hpergeometric function.

As a result

$$\color{blue}{I(x)=\frac{1+i}{2} \,e^x }$$ $$\color{blue}{\left(e^{-i x} \, _2F_1\left(\frac{1-i}{2},1;\frac{3-i}{2};- e^{2 x}\right)-i e^{i x} \, _2F_1\left(\frac{1+i}{2},1;\frac{3+i}{2};- e^{2 x}\right)\right)}$$