# The Integral Corner

This section is dedicated to the pleasure of calculating integrals. Have a look at some integrals I find most interesting.

#### Arctangent’s in the Spotlight

1. $\displaystyle \int_1^{\infty} \frac{\pi-2\arctan{x}}{x}\text{dx}=2G$ where $G$ is Catalan’s constant.
2. $\displaystyle \int_0^{\infty}\frac{\arctan(\arctan(\ln{x}))}{(\ln^{2}{x}+1)(x^2+1)}dx=0=\int_0^{\infty}\frac{x^2\text{tanh}(\sin(\arctan(\ln^{3}{x})))}{(x^4-x^2+1)(\ln^{6}{x}+\ln^{4}{x}+\ln^{2}{x}+1)(x^2+x+1)}dx$
3. For any $q>1$ and $m>0$, $\displaystyle \int_{-m}^{m}\frac{\text{sech}(x\ln{q})}{2\arctan(q^{x})\arctan(q^{-x})+\pi+2}dx=\frac{4}{(\pi+4)\ln{q}}\ln\left(\frac{\arctan(q^{m})+1}{\arctan(q^{-m})+1}\right).$
4. For any $n \in \mathbb{N}$, $\displaystyle \int_0^{1} \int_0^{x_{n-1}} \cdots \int_0^{x_2} \int_0^{x_1} \frac{\arctan{x_0}}{x_0 x_1 x_2 \cdots x_{n-2} x_{n-1}}dx_0 dx_1 dx_2 \cdots dx_{n-2} dx_{n-1} =\sum_{r=1}^{\infty} \frac{(-1)^{r-1}}{(2r-1)^{n+1}}.$
5. For any $a,b \in \mathbb{R}$ for which $a/b>0$, $\displaystyle \int_0^{\infty}\frac{1}{x}\left(\arctan{\frac{1}{ax}}-\arctan{\frac{1}{bx}}\right)dx=\frac{\pi}{2}\ln{\frac{b}{a}}.$
6. For any $a,b\in\mathbb{R}$ with $a/b>0$, $\displaystyle \int_0^{\infty}\frac{1}{x} \left(\arctan \left(\frac{\sin(ax)}{ax}\right)-\arctan\left(\frac{\sin(bx)}{bx}\right)\right)dx=\frac{\pi}{4}\ln\frac{b}{a}.$
7. For any $b,q,p$ for which $b>0$ and $\text{sgn}(p)=\text{sgn}(q)\neq 0$, $\displaystyle \int_0^{\infty} \frac{\arctan\left(\frac{px^b}{q}\right)\arctan\left(\frac{q}{px^b}\right)}{q^2x^{1-b}+p^2x^{b+1}}dx=\frac{\pi^3}{48pbq}.$
8. For any $a,b \in \mathbb{R}$ for which $a/b>0$ and $n \in \mathbb{N}$, $\displaystyle \int_0^{\infty}\frac{1}{x}\left(\arctan^n(ax)-\arctan^n(bx)\right)dx=\left(\frac{\pi}{2}\right)^n\ln{\frac{a}{b}}.$
9. For any $n,m\in\mathbb{N}$ with $n\geq m\geq 2$, $\displaystyle \int_0^{\infty}\frac{\arctan(x^n)}{x^m}dx=\frac{\pi}{2(m-1)\cos\left(\frac{m-1}{2n}\pi\right)}.$
10. For any $a\in\mathbb{R}\backslash{0}$, $\displaystyle \int_0^{\infty}\frac{\arctan{(x)}(1+x^2)}{(x^2+a^2)(x^2+a^{-2})}dx=\frac{a\pi^2}{4(a^2+1)}=\int_0^{\infty}\frac{\arctan{(1/x)}(1+x^2)}{(x^2+a^2)(x^2+a^{-2})}dx.$

#### For the love of Euler’s Constant

