How does one integrate $\int \cos(x^2) dx$?

I have thought about using standard techniques of 'integration by parts' and 'partial fractions' but neither of them work. I tried plugging it into Wolfram Alpha and I got $\sqrt{\frac{\pi}{2}} C {\sqrt{\frac{2}{\pi}}} + $ a constant.

I am confused as to what the $C$ is supposed to mean and how to evaluate this intergral.

Thank you in advance.

  • 1
    $\begingroup$ At the bottom right of the output cell on WolframAlpha it says that "$C(x)$ is the Fresnel C integral". If you hover your mouse over that text, several links (such as this one) pop up describing it. The integral cannot be expressed as a finite combination of elementary functions. $\endgroup$ Mar 21, 2015 at 6:42
  • $\begingroup$ $$\int_{-\infty}^\infty\sin\big(x^2\big)~dx ~=~ \int_{-\infty}^\infty\cos\big(x^2\big)~dx~=~\sqrt{\frac\pi2}$$ and $$\int_{-\infty}^\infty e^{-x^2}~dx~=~\sqrt\pi$$ The two identities above, related to Fresnel and Gaussian integrals, are linked to each other by way of Euler's formula. $\endgroup$
    – Lucian
    Mar 21, 2015 at 8:19
  • $\begingroup$ reference.wolfram.com/language/ref/FresnelC.html $\endgroup$ Mar 21, 2015 at 16:41

1 Answer 1


There's no elementary integral for this function i.e. it can't be solved in closed form. This is because there's no closed form anti-derivative of cos($x^2$). You'll have to use some kind of numerical method to solve it.The most straightforward method of solving it is to use the Taylor expansion of cosine replacing x with $x^2$:

$$\cos(x^2) = \sum_{n=0}^\infty (-1)^n \frac{(x^2)^{2n}}{(2n)!}$$

and then integrating term by term within a certain domain of accuracy. What C is,I'm not sure without access to Wolfram's database, but it's probably some kind of numerical integral the algorithm uses in this case.

The integral can also be solved using complex analysis methods, but I was going on the assumption you aren't knowledgible on complex function theory. If you're interested in the theory and methods of such integrals further, there's a very nice discussion of it by Brian Conrad here.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .