# Integral of cos(x^2)

1. Jan 26, 2015

### occh

• Problem originally posted in a technical math section, so missing the template.
So i am trying to find the $\int_{0}^{\infty} cos(x^2) dx$. I used Eulers identity to get $\int_{0}^{\infty} cos(x^2) - isin(x^2) dx = \int_{0}^{\infty} e^{-i(x^2)} dx$. I squared this integral, changed to polar and evaluated and at the end of this process i got the result of $\frac{1}{2} \sqrt{\frac{\pi}{i}}$. Where do i go from here? Am i even on the right track? Thanks for your help.

2. Jan 26, 2015

### Staff: Mentor

I see where your second equation comes from, but how do you get back to $\int_0^{\infty}\cos^2(x)dx$?
IOW, how is $\int_0^{\infty}\cos^2(x)dx = \int_{0}^{\infty} \cos(x^2) - i\sin(x^2) dx$?

3. Jan 26, 2015

### occh

well this problem gives you the integrals: $\int_0^{\infty} cos(x^2) dx$ and $\int_0^{\infty} sin(x^2) dx$ and suggested proceeding in this manner to find the values of both of them by extracting the real and imaginary parts at the end after you solve the gaussian integral. This is where I am lost. I've viewed other threads on this topic this result appears there however they go through other steps to get the final result that i wasn't able to follow.

4. Jan 27, 2015

### Staff: Mentor

What do you mean, "gives you the integrals"? It might be helpful to see the problem as stated.

At any rate, this problem belongs in the homework section, so I'm moving it there.

5. Jan 27, 2015

### stevendaryl

Staff Emeritus
This is an unusual integral, because usually, convergent integrals from $0$ to $\infty$ involve a function that goes to zero as $x \rightarrow \infty$. In the case of $cos(x^2)$, it doesn't go to zero, but instead oscillates faster and faster, so the contribution from large values of $x$ tend to cancel out.

The way I would go about it is to use:

$cos(x^2) = Re(e^{i x^2})$

where $Re$ means the real part. So if the integral converges, then we can write:

$\int_0^\infty cos(x^2) dx = Re(\int_0^\infty e^{-i x^2} dx)$

How do you evaluate the right-hand side? I'm a little shaky about how to do it rigorously, but we know that for any $\lambda$ with a positive real part,

$\int_0^\infty e^{-\lambda x^2} dx = \frac{\sqrt{\pi}}{2 \sqrt{\lambda}}$

If we assume (and this is where it gets a little hand-wavy) that this holds even when $\lambda = i$, then we would have:
$\int_0^\infty e^{-i x^2} dx = \frac{\sqrt{\pi}}{2 \sqrt{i}}$

$\frac{1}{\sqrt{i}} =\pm \frac{1-i}{\sqrt{2}}$

So plug that in, take the real part, and (hopefully) you have your answer. You have to choose the $+$ sign so that your integral is positive.

6. Jan 27, 2015

### occh

Okay this yields the correct answer, for both the integrals, with the real part being for $cos(x^2)$ and (the same thing) for $sin(x^2)$ in the imaginary. Thank you very much! I guess i just needed to brush up on my manipulation of complex numbers.

7. Jan 27, 2015

### Ray Vickson

There is an important issue you have "swept under the rug", namely: does the integral converge, and do your formal manipulations actually lead to a correct answer? This is trickier than usual in the present case because the integrand does not go to zero, but oscillates with increasing rapidity as $x \to \infty$ (as pointed out by stevendaryl).

You can justify what you have done by looking for properties of "Fresnel functions"; see, eg,
http://en.wikipedia.org/wiki/Fresnel_integral.
Basically, the function $C(x) = \int_0^x \cos(t^2) \, dt$ is a widely-used function in Optics and other physics fields, and its properties are well-studied. In particular, the behavior of $C(x)$ for large, positive $x$ is known and is given (without proof) in the article cited. The limit $C(\infty)$ is the value you obtained.

Last edited: Jan 27, 2015