Improper Trigonometric Integrals

Work in progress. This note is still being written and incomplete.

Integrals of a rational function multiplied by cos⁡(αx)\cos(\alpha x) or sin⁡(αx)\sin(\alpha x) use

eiαx=cos⁡(αx)+isin⁡(αx)e^{i\alpha x} = \cos(\alpha x) + i\sin(\alpha x)

and compare real and imaginary parts.

Existence

Let R(z)=P(z)Q(z)R(z) = \frac{P(z)}{Q(z)} where PP and QQ are polynomials with real coefficients of degrees mm and nn. Suppose

  • Q(x)≠0Q(x) \neq 0 for all x∈Rx \in \mathbb{R}
  • n≥m+1n \ge m + 1

Then for each α>0\alpha > 0, the Cauchy principal values

P.V.∫−∞∞R(x)cos⁡(αx) dxandP.V.∫−∞∞R(x)sin⁡(αx) dx\text{P.V.} \int_{-\infty}^{\infty} R(x)\cos(\alpha x)\,\text{d}x \quad \text{and} \quad \text{P.V.} \int_{-\infty}^{\infty} R(x)\sin(\alpha x)\,\text{d}x

exist.

Evaluation

Under the same conditions with α>0\alpha > 0, let

F(z)=R(z)eiαzF(z) = R(z) e^{i\alpha z}

If z1,z2,…,zkz_1, z_2, \ldots, z_k are the poles of FF in the upper half-plane, then

P.V.∫−∞∞R(x)eiαx dx=2πi∑j=1kRes(F,zj)\text{P.V.} \int_{-\infty}^{\infty} R(x) e^{i\alpha x}\,\text{d}x = 2\pi i \sum_{j=1}^{k} \text{Res}(F, z_j)

Consequently,

P.V.∫−∞∞R(x)cos⁡(αx) dx=−2π∑j=1kIm(Res(F,zj))\text{P.V.} \int_{-\infty}^{\infty} R(x)\cos(\alpha x)\,\text{d}x = -2\pi \sum_{j=1}^{k} \text{Im}\left(\text{Res}(F, z_j)\right) P.V.∫−∞∞R(x)sin⁡(αx) dx=2π∑j=1kRe(Res(F,zj))\text{P.V.} \int_{-\infty}^{\infty} R(x)\sin(\alpha x)\,\text{d}x = 2\pi \sum_{j=1}^{k} \text{Re}\left(\text{Res}(F, z_j)\right)

Examples:

  • P.V.∫−∞∞xsin⁡xx2+4 dx=πe2\text{P.V.} \int_{-\infty}^{\infty} \frac{x\sin x}{x^2+4}\,\text{d}x = \frac{\pi}{e^2}
  • P.V.∫−∞∞cos⁡xx4+4 dx=π(cos⁡1+sin⁡1)4e\text{P.V.} \int_{-\infty}^{\infty} \frac{\cos x}{x^4+4}\,\text{d}x = \frac{\pi(\cos 1 + \sin 1)}{4e}

Worked Examples

Cosine Integral

Evaluate P.V.∫−∞∞cos⁡xx2+1 dx\text{P.V.} \int_{-\infty}^{\infty} \frac{\cos x}{x^2+1}\,\text{d}x.

Here m=0m = 0, n=2≥m+1n = 2 \ge m + 1, α=1\alpha = 1, and F(z)=eizz2+1F(z) = \frac{e^{iz}}{z^2+1}. The only pole in the upper half-plane is z=iz = i.

Res(F,i)=ei⋅i2i=12ie\text{Res}(F, i) = \frac{e^{i \cdot i}}{2i} = \frac{1}{2ie}

Then Res(F,i)=−i2e\text{Res}(F, i) = -\frac{i}{2e}, so Im(Res(F,i))=−12e\text{Im}\left(\text{Res}(F, i)\right) = -\frac{1}{2e} and Re(Res(F,i))=0\text{Re}\left(\text{Res}(F, i)\right) = 0.

