5

How can I evaluate $$f(k) = \int_{0}^{\infty} \frac{\sin^k(x)}{1+x^k} \mathrm dx$$

Namely, $f(1)$ and (if possible) larger values of $f(k), k \neq 2$. I have already evaluated the integral for the case of $k=2$, as shown below. Mathematica gives $f(1) = \text{Ci}(1) \sin (1)-\text{Si}(1) \cos (1)+\frac{1}{2} \pi \cos (1) \approx 0.62145$ and a monstrous form for $f(3) \approx 0.347753 $. $f(4) \approx 0.256821 $


Using the identity $\sin^2(x) = \frac{1}{2}(1 - \cos(2x))$, we can break the integral into two parts. $$f(2) = \int_{0}^{\infty} \frac{\sin^2(x)}{1+x^2} \mathrm dx = \frac{1}{2}\int_{0}^{\infty} \frac{1}{1+x^2} \mathrm dx - \frac{1}{2}\int_{0}^{\infty} \frac{\cos(2x)}{1+x^2} \mathrm dx$$

The integral on the left (call it $I_1$) is a well known result, evaluating to $\frac{\pi}{2}$. Concerning the integral on the right (call it $I_2$), we can use contour integration. Define the function $g(z) = {e^{2iz}}{(1+z^2)}^{-1}$, which has a simple pole at $z = i$. The residue at $z=i$ of $g$ can be easily calculated to be $\frac{e^{-2}}{2i}$. Consider a closed semicircular arc contour in the upper half-plane called $C$. This contour contains twice our right integral from $-R$ to $R$ ($2I_2$), and a line integral of the circular arc ($\Gamma$).

$$\oint\limits_{C}f(z)\,\mathrm{d}z = 2\pi i (\frac{e^{-2}}{2i}) = \pi e^{-2} = 2I_2 + \Gamma$$

In the limit, as $R \rightarrow \infty$, the integral over $\Gamma \rightarrow 0$. This immediately gives $\frac{\pi e^{-2}}{2} = I_2$

Returning to $f(2)$, we have $f(2) = \frac{1}{2}I_1 - \frac{1}{2}I_2 = \frac{1}{2}(I_1 - I_2) = \frac{1}{2}(\frac{\pi}{2} - \frac{\pi e^{-2}}{2}) = \frac{\pi}{4}(1-e^{-2})$. We can write this in a cleaner form using $\sinh$, giving

$$\boxed{f(2) = \frac{\pi \sinh(1)}{2e}}$$


I was only inspired to derive $f(2)$ after calculating it with Mathematica. It was suprising to have such a nice form for this integral, while other computations for $f(k)$ were monstrous. How can I evaluate $f(1)$ (may help generalize to larger $k$)? Are there any other nice forms for larger $k$?

Thanks.

  • 1
    Closed form definitely exists for $k$ even, again, just use residue theorem, but the closed form is too complicated to prove any usefulness. For $k$ odd, we have to use special function like trigonometric integrals, incomplete gamma functions, or Fox-H functions. Some references: (1), (2) – Quý Nhân Jan 05 '25 at 02:17

2 Answers2

4

First, transform $\sin^nx$ into the form $\sin^nx=\sum_{k=0}^n(a_k\sin kx+b_k\cos kx)$. We only need to calculate $I_{k,m}:=\int_0^\infty\frac{\sin kx}{1+x^m}\mathrm dx$ and $J_{k,m}:=\int_0^\infty\frac{\cos kx}{1+x^m}\mathrm dx$.

First we need to know a formula for the Mellin transform of the $\mathrm{Fox}$-$H$ function: $$ \int_{0}^{\infty}t^{\eta-1}H_{p,q}^{m,n}\left[\left.\begin{array}{c}(a_{i},\alpha_{i})_{1,p}\\[1mm](b_{j},\beta_{j})_{1,q}\end{array}\right| zt^{\sigma}\right]H_{P,Q}^{M,N}\left[\left.\begin{array}{c}(c_{i},\gamma_{i})_{1,P}\\[1mm](d_{j},\delta_{j})_{1,Q}\end{array}\right|wt\right]\mathrm dt=w^{-\eta}H_{p+Q,q+P}^{m+N,n+M}\left[\left.\begin{array}{c}(a_i,\alpha_i)_{1,n},(1-d_j-\eta\delta_j,\sigma\delta_j)_{1,Q},(a_i,\alpha_i)_{n+1,p}\\[1mm](b_j,\beta_j)_{1,m},(1-c_i-\eta\gamma_i,\sigma\gamma_i)_{1,P},(b_j,\beta_j)_{m+1,q}\end{array}\right| zw^{-\sigma}\right] $$ The conditions are complex, and will hold by default. This formula only requires the convolution theorem for the Mellin transform, and the Mellin transform of the Fox-H function itself.

