Generalization of the result of $\int_0^{\infty} \frac{e^{-x^2} \sin \left(x^2\right)}{x^2} d x$.

When I came across the integral $$\int_0^{\infty} \frac{e^{-x^2} \sin \left(x^2\right)}{x^2} d x,$$ I didn’t know how to deal with it. After struggling, I thought of Feynman’s trick and Euler formula and tried by letting $$I(a)=\int_0^{\infty} \frac{e^{-x^2} \sin \left(a x^2\right)}{x^2} d x$$ with $$I(0)=0.$$ Differentiating $$I(a)$$ w.r.t. $$a$$ yields $$I^{\prime}(a)=\int_0^{\infty} e^{-x^2} \cos \left(a x^2\right) d x$$ Inevitably, I used the Euler formula $$e^{i x}=\cos x+i \sin x$$ to group the functions in terms of exponential function. \begin{aligned} I^{\prime}(a) & =\int_0^{\infty} e^{-x^2} \cos \left(a x^2\right) d x \\ & =\operatorname{Re} \int_0^{\infty} e^{-x^2} e^{i a x^2} d x \\ & =\operatorname{Re} \int_0^{\infty} e^{-(1-i a) x^2} d x \end{aligned} which is a Gaussian integral: $$\int_{-\infty}^{\infty} e^{-a(x+b)^2} d x=\sqrt{\frac{\pi}{a}}$$ for any $$Re(a)>0$$. \begin{aligned} I’(a) &=\operatorname{Re}\left(\frac{\sqrt{\pi}}{2 \sqrt{1-i a}}\right)\\ I(a)&=\frac{\sqrt{\pi}}{2} \operatorname{Re}\left[\frac{(1-i a)^{\frac{1}{2}}}{-\frac{1}{2} i}\right]\\ \therefore \int_0^{\infty} \frac{e^{-x^2} \sin \left(x^2\right)}{x^2} d x&= \sqrt{\pi}\operatorname{Re}\left[i \sqrt{\sqrt{2} e^{-\frac{\pi i}{4}}}\right]\\& = \sqrt{\sqrt{2} \pi} \operatorname{Re}\left[i\left(\cos \frac{\pi}{8}-i \sin \frac{\pi}{8}\right)\right]\\&= \sqrt{\sqrt{2} \pi} \sin \frac{\pi}{8} \end{aligned} As a bonus, $$\int_0^{\infty} \frac{e^{-x^2} \sin \left(x^2\right)}{x^2} d x = \sqrt{\sqrt{2} \pi} \cos \frac{\pi}{8}$$

My Question :Can we generalise the method to the integral$$I_n=\int_0^{\infty} \frac{e^{-x^n} \sin \left(x^n\right)}{x^n} d x?$$

Fortunately, the answer is positive and decent as: $$\int_0^{\infty} \frac{e^{-x^n} \sin \left(x^n\right)}{x^n} d x= \frac{2^{\frac{n-1}{2 n}}}{n-1} \Gamma\left(\frac{1}{n}\right) \sin \left(\frac{\pi(n-1)}{4 n}\right)$$ where $$n$$ is any real number greater than $$1$$.

Proof: Replacing the number 2 in the original integral by $$n$$ gives $$I_n^{\prime}(a)=\operatorname{Re} \int_0^{\infty} e^{-(1-i a) x^n} d x$$ Letting $$(1-i a) x^n \mapsto x$$ transforms the derivative into

\begin{aligned} I_n ^{\prime}(a) & =\operatorname{Re}\left[\frac{1}{n(1-i a)^{\frac{1}{n}}} \int_0^{\infty} x^{\frac{1}{n}-1} e^{-x} d x\right] \\ & =\frac{1}{n} \operatorname{Re}\left[\frac{1}{(1-i a)^{\frac{1}{2}}}\Gamma\left(\frac{1}{n}\right)\right] \\ & =\frac{1}{n} \Gamma\left(\frac{1}{n}\right) \operatorname{Re}\left[\frac{1}{(1-i a)^{\frac{1}{n}}}\right] \end{aligned} Integrating back yields

\begin{aligned} I_n(1)-I_n(0) & =\frac{1}{n} \Gamma\left(\frac{1}{n}\right) \operatorname{Re} \int_0^1(1-i a)^{-\frac{1}{n}} d a \\ I(1)& =\frac{1}{n} \Gamma\left(\frac{1}{n}\right) \operatorname{Re}\left[\frac{(1-i a)^{-\frac{1}{n}+1}}{-i\left(\frac{1}{n}+1\right)}\right]_0^1 \\ & =\frac{1}{n-1} \Gamma\left(\frac{1}{n}\right) \operatorname{Re}\left(i(1-i)^{\frac{n-1}{n}}\right) \end{aligned} Now we can conclude that

\begin{aligned} I& =\frac{1}{n-1} \Gamma\left(\frac{1}{n}\right) \operatorname{Re}\left[i\left(\sqrt{2} e^{-\frac{\pi}{4}}\right)^{\frac{n-1}{n}}\right] \\ & =\frac{1}{n-1} \Gamma\left(\frac{1}{n}\right) \operatorname{Re}\left[i 2^{\frac{n-1}{2 n}} e^{-\frac{\pi(n-1)}{4 n}}\right] \\ & =\frac{2^{\frac{n-1}{2 n}}}{n-1} \Gamma\left(\frac{1}{n}\right) \sin \left(\frac{\pi(n-1)}{4 n}\right) \end{aligned}

Any comments and alternative methods are highly appreciated.

• It's sufficient to compute$$\int_{0}^{\infty}x^{s-1}e^{-ax}\sin(bx)\text{d}x =\Im\left ( \int_{0}^{\infty} x^{s-1}e^{-(a-bi)x}\text{d}x \right ).$$ Commented Mar 24, 2023 at 10:49

\begin{align} \int_0^\infty \frac{e^{-x^n}\sin(x^n)}{x^n}dx &=\Im\left(\int_0^{\infty}x^{-n}e^{-(1-i)x^n}dx\right)\\ &=\Im\left(\frac{(1-i)^{\frac{n-1}{n}}}{n}\int_0^{\color{red}\infty}\large u^{\frac{1-2n}{n}}e^{-u}du\right)\hspace{1cm}\small\text{(By substituting u=(1-i)x^n) }\\ &=\Im\left(\frac{(1-i)^{\frac{n-1}{n}}}{n}\Gamma\left(\frac{1-n}{n}\right)\right)\hspace{1cm}\small\text{(Since s-1=\frac{1-2n}{n}\implies s=\frac{1-n}{n}) }\\ &=\frac{\Gamma{(\frac1n)}}{1-n}\Im\left(\left(\sqrt2\Large e^{-\frac{\pi i}{4}}\right)^{\frac{n-1}{n}}\right)\hspace{1cm}\small\text{ \left(\Gamma\left(\frac{1-n}{n}\right)=\frac{n}{1-n}\Gamma\left(\frac{1}{n}\right)\right)} \\ &=\frac{\Gamma{(\frac1n)}}{1-n}\large2^{\frac{n-1}{2n}}\Im\left(\Large e^{-\frac{\pi(n-1) i}{4n}}\right)\\ &=\frac{\Gamma{(\frac1n)}}{n-1}\large2^{\frac{n-1}{2n}}\sin\left(\frac{\pi(n-1)}{4n}\right) \end{align}