P.V.∫−∞∞cos⁡xx2+1 dx=−2π⋅(−12e)=πe\text{P.V.} \int_{-\infty}^{\infty} \frac{\cos x}{x^2+1}\,\text{d}x = -2\pi \cdot \left(-\frac{1}{2e}\right) = \frac{\pi}{e} P.V.∫−∞∞sin⁡xx2+1 dx=2π⋅0=0\text{P.V.} \int_{-\infty}^{\infty} \frac{\sin x}{x^2+1}\,\text{d}x = 2\pi \cdot 0 = 0

Sine Integral

Show that P.V.∫−∞∞xsin⁡xx2+4 dx=πe2\text{P.V.} \int_{-\infty}^{\infty} \frac{x \sin x}{x^2+4}\,\text{d}x = \frac{\pi}{e^2}.

Here m=1m = 1, n=2≥m+1n = 2 \ge m + 1, α=1\alpha = 1, and F(z)=zeizz2+4F(z) = \frac{z e^{iz}}{z^2+4}. The only pole in the upper half-plane is z=2iz = 2i.

Res(F,2i)=2i⋅e−24i=12e2\text{Res}(F, 2i) = \frac{2i \cdot e^{-2}}{4i} = \frac{1}{2e^2} P.V.∫−∞∞xsin⁡xx2+4 dx=2π Re(12e2)=πe2\text{P.V.} \int_{-\infty}^{\infty} \frac{x \sin x}{x^2+4}\,\text{d}x = 2\pi \,\text{Re}\left(\frac{1}{2e^2}\right) = \frac{\pi}{e^2}

Two Poles

Show that P.V.∫−∞∞cos⁡xx4+4 dx=π(cos⁡1+sin⁡1)4e\text{P.V.} \int_{-\infty}^{\infty} \frac{\cos x}{x^4+4}\,\text{d}x = \frac{\pi(\cos 1 + \sin 1)}{4e}.

Here F(z)=eizz4+4F(z) = \frac{e^{iz}}{z^4+4}. The roots of z4=−4z^4 = -4 in the upper half-plane are z=1+iz = 1 + i and z=−1+iz = -1 + i.

For a simple pole zkz_k, using zk4=−4z_k^4 = -4,

Res(F,zk)=eizk4zk3=−zkeizk16\text{Res}(F, z_k) = \frac{e^{iz_k}}{4z_k^3} = -\frac{z_k e^{iz_k}}{16}

For z=1+iz = 1 + i, eiz=e−1eie^{iz} = e^{-1} e^{i}.

Res(F,1+i)=−(1+i)ei16e\text{Res}(F, 1+i) = -\frac{(1+i)e^{i}}{16e}

For z=−1+iz = -1 + i, eiz=e−1e−ie^{iz} = e^{-1} e^{-i}.

Res(F,−1+i)=(1−i)e−i16e\text{Res}(F, -1+i) = \frac{(1-i)e^{-i}}{16e}

Expand the products.

(1+i)ei=(cos⁡1−sin⁡1)+i(cos⁡1+sin⁡1)(1+i)e^{i} = (\cos 1 - \sin 1) + i(\cos 1 + \sin 1) (1−i)e−i=(cos⁡1−sin⁡1)−i(cos⁡1+sin⁡1)(1-i)e^{-i} = (\cos 1 - \sin 1) - i(\cos 1 + \sin 1)

The sum of the residues is

−2i(cos⁡1+sin⁡1)16e=−i(cos⁡1+sin⁡1)8e\frac{-2i(\cos 1 + \sin 1)}{16e} = -\frac{i(\cos 1 + \sin 1)}{8e} P.V.∫−∞∞cos⁡xx4+4 dx=−2π(−cos⁡1+sin⁡18e)=π(cos⁡1+sin⁡1)4e\text{P.V.} \int_{-\infty}^{\infty} \frac{\cos x}{x^4+4}\,\text{d}x = -2\pi \left(-\frac{\cos 1 + \sin 1}{8e}\right) = \frac{\pi(\cos 1 + \sin 1)}{4e}
Written by October 6, 2026 1 min read
Was this helpful?