$\int_0^\infty \frac{\cos(tx)}{(x^2 - 2x + 2)}\,\mathrm{d}x$ for $t$ real

Solution 1:

The integral is even in $t$, so I will assume $t\ge0$. $$ \begin{align} &\int_0^\infty\frac{\cos(tx)}{x^2-2x+2}\,\mathrm{d}x\\ &=\int_{-1}^\infty\frac{\cos(tx+t)}{x^2+1}\,\mathrm{d}x\\ &=\frac1{2i}\int_{-1}^\infty\left(\frac1{x-i}-\frac1{x+i}\right)\cos(tx+t)\,\mathrm{d}x\\ &=\frac1{2i}\int_{-1-i}^\infty\frac{\cos(tx+t+it)}{x}\,\mathrm{d}x\\ &-\frac1{2i}\int_{-1+i}^\infty\frac{\cos(tx+t-it)}{x}\,\mathrm{d}x\\ &=\frac1{2i}\cos(t+it)\int_{-1-i}^\infty\frac{\cos(tx)}{x}\,\mathrm{d}x -\frac1{2i}\sin(t+it)\int_{-1-i}^\infty\frac{\sin(tx)}{x}\,\mathrm{d}x\\ &-\frac1{2i}\cos(t-it)\int_{-1+i}^\infty\frac{\cos(tx)}{x}\,\mathrm{d}x +\frac1{2i}\sin(t-it)\int_{-1+i}^\infty\frac{\sin(tx)}{x}\,\mathrm{d}x\\ &=-\frac1{2i}\cos(t+it)\mathrm{Ci}(-t-it) -\frac1{2i}\sin(t+it)\left(\frac\pi2-\mathrm{Si}(-t-it)\right)\\ &\hphantom{=}+\frac1{2i}\cos(t-it)\mathrm{Ci}(-t+it) +\frac1{2i}\sin(t-it)\left(\frac\pi2-\mathrm{Si}(-t+it)\right) \end{align} $$ This matches what Mathematica computes.

If the integral was over the entire real line, the answer would avoid $\mathrm{Ci}$ and $\mathrm{Si}$. In fact, using contour integration, we get $$ \begin{align} \int_{-\infty}^\infty\frac{\cos(tx)}{x^2-2x+2}\,\mathrm{d}x &=\int_{-\infty}^\infty\frac{\cos(tx+t)}{x^2+1}\,\mathrm{d}x\\ &=\cos(t)\int_{-\infty}^\infty\frac{\cos(tx)}{x^2+1}\,\mathrm{d}x \color{#C00000}{-\sin(t)\int_{-\infty}^\infty\frac{\sin(tx)}{x^2+1}\,\mathrm{d}x}\\ &=\cos(t)\,\mathrm{Re}\left(\int_{-\infty}^\infty\frac{e^{itx}}{x^2+1}\,\mathrm{d}x\right)\color{#C00000}{-0}\\ &=\cos(t)\,\mathrm{Re}\left(\frac1{2i}\int_\gamma\left(\frac1{x-i}-\frac1{x+i}\right)e^{itx}\,\mathrm{d}x\right)\\ &=\cos(t)\,\mathrm{Re}\left(\frac1{2i}\int_\gamma\frac{e^{itx}}{x-i}\,\mathrm{d}x-\frac1{2i}\int_\gamma\frac{e^{itx}}{x+i}\,\mathrm{d}x\right)\\ &=\cos(t)\,\mathrm{Re}\left(\frac1{2i}2\pi i e^{-t}-0\right)\\[6pt] &=\pi\cos(t)\,e^{-t} \end{align} $$ Where $\gamma$ is the contour along the real axis and circling back counter-clockwise around the upper half-plane.

This may have been the intended question.

Solution 2:

Note that $$\int_0^\infty \frac{\cos(tx)}{x^2 - 2x + 2}\,\mathrm{d}x$$

can be written as $$\int_0^\infty {\frac{{\cos tx}}{{{{\left( {x - 1} \right)}^2} + 1}}} {\mkern 1mu} {\text{d}}x$$ so $x-1=u$ gives $$\int_{ - 1}^\infty {\frac{{\cos \left( {u + 1} \right)t}}{{{u^2} + 1}}} {\mkern 1mu} {\text{d}}u = \int_{ - 1}^\infty {\frac{{\cos tu\cos t - \sin tu\sin t}}{{{u^2} + 1}}} {\mkern 1mu} {\text{d}}u$$ which means we need to know what $$\int_{ - 1}^\infty {\frac{{\cos tu}}{{{u^2} + 1}}} {\mkern 1mu} {\text{d}}u$$ and $$\int_{ - 1}^\infty {\frac{{\sin tu}}{{{u^2} + 1}}} {\mkern 1mu} {\text{d}}u$$ are.

Note that $$\int_{ 0}^\infty {\frac{{\cos tu}}{{{u^2} + 1}}} {\mkern 1mu} {\text{d}}u$$ is not hard, similarily for the other, so we are worried about the remaining part in $[-1,0]$ mostly. By $u\mapsto -u$ we are looing at$$\eqalign{ & \phi \left( t \right) = \int_0^1 {\frac{{\cos tu}}{{{u^2} + 1}}} {\mkern 1mu} {\text{d}}u \cr & \eta \left( t \right) = \int_0^1 {\frac{{\sin tu}}{{{u^2} + 1}}} {\mkern 1mu} {\text{d}}u \cr} $$

In red you can see $\eta$; in grey $\phi$. Note that $$\eqalign{ & \phi - \phi '' = \int_0^1 {\cos tu} {\mkern 1mu} {\text{d}}u =\frac{\sin t}t \cr & \eta - \eta '' = \int_0^1 {\sin tu} {\mkern 1mu} {\text{d}}u=\frac{1-\cos t}t \cr} $$

enter image description here

ADD Recall that $$\int_0^\infty {\frac{{\cos tx}}{{{x^2} + 1}}} {\mkern 1mu} {\text{d}}x = \frac{\pi }{2}{e^{ - \left| x \right|}}$$

I'm trying to remember what the other integral (with $\sin$) evaluates to.