1. $\displaystyle \int_{e^{4/\pi}}^{\infty}\frac{\log{x}}{x^2+e^{8/\pi}}dx=\frac{G+1}{e^{4/\pi}}$
2. $\displaystyle \int_0^{\infty}\frac{dx}{x^3(e^{\pi/x}+1)}=\frac{1}{12}$
3. $\displaystyle \int_1^2 \left(2\lfloor x\rfloor +\frac{1}{\lfloor x \rfloor +\frac{1}{2\lfloor x\rfloor +\frac{2}{3\lfloor x\rfloor+\frac{3}{4\lfloor x \rfloor +\frac{4}{5\lfloor x\rfloor+\cdots} }}}}\right)dx=e$
4. $\displaystyle \int_0^{\infty} \{x\}e^{-\lfloor x\rfloor}dx =\frac{e}{2(e-1)}$
5. Suppose $T$ is an $n \times n$ complex matrix whose real part is positive definite. If $\langle \cdot, \cdot \rangle$ denotes the standard complex inner product then $\displaystyle \int_{-\infty}^{\infty} \exp\left(-\langle y, Ty \rangle \right) dy=\frac{\pi^{n/2}}{(\det{T})^{1/2}}$ where the principal value of the square root is taken. (See A Brief Introduction to Theta Functions by Richard E. Bellman)
6. For any $b>0>a$, $\displaystyle \int_{-\infty}^{\infty} \frac{dx}{e^{ax}+e^{bx}}=\frac{\pi}{(b-a)\sin\left(\frac{b\pi}{b-a}\right)}.$
7. For any $a,b>0$, $\displaystyle \int_0^{\infty}e^{-bx^a}dx=\frac{1}{ab^{1/a}}\Gamma\left(\frac{1}{a}\right).$
8. For any $a,b>0$, $\displaystyle \int_{\mathbb{R}^2}e^{-b(x^2+y^2)}\cosh(ax)\cos(ay)dxdy=\frac{\pi}{b}$
9. For any $\alpha,\beta,\gamma,\delta>0$, $\displaystyle \int_0^{\infty}x^{\alpha}\delta^{-\beta x^{\gamma}}dx=\frac{1}{\gamma}\left(\beta\log{\delta}\right)^{-\frac{\alpha+1}{\gamma}}\Gamma\left(\frac{\alpha+1}{\gamma}\right)$
10. For any $a,b,\delta>0$ and $n,m\in\mathbb{N}$, $\displaystyle \int_0^{\infty}\frac{\delta^{-ax^n}-\delta^{-bx^n}}{x^m}dx=\frac{1}{m-1}\Gamma\left(\frac{n-m+1}{n}\right)\left(b^{\frac{m-1}{n}}-a^{\frac{m-1}{n}}\right)(\log{\delta})^{\frac{m-1}{n}}$

#### Logs. Everywhere.

1. $\displaystyle \int_0^{\pi}\log\left(\frac{1-\cos{x}}{x^2}\right)dx=-\pi\left(\log\left(2\pi^2\right)-2\right)$
2. $\displaystyle \int_0^{\pi/4}\log\left(1-\tan^2{x}\right)\mathrm{d}x=\frac{\pi}{4}\log{2}-G$
3. $\displaystyle \int_0^{\pi /4} \log(\cot{x}-\tan{x})dx=\frac{\pi}{4}\log{2}$
4. $\displaystyle \int_0^1 \frac{\log{x}}{x^2+1}dx=-G$
5. $\displaystyle \int_0^1 \log(x)\log(1-x)dx=2-\frac{\pi^2}{6}$
6. $\displaystyle \int_0^{\infty} \log\left(1+\frac{2}{x^2}+\frac{1}{4x^4}\right)\log\left(\frac{2x^2+2-\sqrt{3}}{2x^2+2+\sqrt{3}}\right)dx=\frac{4\pi}{\sqrt{2}}\left(\sqrt{2-\sqrt{3}}-\sqrt{2+\sqrt{3}}\right)\log{2}$
7. $\displaystyle \int_0^{\pi/4}\log\left(\frac{\sqrt{1+\sec(2x)}}{\sin^3{x}+\sin^2{x}\cos{x}+\sin{x}\cos^2{x}+\cos^3{x}}\right)dx=\frac{\pi}{8}\log{2}$
8. $\displaystyle \int_0^{1}\left\lfloor \ln\left(\frac{1}{x}\right) \right\rfloor dx=\frac{1}{e-1}$
9. For any $a>0$, $\displaystyle \int_0^{\pi/2} \ln(a\tan(x))\ln(a\sin(2x))dx=\frac{\pi}{2}\ln(a)\ln\left(\frac{a}{2}\right)$
10. For $a>0$, $\displaystyle \int_0^a \left\lfloor\ln\left(\frac{a}{x}\right)\right\rfloor\left(\left(\log\left(\frac{a}{x}\right)\right)^{-1}+\left(\log\left(\frac{a}{x}\right)\right)^{-2}\right) dx= a\log\left(\frac{e}{e-1}\right)$