Next it's time to move on to the two definite integrals above. First calculate $I_{k,m}$.

It is not difficult to derive the corresponding $\rm Fox$-$H$ functions by means of the hypergeometric functional forms of $\sin kx$ and $\frac{1}{1+x^m}$: $$ \sin kx=\sqrt{\pi}\,H_{0,2}^{1,0}\left[\left.\begin{array}{c} -\\[1mm](\frac12,1),(0,1) \end{array}\right|\frac{k^2x^2}{4}\right],\quad\frac{1}{1+x^m}=H_{1,1}^{1,1}\left[\left.\begin{array}{c} (1,1)\\[1mm](0,1) \end{array}\right|x^m\right] $$ Then substituting this we can see that \begin{aligned} \int_0^\infty\frac{\sin kx}{1+x^m}\mathrm dx&=\sqrt{\pi}\int_0^\infty H_{0,2}^{1,0}\left[\left.\begin{array}{c} -\\[1mm](\frac12,1),(0,1) \end{array}\right|\frac{k^2x^2}{4}\right]H_{1,1}^{1,1}\left[\left.\begin{array}{c} (1,1)\\[1mm](0,1) \end{array}\right|x^m\right]\mathrm{d}x\\[3mm] &=({x^2\mapsto x})\frac{\sqrt{\pi}}{2}\int_0^\infty x^{1/2-1}H_{1,1}^{1,1}\left[\left.\begin{array}{c} (1,1)\\[1mm](0,1) \end{array}\right|x^{m/2}\right]H_{0,2}^{1,0}\left[\left.\begin{array}{c} -\\[1mm](\frac12,1),(0,1) \end{array}\right|\frac{k^2x}{4}\right]\mathrm{d}x\\[3mm] &=\frac{\sqrt\pi}{2}\frac{2}{k}H_{3,1}^{1,2}\left[\left.\begin{array}{c}(1,1),(0,\frac{m}{2}),(\frac12,\frac{m}{2})\\[1mm](0,1)\end{array}\right|\frac{2^m}{k^m}\right] \end{aligned} Of course, we can also use the definition of the Fox-H function to transform it into a Meijer-G function, but that doesn't really make much sense.

Similarly, we can pass the $\mathrm Fox$-$H$ functional form of $\cos x$ that $$ \cos kx=\sqrt{\pi}\,H_{0,2}^{1,0}\left[\left.\begin{array}{c} -\\[1mm](0,1),(\frac12,1) \end{array}\right|\frac{k^2x^2}{4}\right] $$ Then \begin{aligned} \int_0^\infty\frac{\cos kx}{1+x^m}\mathrm dx&=\sqrt{\pi}\int_0^\infty H_{0,2}^{1,0}\left[\left.\begin{array}{c} -\\[1mm](0,1),(\frac12,1) \end{array}\right|\frac{k^2x^2}{4}\right]H_{1,1}^{1,1}\left[\left.\begin{array}{c} (1,1)\\[1mm](0,1) \end{array}\right|x^m\right]\mathrm{d}x\\[3mm] &=({x^2\mapsto x})\frac{\sqrt{\pi}}{2}\int_0^\infty x^{1/2-1}H_{1,1}^{1,1}\left[\left.\begin{array}{c} (1,1)\\[1mm](0,1) \end{array}\right|x^{m/2}\right]H_{0,2}^{1,0}\left[\left.\begin{array}{c} -\\[1mm](0,1),(\frac12,1) \end{array}\right|\frac{k^2x}{4}\right]\mathrm{d}x\\[3mm] &=\frac{\sqrt\pi}{2}\frac{2}{k}H_{3,1}^{1,2}\left[\left.\begin{array}{c}(1,1),(\frac12,\frac{m}{2}),(0,\frac{m}{2})\\[1mm](0,1)\end{array}\right|\frac{2^m}{k^m}\right] \end{aligned} So going back to the original question, why does $I_k$ have a prettier form at $k=2$? It's simply because in the end we only need to compute $J_{0,2}$ and $J_{2,2}$. While $J_{0,2}$ is a no-brainer, the $\rm Fox$-$H$ function in $J_{2,2}$ can be written directly as the $\rm Meijer$-$G$ function, i.e. $$J_{2,2}=\frac{\sqrt{\pi}}{2}G_{3,1}^{1,2}\left[\left.\begin{array}{c}0,\frac12,0\\[1mm]0\end{array}\right|1\right]$$ We have the formula for $\rm Meijer$-$G$: $$G_{3,1}^{1,2}\left[\left.\begin{array}{c}a,a+\frac12,c\\[1mm]a\end{array}\right|z\right]=\pi z^{\frac{1}{4}(2a+2c-3)}\csc((c-a)\pi)\left(I_{a-c+\frac{1}{2}}\left(\frac{2}{\sqrt{z}}\right)-L_{c-a-\frac{1}{2}}\left(\frac{2}{\sqrt{z}}\right)\right)$$ So we can work out that $J_{2,2}=\frac{\sqrt\pi}{e^2}$. But if $k$ odd or $k>2$, $I_k$'s results will all be tedious.

