Evaluating $\int \cos(x^2 + x)dx$ I need to evaluate following integral,
$$\int \left( x + \frac{1}{2} \right) \cos(x^2 + x)\,dx$$
 but this one has got me pretty stumped! Any suggestions would be appreciated. Thanks!

Complete the square $$x^2+x=(x+\frac12)^2-\frac14$$ and change variable $y=x+\frac12$. So, $$\cos(x^2 + x)=\cos(y^2-\frac14)=\cos(y^2)\cos(\frac14)+\sin(y^2)\sin(\frac14)$$ and then $$I=\int cos(x^2 + x)dx=\cos(\frac14)\int \cos(y^2)dy+\sin(\frac14)\int \sin(y^2)dy$$where you recognized Fresnel integrals $$\int \cos(y^2)dy=\sqrt{\frac{\pi }{2}} C\left(\sqrt{\frac{2}{\pi }} y\right)$$ $$\int \sin(y^2)dy=\sqrt{\frac{\pi }{2}} S\left(\sqrt{\frac{2}{\pi }} y\right)$$ So, back to $x$, $$\int \cos(x^2+x)dx=\sqrt{\frac{\pi }{2}} \left(\cos \left(\frac{1}{4}\right) C\left(\frac{2 x+1}{\sqrt{2
   \pi }}\right)+\sin \left(\frac{1}{4}\right) S\left(\frac{2 x+1}{\sqrt{2 \pi
   }}\right)\right)$$