1. Let $f$ be a real-valued differentiable function on $\mathbb{R}$ that is non-negative and monotonically increasing. Then $\displaystyle \int\frac{f'(x)^{\frac{2}{3}}}{1+f(x)^{5/3}}\sqrt{f(x)\sqrt{f'(x)\sqrt{f(x)\sqrt{f'(x)\sqrt{\cdots}}}}}\text{ }\mathrm{d}x=\frac{3}{5}\log\left(1+f(x)^{\frac{5}{3}}\right)+C$
2. Let $I\subset\mathbb{R}$ be open. Suppose $f:I\to (0,1)$ is a continuously differentiable function that is monotone increasing and onto. Then $\displaystyle \int_I\arctan(f(x))\sqrt{f(x)f'(x)\sqrt{\frac{f'(x)}{f(x)^2}\sqrt{\frac{f'(x)}{f(x)^3}\sqrt{\frac{f'(x)}{f(x)^4}\sqrt{\frac{f'(x)}{f(x)^5}\sqrt{\cdots}}}}}} \mathrm{d}x=G$ where $G$ denotes Catalan’s constant
3. Let $a,b,c,d>0$ with $ab>1$. Then, $\displaystyle \int_{c}^{d}\frac{(e^{4x}+3)e^{3x}b^{\frac{e^{3x}-1}{e^{4x}-1}}}{(e^{4x}-1)^2}\sqrt[e^{x}]{a\sqrt[e^{3x}]{b\sqrt[e^x]{a\sqrt[e^{3x}]{b\sqrt[e^{x}]{\cdots}}}}}\text{ }\mathrm{d}x=\frac{(ab)^{\frac{e^{c}}{e^{2c}-e^{-2c}}}-(ab)^{\frac{e^{d}}{e^{2d}-e^{-2d}}}}{\log(ab)}.$
4. Consider the following functions for $x>1$ : $\displaystyle \phi(x)=\sinh\frac{1}{x},$ $\displaystyle \psi(x)=\cosh\frac{1}{x}-1,$ and $\displaystyle \Lambda(x)=\phi(x)^2+\psi(x)^2.$ If $Q$ denotes the unique solution to the equation $\Lambda(x)=1$ over $(1,\infty)$, then $\displaystyle \int_Q^{\infty}\log\left(\Lambda(x)\right)\log\sqrt[\frac{x}{2}]{e^{-\frac{1+\psi(x)}{x^2}}\sqrt[2x]{e^{\frac{-\phi(x)}{x^2}}\sqrt[3x]{e^{-\frac{1+\psi(x)}{x^2}}\sqrt[4x]{e^{-\frac{\phi(x)}{x^2}}\sqrt[5x]{\cdots}}}}}\mathrm{d}x=1$
5. Let $P$ and $Q$ real satisfy $0< P\leq Q$. Consider the function $\displaystyle a(x):=1+e\gamma(x+1,1)$ for $x\geq 0$ where $\gamma(u,v)$ is the incomplete gamma function with integral representation $\displaystyle \gamma(u,v)=\int_0^{v}t^{u-1}e^{-t}\mathrm{d}t.$ Then, $\displaystyle \int_P^Q\Lambda(x)\log\sqrt[x+1]{a(x)^{x+2}\sqrt[x+2]{a(x)\sqrt[x+3]{a(x)\sqrt[x+4]{a(x)\sqrt[x+5]{\cdots}}}}}\text{ }\mathrm{d}x=\frac{1}{4e}\log\left(H(P,Q)\right)$ with $\displaystyle \Lambda(x):=\int_0^{1}t^{x}e^{-t}\log(t)\text{ }\mathrm{d}t$ and $\displaystyle H(P,Q):=\frac{a(Q)^{2a(Q)^2}}{a(P)^{2a(P)^2}}\exp(a(P)^2-a(Q)^2).$

#### Jus’ be Cos…

1. $\displaystyle \int_0^{2\pi}\cos(\cos{x})dx=2\pi\sum_{n=0}^{\infty}\frac{(-1)^n}{4^n(n!)^2}=2\pi J_0(1)$
2. $\displaystyle \int_0^{1}\cos(x-x^2)dx=\sum_{n=0}^{\infty}\frac{(-1)^n}{(4n+1)(4n)(4n-1)\cdots (2n+2)(2n+1)}$
3. $\displaystyle \int_0^{\infty}\frac{(1-\cos(2x))\cos(\sin{x})}{x^2}dx=\pi\sum_{n=0}^{\infty}\frac{(-1)^n}{(n!)^2}=\pi J_0(2)$
4. For any $n \in \mathbb{N}$, $\displaystyle \int_0^{\pi} \int_0^{\pi} \int_0^{\pi} \frac{(\cos(nx)-\cos(nz))(\cos(ny)-\cos(nz))}{(\cos{x}-\cos{z})(\cos{y}-\cos{z})}dxdydz=\pi^3 n$
5. For any $a>0$, $\displaystyle \int_0^{\infty}\left(1-\cos\left(\frac{1}{a+x^2}\right)\right)dx=\frac{2\pi}{\sqrt{a}} \sum_{k=1}^{\infty}\frac{(-1)^{k-1}}{(2k)!}\binom{4k-2}{2k-1}\left(\frac{1}{16a^2}\right)^k$
6. For any $a>0$ and $0, $\displaystyle \int_{0}^{\pi} \frac{\cos(ax)}{b^2+1-2b\cos{x}}dx=\frac{1}{1-b^2}\left(\pi b^a-\sin(a\pi)L(a,b)\right)$ where $\displaystyle L(a,b)=\sum_{k=0}^{\infty} \sum_{m=0}^k \binom{k}{m} \frac{(-1)^m(1-b)^{k-m}}{m+a+1}-\sum_{k=0}^{\infty} \frac{(-1)^kb^{k+1}}{k+a+1}.$
7. For any $a,b,s \in \mathbb{R}$ for which $a/b>0$, $\displaystyle \int_0^{\infty}\frac{1}{x}\left(\cos(ax+s)-\cos(bx+s)\right)dx=\cos(s)\ln{\frac{b}{a}}$
8. For any $b,p>0$ with $p \notin \mathbb{Z}$ and $c \in \mathbb{R}$, $\displaystyle \int_0^{\infty} \frac{\cos(bx+c)}{x^p}dx=\frac{b^{p-1}\pi}{\Gamma(p)\sin(p\pi)}\sin\left(\frac{p\pi}{2}-c\right)$
9. Let $\{d_i\}$ be a real sequence consisting of $n$, nonzero, distinct terms. Let $s \in \mathbb{R}$ and $a>0$ be given. Then $\displaystyle \int_{-\infty}^{\infty}\frac{\cos(ax+s)}{\prod_{i=1}^{n} (x^2+d_i^2)}dx=\pi a^{-2}\cos(s)\sum_{k=1}^{n}\frac{c_k e^{-ad_k}}{d_k}$ where $\displaystyle c_k=\prod_{i=1 , i \neq k}^{n}\frac{1}{d_i^2-d_k^2}$
10. For any $a,b,c,d \in \mathbb{R}$ with $|a|>|b|+|c|>0$, $\displaystyle \int_0^{2\pi} \frac{\cos(d\cos{x})\cosh(d\sin{x})}{a+b\cos{x}+c\sin{x}}dx=\frac{2\pi}{\sqrt{a^2-b^2-c^2}}\cosh(c\psi)\cos(b\psi)$ where $\displaystyle \psi=\frac{d\left(a-\sqrt{a^2-b^2-c^2}\right)}{c^2+b^2}.$

#### Spot the $\pi$

1. $\displaystyle \int_{-\infty}^{\infty} \frac{\sin{x}}{xe^x\cosh{x}}dx=\pi$
2. $\displaystyle \int_0^{\infty} \log\left(1+\frac{2}{x^2}+\frac{1}{4x^4}\right)\log\left(\frac{2x^2+2-\sqrt{3}}{2x^2+2+\sqrt{3}}\right)dx=\frac{4\pi}{\sqrt{2}}\left(\sqrt{2-\sqrt{3}}-\sqrt{2+\sqrt{3}}\right)\log{2}$
3. $\displaystyle \int_{0}^1 \frac{\log\left(1+x^{\pi^2/12}\right)}{x}dx=1$
4. $\displaystyle \sum_{k=0}^{\infty}\left((-1)^{k}\int_{1/e^{1/\sqrt{3}}}^{e^{1/\sqrt{3}}}\frac{3\ln^{2k}{x}}{\pi x}dx\right)=1$
5. $\displaystyle \int_{-\infty}^{\infty} \left(\frac{\cosh{x^2}-\sinh{x^2}}{\cosh{x^2}+\sinh{x^2}}\right)^{\pi/2} dx=1$
6. $\displaystyle \frac{\partial}{\partial y}\biggr\rvert_{y=1}\left(\int_0^{\infty}\frac{\cosh{ x}\arctan(y\sinh{x})}{\pi^2(1+y^2\sinh^2{x})}dx\right)=-\frac{1}{4}$
7. $\displaystyle \int_1^{\infty}\frac{\log\left(\log(x)\right)^{\pi^{-1}}}{x\left(\log^2{x}+1\right)\left(\log^2{x}+2\right)^2}dx=-\frac{1}{16\sqrt{2}}\log\left(\frac{32}{e^2}\right)$
8. For any $a>0$, $\displaystyle \int_a^{\infty} \frac{\ln{x}}{x^2+a^2}dx=\frac{1}{a}\ln\left(a^{\pi/4}e^G\right)$
9. For any $a>0$, $\displaystyle \int_0^{\infty} e^{-ax^2}\ln{x} dx=-\sqrt{\frac{\pi}{a}}\left(\frac{\ln{a}}{4}+\frac{\gamma+2\ln{2}}{4}\right)$
10. Let $n \in \mathbb{N}$ and define $f:\mathbb{R} \to \mathbb{R}$ by $f(u)=\sum_{m=0}^{n} u^m$. If $a,b \in \mathbb{R}$ satisfy $a/b >0$, then $\displaystyle \int_0^{\infty}\frac{1}{x}\left(\arcsin\left(\frac{f(\sin(ax))}{f(ax)}\right)-\arcsin\left(\frac{f(\sin(bx))}{f(bx)}\right)\right)dx=\frac{\pi}{2}\ln{\frac{b}{a}}$

#### Some Building Blocks

1. For any $a>0$ and natural $k\geq 1$,$\displaystyle \int_0^{\infty}\frac{\log{x}}{(a+x^2)^k}dx=\pi (2\sqrt{a})^{1-2k}\left( \binom{2k-2}{k-1}\log(\sqrt{a})-\sum_{j=1}^{k-1}\binom{2k-2-j}{k-1}\frac{2^j}{j}\right)$
2. For any $k,n \in \mathbb{Z}_{\geq 0}$ and $0, $\displaystyle \int_0^{\pi} \frac{\cos^{2k+1}(nx)}{1+r^2-2r\cos{x}}dx=\frac{2^{-2k}\pi r^{n(2k+1)}}{1-r^2}\sum_{m=0}^{k} \begin{pmatrix} 2k+1 \\ m \end{pmatrix} r^{-2nm}$
3. For any $k,n \in \mathbb{Z}_{\geq 0}$ and $0, $\displaystyle \int_0^{\pi} \frac{\cos^{2k}(nx)}{1+r^2-2r\cos{x}}dx=\frac{2^{-2k}\pi}{1-r^2}\left(2\sum_{m=0}^{k-1} \begin{pmatrix} 2k \\ m \end{pmatrix} r^{-2n(m-k)}+\begin{pmatrix}2k \\ k \end{pmatrix}\right)$
4. For any $a>0,b\geq 1$ and $n\in\mathbb{Z}_{\geq 0}$, $\displaystyle \int_0^1\log(x+b)\log^n(ax)\mathrm{d}x=\sum_{k=0}^n\frac{n!(-1)^k\log^{n-k}(a)}{(n-k)!}\left(\log(b)-(1+b)\text{Li}_1\left(-\frac{1}{b}\right)-(k+1)-b\sum_{r=2}^{k+1}\text{Li}_{r}\left(-\frac{1}{b}\right)\right)$
5. For any $a>0,b\geq 1$ and $n\in\mathbb{Z}_{\geq 0}$, $\displaystyle \int_0^1\log\left(\frac{b+x}{b-x}\right)\log^n(ax)\mathrm{d}x=\sum_{k=0}^n\frac{n!(-1)^k\log^{n-k}(a)}{(n-k)!}\left(\log\left(\frac{b+1}{b-1}\right)-b\sum_{r=1}^{k+1}2^{1-r}\text{Li}_r\left(\frac{1}{b^2}\right)\right)$
6. For any $a,b,c\in\mathbb{R}$ such that $a>-1$, $b>0$ and $c>\frac{a+1}{2}$, $\displaystyle \int_{0}^{\infty}x^a\left(1-\cos\left(\frac{1}{x^c+b}\right)\right)\mathrm{d}x=\frac{2k^{\frac{a+1}{c}}}{c}\Gamma\left(\frac{a+1}{c}\right)\sum_{j=1}^{\infty}\frac{(-1)^{j-1}j\Gamma\left(2j-\frac{a+1}{c}\right)}{{(2j)!}^2k^{2j}}$
7. For any $n,m\in \mathbb{N}$ with $m\geq 2$ $\displaystyle \int_0^{1/2}\frac{1}{(1-x)^{2m}}\ln^n\left(\frac{x}{1-x}\right)\mathrm{d}x=(-1)^nn!\sum_{r=0}^{2(m-1)} \begin{pmatrix} 2(m-1) \\ r \end{pmatrix} \frac{1}{(r+1)^{n+1}}$
8. For any $a>0$ and $n \in \mathbb{N}$, $\displaystyle \int_0^{\infty}x^{-n-1}\ln\left(1+\exp\left(-\frac{a}{x}\right)\right)\mathrm{d}x=a^{-n}(n-1)!(1-2^{-n})\zeta(n+1)$
9. For any $n\in\mathbb{N}$ such that $n\geq 2$, $\displaystyle \int_0^1x^{n-1}\left\{\frac{1}{x}\right\}\mathrm{d}x=\frac{1}{n-1}-\frac{1}{n}\zeta(n)$ where $\{w\}$ denotes the fractional part of $w\in\mathbb{R}$.
10. Let $a,b$ satisfy $-\infty and $n\in \mathbb{N}$. Define a finite set of polynomials $\displaystyle \left\{P_{i}(x)=\sum_{m=0}^{k_i} e_{m}^{(i)}x^m:x, e_m^{(i)}\in \mathbb{R}; k_i \in \mathbb{Z}_{\geq 0};i=0,1,\cdots,n\right\}.$ Suppose we have a finite set of real-valued continuous functions on $\mathbb{R}$, $\displaystyle \left\{f_i(x):i=0,1,\cdots,n\right\}$ and let, for any $s_i\in\mathbb{Z}_{\geq 0}$, $\displaystyle I(a,b,s_0,s_1,\cdots,s_n)=\int_a^b\prod_{i=0}^{n}(f_i(x))^{s_i}\mathrm{d}x.$ Then,

$\displaystyle \int_a^b \prod_{i=0}^n (P_{i}\circ f_i)(x)\mathrm{d}x=\sum_{w_n=0}^{k_n}\cdots\sum_{w_0=0}^{k_0}\left(\prod_{j=0}^{n}e_{w_j}^{(j)}\right)I(a,b,w_0,\cdots,w_n).$

#### Who Said Infinity Can’t Be Fun?

1. For any constants $b_1,b_2,\cdots,b_n>0$, $a_1,a_2,\cdots,a_n\in\mathbb{R}$ and function $g:\mathbb{R}\to\mathbb{R}$ for which $g\in L_{loc}^{1}(\mathbb{R})$, $xg\in L^1(\mathbb{R})$ and $g(x)=-g(-x)$ for almost every $x\in \mathbb{R}$, there holds $\displaystyle \int_{-\infty}^{\infty}\log\left(\prod_{k=1}^n(1+b_k^x)^{a_k}\right)g(x)\mathrm{d}x=\log\left(\prod_{k=1}^nb_k^{a_k}\right)\int_0^{\infty}xg(x)\mathrm{d}x$
2. Let $\{d_i\}$ be a real sequence consisting of $n$, nonzero, distinct terms. Let functions $f,g:\mathbb{R} \to \mathbb{R}$ satisfy, for each $k=1,\cdots,n$, $\displaystyle \int_0^{\infty}\frac{f(x)}{x^2+d_k^2}dx=g(d_k).$ Then $\displaystyle \int_{0}^{\infty}\frac{f(x)}{\prod_{i=1}^{n} (x^2+d_i^2)}dx=\sum_{k=1}^{n}c_kg(d_k)$ where $\displaystyle c_k=\prod_{i=1 , i \neq k}^{n}\frac{1}{d_i^2-d_k^2}$ for $k=1,\cdots,n$.
3. Let $s,b,k,q \in \mathbb{R}$ with $b>0$ and $k/q>0$. Then, $\displaystyle \int_0^{\infty}\int_{-\infty}^{\infty}\frac{\cos((q+k)mu+s)\sin((q-k)mu)}{m\exp({bu^2})}dudm=\frac{\sin(s)}{2}\sqrt{\frac{\pi}{b}}\ln\frac{k}{q}$
4. For any $b,p,n>0$, with $p \notin \mathbb{Z}$ and $h \in \mathbb{R}$ $\displaystyle \int_0^{\infty} \frac{\sin(bx^{n+1}+h)}{x^{n(p-1)+p}}dx=\frac{b^{p-1}\pi}{(n+1)\Gamma(p)\sin(p\pi)}\cos\left(\frac{p\pi}{2}-h\right)$
5. For any $a,b>0$ and natural $k$ such that $b-a=1$ and $k\geq 2$, $\displaystyle \int_1^{\infty}\frac{\log\left(\log{x}\right)}{x\left(\log^2{x}+a\right)\left(\log^2{x}+b\right)^k}dx=\frac{\pi}{2}\log\left(\frac{{\sqrt{a}}^{\left(\sqrt{a}\right)^{-1}}}{{\sqrt{b}}^{\left(\sqrt{b}\right)^{-1}}}\right)+\pi\sum_{r=2}^{k} (2\sqrt{b})^{1-2r}\left(\sum_{j=1}^{r-1}\binom{2r-2-j}{r-1}\frac{2^j}{j}-\binom{2r-2}{r-1}\log\sqrt{b}\right)$
6. For any $p,q,k$ for which $p,q \geq -\frac{1}{2}$ and $1, $\displaystyle \int_0^{\infty} \frac{\cos[(p+q+1)x]\sin[(p-q)x]}{x^k}dx=\frac{\pi\left[(2p+1)^{k-1}-(2q+1)^{k-1}\right]}{4(k-1)\Gamma (k-1)\cos{\frac{(k-1)\pi}{2}}}$
7. For any $m,s\in \mathbb{R}$, $\displaystyle \int_{-\infty}^{\infty}\log\left(1+e^{-x^2}\right)\cos(mx+s)\mathrm{d}x=\sqrt{\pi}\cos(s)\sum_{k=1}^{\infty}\frac{(-1)^{k-1}}{k\sqrt{k}}e^{-\frac{m^2}{4k}}$
8. For any $a \in \mathbb{R}\backslash\{0\}$ and $n \in \mathbb{N}$, $\displaystyle \int_0^{\infty} \frac{x^{4n-2}}{(x^{2n}+a^{2n})^2}dx=\frac{\pi (2n-1)}{4n^2 |a| \sin\frac{\pi}{2n}}$
9. For any $a>0$, $\displaystyle \int_a^{\infty}\frac{\log(x^2+a^2)}{x^2+a^2}\mathrm{d}x=\frac{1}{a}\log\left((2a)^{\pi/2}e^{G}\right)$
10. Let $J_0$ denote the zeroth order Bessel function of the firtst kind. Then, for any $t\in\mathbb{R}$, $\displaystyle \int_0^{\infty}\left(1-J_0\left(e^{-x^2}\right)\right)x\sin(tx)dx=\frac{t\sqrt{\pi}}{4}\sum_{k=1}^{\infty}\frac{(-1)^{k-1}(2k)^{-3/2}}{(k!2^k)^2}\exp\left(-\frac{t^2}{8k}\right)$

#### Complex Analysis to the Rescue!

1. For $|a|>|b|+|c|>0$ where $a,b,c \in \mathbb{R}$, and $n \in \mathbb{Z}_{\geq 0}$ $\displaystyle \int_0^{2\pi}\frac{\cos(nx)}{a+b\cos(x)+c\sin(x)}dx=2\pi \lambda (a,b,c,n) \cos(n\phi)$ and $\displaystyle \int_0^{2\pi}\frac{\sin(nx)}{a+b\cos(x)+c\sin(x)}dx=2\pi \lambda (a,b,c,n) \sin(n\phi)$ where $\displaystyle \lambda (a,b,c,n)=\frac{(\text{sgn}(a))^n\left(-|a|+\sqrt{a^2-b^2-c^2}\right)^n}{\sqrt{(a^2-b^2-c^2)(b^2+c^2)^n}}$ and $\displaystyle \phi=\text{arg}(b+ic)\in[-\pi,\pi).$
2. For any $a,b,c,d,e,f\in\mathbb{R}$ and $m,n\in\mathbb{Z}_{\geq 0}$ such that $c>|a|+|b|>0$ and $m\geq 1$, $\displaystyle \int_{0}^{2\pi}\frac{d\cos(nx)+e\sin(nx)+f}{a\cos(mx)+b\sin(mx)+c}\mathrm{d}x=\frac{2\pi }{m\sqrt{c^2-a^2-b^2}}\sum_{k=0}^{m-1}\left(f+\sqrt{d^2+e^2}R\cos\left(\beta-n\alpha_k\right)\right)$ where $R=\left(\frac{c-\sqrt{c^2-a^2-b^2}}{\sqrt{a^2+b^2}}\right)^{\frac{n}{m}},\text{ } \beta=\text{arg}(d+ie)\in(-\pi,\pi],$ and, for $k\in\{0,\cdots,m-1\}$, we define $\alpha_k=\frac{\theta+(2k+1)\pi}{m} \text{ with } \theta=\text{arg}(a+bi) \in (-\pi,\pi].$
3. Given $|a|>|b|+|c|>0$ where $a,b,c\in\mathbb{R}$ and $m\in\mathbb{Z}_{\geq 0}$, for all $z\in\mathbb{R}$ there holds $\displaystyle \int_0^{2\pi}\int_0^{2\pi}\frac{(\cos(mx)-\cos(my))(\cos(my)-\cos(mz))}{(a+b\cos(x)+c\sin(x))(a+b\cos(y)+c\sin(y))}\mathrm{d}x\mathrm{d}y=\frac{2\pi^2}{a^2-b^2-c^2}\left(\frac{(b^2+c^2)^m-\left(|a|+\sqrt{a^2-b^2-c^2}\right)^{2m}}{\left(|a|+\sqrt{a^2-b^2-c^2}\right)^{2m}}\right)$ Consequently, there holds for all $n\in\mathbb{N}$ and $x_{2n+1}\in\mathbb{R}$ $\displaystyle \int_0^{2\pi}\int_0^{2\pi}\cdots\int_0^{2\pi}\prod_{j=1}^{2n}\frac{\cos(mx_{j})-\cos(mx_{j+1})}{a+b\cos(x_{j})+c\sin(x_{j})}\mathrm{d}x_1\cdots\mathrm{d}x_{2n-1}\mathrm{d}x_{2n}= \frac{2^n\pi^{2n}}{(a^2-b^2-c^2)^n}\left(\frac{(b^2+c^2)^m-\left(|a|+\sqrt{a^2-b^2-c^2}\right)^{2m}}{\left(|a|+\sqrt{a^2-b^2-c^2}\right)^{2m}}\right)^n.$
4. Given $|a|>|b|+|c|>0$ where $a,b,c\in\mathbb{R}$ and $m,n\in\mathbb{Z}_{\geq 0}$, for all $x_{2n+2}\in\mathbb{R}$ there holds $\displaystyle \int_0^{2\pi}\int_0^{2\pi}\cdots\int_0^{2\pi}\prod_{j=1}^{2n+1}\frac{\cos(mx_{j})-\cos(mx_{j+1})}{a+b\cos(x_{j})+c\sin(x_{j})}\mathrm{d}x_1\cdots\mathrm{d}x_{2n}\mathrm{d}x_{2n+1}= \Gamma(a,b,c,n,m)\left(\lambda(a,b,c,m)\cos(m\phi)-\lambda(a,b,c,0)\cos\left(mx_{2n+2}\right)\right)$ where $\displaystyle \Gamma(a,b,c,n,m):=\frac{2^{n+1}\pi^{2n+1}}{(a^2-b^2-c^2)^n}\left(\frac{(b^2+c^2)^m-\left(|a|+\sqrt{a^2-b^2-c^2}\right)^{2m}}{\left(|a|+\sqrt{a^2-b^2-c^2}\right)^{2m}}\right)^n,$ $\displaystyle \lambda (a,b,c,w):=\frac{\text{sgn}(a)\left(-|a|+\sqrt{a^2-b^2-c^2}\right)^w}{\sqrt{(a^2-b^2-c^2)(b^2+c^2)^w}},$ and $\phi:=\text{arg}(b+ic)\in[-\pi,\pi).$
5. For any $b>0$ and $n,m \in \mathbb{Z}_{\geq 0}$ with $n \geq m+2$, $\displaystyle \int_0^{\infty}\frac{x^m}{x^n+b}dx=\frac{\pi b^{\frac{m+1-n}{n}}}{n\sin\frac{(m+1)\pi}{n}}.$
6. For any $a,b\in\mathbb{R}$, $\displaystyle \int_{-\pi}^{\pi}e^{be^{a\cos{x}}\cos(a\sin{x})}\cos(be^{a\cos{x}}\sin(a\sin{x})-x)\mathrm{d}x=2\pi abe^b$
7. For any $a>0$ and $m\in\mathbb{N}$ with $m\geq 2$, $\displaystyle \int_0^{\infty} \frac{\log{x}}{a+x^m}dx=\frac{\pi \csc\left(\frac{\pi}{m}\right)}{a^{\frac{m-1}{m}}m^2}\left(\log{a}-\pi \cot\left(\frac{\pi}{m}\right)\right)$