# Methods to solve $\int_{0}^{\infty} \frac{\cos\left(kx^n\right)}{x^n + a}\:dx$

Spurred on by this question, I decided to investigate for different functions on the numerator. Here, I went from $$\exp(..)$$ to $$\sin(..) / \cos(..)$$. I initially thought I could modify the result from $$\exp(..)$$ but got stuck. So I decided on another approach which here is a combination of Feynman's Trick, Laplace Transforms and coupled ODE Systems. I would love for a qualified eye to have a look over to see if what I've done is correct and/or another method (Not using Complex Analysis) to solve.

Here I've included more of my algebra to aid in those who wish to go over.

Consider the following two definite integrals

\begin{align} I_{n,a,k} &= \int_{0}^{\infty} \frac{\sin\left(kx^n\right)}{x^n + a}\:dx \\ J_{n,a,k} &= \int_{0}^{\infty} \frac{\cos\left(kx^n\right)}{x^n + a}:dx \end{align}

For $$a,k \in \mathbb{R}^+$$ and $$n \in \mathbb{R}^{+}, n > 1$$. Here we define:

\begin{align} I_{n,a,k}(t) &= \int_{0}^{\infty} \frac{\sin\left(tkx^n\right)}{x^n + a}:dx \\ J_{n,a,k}(t) &= \int_{0}^{\infty} \frac{\cos\left(tkx^n\right)}{x^n + a}:dx \end{align}

Here we observe that: \begin{align} I_{n,a,k}(1) &= I_{n,a,k} & I_{n,a,k}(0) &= 0 \\ J_{n,a,k}(1) &= J_{n,a,k} & J_{n,a,k}(0) &= a^{\frac{1}{n} - 1} \frac{\Gamma\left(1 -\frac{1}{n}\right)\Gamma\left(\frac{1}{n} \right)}{n} = \theta_{a,n} \end{align}

Here we will address each integral individually. For $$I_{n,a,k}$$ we take the derivative with respect to '$$t$$':

\begin{align} I_{n,a,k}'(t) &= \int_{0}^{\infty} \frac{kx^n\cos\left(tkx^n\right)}{x^n + a}\:dx = k\left[\int_{0}^{\infty} \cos\left(tkx^n\right)\:dx - a\int_{0}^{\infty} \frac{\cos\left(tkx^n\right)}{x^n + a}\:dx \right] \\ \frac{1}{k}I_{n,a,k}'(t) &= \frac{1}{k^{\frac{1}{n}}t^{\frac{1}{n}}}\int_{0}^{\infty} \cos\left(u^n\right)\:du - aJ_{n,a,k}(t) \end{align}

Thus,

$$$$\frac{1}{k}I_{n,a,k}'(t) + aJ_{n,a,k}(t) = \frac{1}{k^{\frac{1}{n}}t^{\frac{1}{n}}}\int_{0}^{\infty} \cos\left(u^n\right)\:du$$$$

From Section X, we arrive at:

$$$$\frac{1}{k}I_{n,a,k}'(t) + aJ_{n,a,k}(t) = \frac{\Gamma\left(\frac{1}{n}\right)\cos\left(\frac{\pi}{2n} \right)}{nk^{\frac{1}{n}}t^{\frac{1}{n}}}$$$$

Applying the same method to $$J_{n,a,k}\left(t\right)$$ we arrive at:

$$$$-\frac{1}{k}J_{n,a,k}'(t) + aI_{n,a,k}(t) = \ \frac{\Gamma\left(\frac{1}{n}\right)\sin\left(\frac{\pi}{2n} \right)}{nk^{\frac{1}{n}}t^{\frac{1}{n}}}$$$$

And thus, we arrive at the couple ordinary differential equation system:

\begin{align} \frac{1}{k}I_{n,a,k}'(t) + aJ_{n,a,k}(t) &= \Psi_{k,n}\cos\left(\frac{\pi}{2n} \right)t^{-\frac{1}{n}}\\ aI_{n,a,k}(t) -\frac{1}{k}J_{n,a,k}'(t) &= \Psi_{k,n}\sin\left(\frac{\pi}{2n} \right)t^{-\frac{1}{n}} \end{align}

Where $$\Psi_{k,n} = \frac{\Gamma\left(\frac{1}{n}\right)}{n}k^{-\frac{1}{n}}$$. Although there are many approaches to solving this system, here I will employ Laplace Transforms:

\begin{align} \frac{1}{k}\mathscr{L}\left[I_{n,a,k}'(t)\right] + a\mathscr{L}\left[J_{n,a,k}(t)\right] &= \Psi_{k,n}\cos\left(\frac{\pi}{2n} \right)\mathscr{L}\left[t^{-\frac{1}{n}}\right]\\ a\mathscr{L}\left[I_{n,a,k}(t)\right] -\frac{1}{k}\mathscr{L}\left[J_{n,a,k}'(t)\right] &= \Psi_{k,n}\sin\left(\frac{\pi}{2n} \right)\mathscr{L}\left[t^{-\frac{1}{n}}\right] \end{align}

Which becomes:

\begin{align} \frac{s}{k}\bar{I}_{n,a,k}(s) + a\bar{J}_{n,a,k}(s) &= \Psi_{k,n}\cos\left(\frac{\pi}{2n} \right)\kappa(s)\\ a\bar{I}_{n,a,k}(s) -\frac{s}{k}\bar{J}_{n,a,k}(s) &= \Psi_{k,n}\sin\left(\frac{\pi}{2n} \right)\kappa(s) + \frac{1}{k}\theta_{a,n} \end{align}

Where $$$$\kappa(s) = \mathscr{L}\left[t^{-\frac{1}{n}}\right] = \Gamma\left(1 - \frac{1}{n}\right)s^{1 - \frac{1}{n}}$$$$

Solving for $$\bar{J}_{n,a,k}(s)$$ we find:

\begin{align} \bar{J}_{n,a,k}(s) &= \frac{1}{s^2 + a^2k^2}\left[ak^2 \Psi_{k,n}\cos\left(\frac{\pi}{2n} \right)\kappa(s) -k\Psi_{k,n}\sin\left(\frac{\pi}{2n} \right)s\kappa(s) - s\theta_{a,n}\right] \\ &=ak^2 \Psi_{k,n}\cos\left(\frac{\pi}{2n} \right)\frac{1}{s^2 + a^2k^2}\kappa(s)-k\Psi_{k,n}\frac{s}{s^2 + a^2k^2}\kappa(s)\\ &\qquad- \theta_{a,n}\frac{s}{s^2 + a^2k^2} \end{align}

Taking the Inverse Laplace Transform, we arrive at:

\begin{align} &J_{n,a,k}(t) = \mathscr{L}^{-1}\left[ \bar{J}_{n,a,k}(s) \right] = ak^2 \Psi_{k,n}\cos\left(\frac{\pi}{2n} \right)\mathscr{L}^{-1}\left[\frac{1}{s^2 + a^2k^2}\kappa(s)\right]\\ &\qquad-ak\Psi_{k,n}\sin\left(\frac{\pi}{2n} \right)\mathscr{L}^{-1}\left[\frac{s}{s^2 + a^2k^2}\kappa(s)\right]- \theta_{a,n}\mathscr{L}^{-1}\left[\frac{s}{s^2 + a^2k^2}\right] \\ &= ak^2 \Psi_{k,n}\cos\left(\frac{\pi}{2n} \right)\int_{0}^{t} \frac{1}{ak}\sin\left(ak\left(t - \tau\right)\right) \tau^{-\frac{1}{n}}\:d tau\\ &\qquad-ak\Psi_{k,n}\sin\left(\frac{\pi}{2n} \right)\int_{0}^{t} \cos\left(ak\left(t - \tau\right)\right) \tau^{-\frac{1}{n}}\:d tau -\theta_{a,n}\cos\left(akt \right) \\ &= k\Psi_{k,n}\cos\left(\frac{\pi}{2n} \right)\int_{0}^{t} \left[\sin\left(akt\right)\cos\left(ak\tau\right) - \sin\left(ak\tau\right)\cos\left(akt\right) \right]\tau^{-\frac{1}{n}}\:d\tau\\ &\qquad-k\Psi_{k,n}\sin\left(\frac{\pi}{2n} \right)\int_{0}^{t} \left[\cos\left(akt\right)\cos\left(ak\tau\right) +\sin\left(ak\tau\right)\sin\left(akt\right) \right] \tau^{-\frac{1}{n}}\:d\tau \\ &\qquad-\theta_{a,n}\cos\left(akt \right) \\ &= k\Psi_{k,n}\cos\left(\frac{\pi}{2n} \right) \left[\sin\left(akt\right)\int_{0}^{t} \frac{\cos\left(ak\tau\right) }{\tau^{\frac{1}{n}}}\:d\tau - \cos\left(akt\right)\int_{0}^{t} \frac{\sin\left(ak\tau\right) }{\tau^{\frac{1}{n}}}\:d\tau \right] \\ &\qquad-k\Psi_{k,n}\sin\left(\frac{\pi}{2n} \right)\left[\cos\left(akt\right)\int_{0}^{t} \frac{\cos\left(ak\tau\right) }{\tau^{\frac{1}{n}}}\:d\tau+ \sin\left(akt\right)\int_{0}^{t} \frac{\sin\left(ak\tau\right) }{\tau^{\frac{1}{n}}}\:d\tau \right] \\ &\qquad-\theta_{a,n}\cos\left(akt \right) \\ &= k \Psi_{k,n}\left[\sin\left(akt + \frac{\pi}{2n}\right) \int_{0}^{t} \frac{\cos\left(ak\tau\right) }{\tau^{\frac{1}{n}}}\:d\tau-\cos\left(akt + \frac{\pi}{2n}\right) \int_{0}^{t} \frac{\sin\left(ak\tau\right) }{\tau^{\frac{1}{n}}}\:d\tau \right] \\ &\qquad-\theta_{a,n}\cos\left(akt \right) \\ &= k \Psi_{k,n}\left[\sin\left(akt + \frac{\pi}{2n}\right) k^{\frac{1}{n} - 1} a^{\frac{1}{n} - 1}\int_{0}^{akt} \frac{\cos\left(u\right) }{u^{\frac{1}{n}}}\:du-\cos\left(akt + \frac{\pi}{2n}\right)k^{\frac{1}{n} - 1} a^{\frac{1}{n} - 1} \int_{0}^{t} \frac{\sin\left(u\right) }{u^{\frac{1}{n}}}\:du \right] \\ &\qquad-\theta_{a,n}\cos\left(akt \right) \\ &= k k^{\frac{1}{n} - 1} a^{\frac{1}{n} - 1} \Psi_{k,n}\left[\sin\left(akt + \frac{\pi}{2n}\right) \int_{0}^{akt} \frac{\cos\left(u\right) }{u^{\frac{1}{n}}}\:du-\cos\left(akt + \frac{\pi}{2n}\right)\int_{0}^{akt} \frac{\sin\left(u\right) }{u^{\frac{1}{n}}}\:du \right] \\ &\qquad-\theta_{a,n}\cos\left(akt \right) \end{align}

Hence,

\begin{align} J_{n,a,k}(t) &= \int_{0}^{\infty} \frac{\cos\left(tkx^n\right)}{x^n + a}\:dx \\ &=a^{\frac{1}{n} - 1}\frac{\Gamma\left(\frac{1}{n} \right)}{n} \left[\sin\left(akt + \frac{\pi}{2n}\right) \int_{0}^{akt} \frac{\cos\left(u\right) }{u^{\frac{1}{n}}}\:du-\cos\left(akt + \frac{\pi}{2n}\right)\int_{0}^{akt} \frac{\sin\left(u\right) }{u^{\frac{1}{n}}}\:du \right] -\theta_{a,n}\cos\left(akt \right) \end{align}

And finally,

\begin{align} J_{n,a,k} &= J_{n,a,k}(1) = \int_{0}^{\infty} \frac{\cos\left(kx^n\right)}{x^n + a}\:dx \\ &=a^{\frac{1}{n} - 1}\frac{\Gamma\left(\frac{1}{n} \right)}{n} \left[\sin\left(ak + \frac{\pi}{2n}\right) \int_{0}^{akt} \frac{\cos\left(u\right) }{u^{\frac{1}{n}}}\:du-\cos\left(ak + \frac{\pi}{2n}\right)\int_{0}^{akt} \frac{\sin\left(u\right) }{u^{\frac{1}{n}}}\:d\tau \right] \\ &\qquad-\cos\left(ak \right) a^{\frac{1}{n} - 1} \frac{\Gamma\left(1 -\frac{1}{n}\right)\Gamma\left(\frac{1}{n} \right)}{n} \end{align}