I was reading an interesting book on evaluating some integrals(Inside Interesting Integrals by Paul J. Nahin) and came across the Fresnel integrals: $\int_{0}^{\infty} \cos(x^2) \text{ dx}= \int_{0}^{\infty} \sin(x^2) \text{ dx}= \sqrt{\frac{\pi}{2}}$. These were very interesting to me; I know of course that $\int_{0}^{\infty} \cos{x} \text{ dx}$ does not converge, and it was amazing to me that making the $x$ squared will allow the integral to converge. So, I wanted to play around with the integrand a bit more.
I opened Wolfram Alpha and tried evaluating integrals of the form $\int_{0}^{\infty} \cos(x^p) \text{ dx}$ for integer $p>1$. After a bit it stopped giving me exact answers(I don't have WA pro so computation time is limited), but I could deduce that $\int_{0}^{\infty} \cos(x^p) \text{ dx} = \cos(\frac{\pi}{2 p}) \Gamma(\frac{p+1}{p})$ and $\int_{0}^{\infty} \sin(x^p) \text{ dx} = \sin(\frac{\pi}{2 p}) \Gamma(\frac{p+1}{p})$ for $p>1$, apparently not just for integer $p$ but real $p$ as well. I have checked this through a few(50 or so total) numerical approximations, so I am reasonably confident in it.
This is amazing to me! I'm wondering if there is a proof; I've finished Calc 2 and just started Calc 3, so anything involving elliptic integrals or something is out of the question for me to understand(though if you have a solution involving something higher, please still provide it). I know what the Gamma function is, and that it pops up a lot when evaluating integrals, but I have no idea why it appears here(my guess is some kind of reduction formula involving $\cos(x^p)$ and $\cos(x^{p-1})$, but I really have no clue). I've searched online and looking at some integral tables, but I'm either searching the wrong things or there is really just no reference to this integral formula. I was actually surprised by this, it seems super fundamental and I imagine many other integral formulas could be based off of this for an integral table or something similar. Anyway, if someone can provide a proof or some kind of intuitive explanation, please let me know!
Sidenote: WA might give slightly different forms for the integrals, sometimes writing cosines as exact expressions and $\Gamma(x)$ as $(x-1) \Gamma (x-1)$, but the results should be the same as expected.
The trick is to consider the integral
$$I[p] = \int_0^\infty e^{ix^p}\:dx = \frac{1}{p}\int_0^\infty z^{\frac{1}{p}-1}e^{iz}\:dz$$
with the substitution $x^p = z$. The next part may seem unjustified, but we can rotate this integral in the complex plane and say that the integral along the real axis is equivalent to the integral on the imaginary instead of real axis with $z=iy$
$$I[p] = \frac{i^{\frac{1}{p}}}{p}\int_0^\infty y^{\frac{1}{p}-1}e^{-y}\:dy$$
The reason this is true is because we can connect the real and imaginary contours with a circular arc in the complex plane. In the limit as the arc grows in size the integral on the arc vanishes and Morera's theorem tells us that the integral of a complex differentiable function on a closed loop is zero, thus the real and imaginary axes integrals have to cancel each other out (of course they are moving in opposite directions to close a loop, so they equal each other when you reorient both outward from the origin). In practice you do have to be careful with the integrable singularity near the origin for $p>1$ but when you do take the extra steps it does not change the result.
If you are willing to take the above, then continuing on we immediately arrive at
$$I[p] = \frac{i^{\frac{1}{p}}}{p}\Gamma\left(\frac{1}{p}\right) = e^{i\frac{\pi}{2p}}\Gamma\left(\frac{1+p}{p}\right)$$
and
$$\int_0^\infty \cos(x^p)\:dx = \operatorname{Re}\left\{I[p]\right\} = \cos\left(\frac{\pi}{2p}\right)\Gamma\left(\frac{1+p}{p}\right)$$
$$\int_0^\infty \sin(x^p)\:dx = \operatorname{Im}\left\{I[p]\right\} = \sin\left(\frac{\pi}{2p}\right)\Gamma\left(\frac{1+p}{p}\right)$$
by Euler's formula $e^{i\theta} = \cos\theta + i\sin\theta$.
If you aren't aware, $\left(x^a\right)^b = x^{ab}$ and $(xy)^a = x^ay^a$ are properties that are not always true for complex numbers, as evidenced by the fact that there was no reason for me to choose $i^a = e^{i\frac{a\pi}{2}}$ when by Euler's formula $i^a = e^{i\frac{5a\pi}{2}}$ was also a valid choice. But I implicitly limited myself to the first choice when I asserted $(iy)^{\frac{1}{p}-1} = i^{\frac{1}{p}-1}y^{\frac{1}{p}-1}$ at the time we pulled the factor out of the integral, and the fact that I took the contour in the complex plane to only be in the first quadrant. This is called choosing a branch or branch cut.