spacedog
  • 443
  • If you want to learn about $\rm Fox$-$H$ functions you can read this book: H-Transforms Theory and Applications (Anatoly A. Kilbas etc.). – spacedog Jan 05 '25 at 03:44
  • 2
    I checked with Mathematica : $$\begin{aligned} \int_0^\infty\frac{\cos kx}{1+x^m}\mathrm dx&\neq\frac{\sqrt\pi}{2}\frac{2}{k}H_{3,1}^{1,2}\left[\left.\begin{array}{c}(1,1),(\frac12,\frac{m}{2}),(0,\frac{m}{2})\1mm\end{array}\right|\frac{2^m}{k^m}\right] \end{aligned}$$ is NOT true. The same with Sin Integral ?Before going public, it is better to check the correctness yours answer. – Mariusz Iwaniuk Jan 05 '25 at 13:57
  • 2
    @MariuszIwaniuk Maybe learn a bit of polite speech and consideration before going public yourself? Also, pretty ironic that your last answer itself seems to have a mistake in it. – Hunter Jan 05 '25 at 17:47
  • @MariuszIwaniuk I am very sorry for the error in my answer, this is because the parameter of the Fox-H function doesn't seem to satisfy the condition here. In fact I calculated the integral after k=2,m=2 and found it to be correct and then didn't check the other values, which was really careless! – spacedog Jan 05 '25 at 18:30
  • @Hunter , my last expr in my answer is correct check yourself – Mariusz Iwaniuk Jan 05 '25 at 19:00
  • Thanks for the detailed answer! How can your answer be corrected? – Maxime Jaccon Jan 19 '25 at 21:43
1

For $k=1$ $$I=\int \frac{\sin (x)}{x+1} \,dx=\int \frac{\sin (t-1)}{t}\,dt=\cos(1)\int \frac{\sin (t)}{t}\,dt-\sin(1)\int \frac{\cos (t)}{t}\,dt$$ $$I=\cos (1)\, \text{Si}(t)-\sin (1)\,\text{Ci}(t)$$

Back to $x$ $$I=\int \frac{\sin (x)}{x+1} \,dx=\cos (1)\, \text{Si}(x+1)-\sin (1)\, \text{Ci}(x+1)$$ $$J=\int_0^\infty \frac{\sin (x)}{x+1} \,dx= \sin (1)\,\text{Ci}(1)-\cos(1)\,\text{Si}(1) +\frac{\pi }{2} \cos (1)$$

For $k=3$

Write $$\sin^3(x)=\frac 34 \sin(x)-\frac14 \sin(3x)$$ and $$\frac 1{x^3+1}=\frac 1{(x-r_1)(x-r_2)(x-r_3)}=\sum_{i=1}^3 \frac {A_i}{x-r_i}$$ So, we face six integrals looking like $$\int \frac{\sin(nx)}{x-b}\,dx=\sin(bn)\,\text{Ci}(n (x-b))+\cos(bn)\,\text{Si}(n (x-b))$$