# Can we evaluate the Fresnel integral of a quadratic in general using real methods?

After tackling about the Fresnel integral in the post, I want go further with its quadratic as $$\int_{-\infty}^{\infty} \sin \left(a x^2+b x+c\right) d x$$ where $$a,b$$ and $$c$$ are real.

Starting with easy, we first consider the case $$a>0$$. \begin{aligned} \int_{-\infty}^{\infty} \sin \left(a x^2+b x+c\right) d x = & \int_{-\infty}^{\infty} \sin \left[a\left(x+\frac{b}{2 a}\right)^2+\left(c-\frac{b^2}{2 a}\right)\right] d x \\ = & -\Im\left[\int_{-\infty}^{\infty} e^{-\left[a\left(x+\frac{b}{2 a}\right)^2+\left(c-\frac{b^2}{4 a}\right)\right] i} d x\right. \\ = & -\Im\left[e^{\frac{b^2-4 a c}{4 a}i} \int_{-\infty}^{\infty} e^{-a\left(x+\frac{b}{2 a}\right)^2 i} d x\right]\\ = & -\Im\left[\left(\cos \frac{b^2-4 a c}{4 a}+i \sin \frac{b^2-4 a c}{4 a}\right) \cdot \sqrt{\frac{\pi}{2}} \cdot \frac{1-i}{\sqrt{a}}\right] \cdots(*) \\ = & \sqrt{\frac{\pi}{2 a}}\left(\cos \frac{4ac-b^2}{4 a}+\sin \frac{4ac-b^2}{4 a}\right) \end{aligned} where $$(*)$$ uses the result :$$\int_{-\infty}^{\infty} e^{-k x^2} d x=\sqrt{\frac{\pi}{k}}$$.

For $$a<0$$, we have $$\int_{-\infty}^{\infty} \sin \left(a x^2+b x+c\right) d x =-\int_{-\infty}^{\infty} \sin \left(-a x^2-b x-c\right) d x$$

Replacing $$a,b$$ and $$c$$ with $$-a, -b$$ and $$-c$$ yields $$\int_{-\infty}^{\infty} \sin \left(a x^2+b x+c\right) d x=-\sqrt{-\frac{\pi}{2 a}}\left(\cos \frac{4ac-b^2}{4 a}-\sin \frac{4ac-b^2}{4 a}\right)$$ Conclusively, $$\boxed{ \int_{-\infty}^{\infty} \sin \left(a x^2+b x+c\right) d x = \operatorname{sgn} a \sqrt{\frac{\pi}{2|a|}}\left(\cos \frac{4ac-b^2}{4|a|}+\sin \frac{4ac-b^2}{4|a|}\right)}$$

For examples, \begin{aligned} & \int_{-\infty}^{\infty} \sin \left(x^2-1\right) d x=\sqrt{\frac{\pi}{2}}(\cos 1-\sin 1) \\ & \int_{-\infty}^{\infty} \sin \left(x^2+x\right) d x =\sqrt{\frac{\pi}{2}}\left(\cos \frac{1}{4}-\sin \frac{1}{4}\right) \\ & \int_{-\infty}^{\infty} \sin \left(x^2+x+1\right) d x=\sqrt{\frac{\pi}{2}}\left(\cos \frac{3}{4}+\sin \frac{3}{4}\right)\\ & \int_{-\infty}^{\infty} \sin \left(3 x^2+4 x+5\right) d x=\sqrt{\frac{\pi}{6}}\left(\cos \frac{11}{3}+\sin \frac{11}{3}\right) \end{aligned}

My question: Can we evaluate the Fresnel integral of a quadratic in general using real methods ? Your comments and alternatives are highly appreciated.

For $$a>0$$, by the method of completing squares, we have $$I= \int_{-\infty}^{\infty} \sin \left(a x^2+b x+c\right) = \int_{-\infty}^{\infty} \sin \left[a\left(x+\frac{b}{2 a}\right)^2+\left(c-\frac{b^2}{4 a}\right)\right] d x$$ Using the compound-angle formula of sine yields \begin{aligned}I&=\int_{-\infty}^{\infty}\left[\sin \left(a\left(x+\frac{b}{2 a}\right)^2\right) \cos \left(c-\frac{b^2}{4 a}\right)+\sin \left(c-\frac{2 a}{4 a}\right) \cos \left(a\left(x+\frac{b}{2 a}\right)^2\right)\right] d x \\ & =\cos \left(c-\frac{b^2}{4 a}\right) \int_{-\infty}^{\infty} \sin \left(a\left(x+\frac{b}{2 a}\right)^2 \right)d x+\sin \left(c-\frac{b^2}{4 a}\right) \int_{-\infty}^{\infty} \cos \left(a\left(x+\frac{b}{2 a}\right)^2\right) d x \\&= \sqrt{\frac{\pi}{2 a}}\left[\cos \left(\frac{4ac-b^2}{4 a}\right)+\sin \left(\frac{4ac-b^2}{4 a}\right)\right] & \end{aligned} In general, $$\boxed{ \int_{-\infty}^{\infty} \sin \left(a x^2+b x+c\right) d x = \operatorname{sgn} a \sqrt{\frac{\pi}{2|a|}}\left(\cos \frac{4ac-b^2}{4|a|}+\sin \frac{4ac-b^2}{4|a|}\right)}$$
Looking at your results, I think that we could also write $$\int_{-\infty}^{\infty} \sin \left(a x^2+b x+c\right)\,dx=\sqrt{\frac{\pi }{2}}\frac{ a^3}{| a| ^{7/2}}\, A$$ where $$A=\cos (c) \left(\cos \left(\frac{b^2 }{4 a}\text{sgn}(a)\right)-\sin \left(\frac{b^2 }{4 a}\text{sgn}(a)\right)\right)-$$ $$\frac{\sin (c)}{\text{sgn}(a)}\left(\cos \left(\frac{b^2 }{4 a}\text{sgn}(a)\right)+\sin \left(\frac{b^2 }{4 a}\text{sgn}(a)\right)\right)$$