# How to do integral for Cos(x^2)dx?

• jkh4
In summary: Well, I guess you're right, it's a little harder than I made it out to be. I'll add a few more steps to the proof, although I think I'll stick with the original statement of the problem:Given: e^{i \theta} = \cos (\theta) + i \sin (\theta) & the Gaussian Integral: \int_{-\infty}^{\infty} e^{-\alpha x^2} dx = \sqrt{\frac{\pi}{\alpha}}Consider: \int_{-\infty}^{\infty} e^{-i x^{2}} dx = \int_{-\infty}^{\infty}\cos (x^{2}) - i
jkh4
How to do integral for Cos(x^2)dx? Is there a chain rule for integral? Coz sometimes when I approach questions like that i just don't know how to approach...thanks!

you have to look it up in a table of integrals:

$$\int_{0}^{\infty} \cos (x^{2}) dx = \int_{0}^{\infty} \sin (x^{2}) dx = \frac{1}{2}\sqrt{\frac{\pi}{2}}$$

If you mean $$\int \cos^{2} x$$ then you would change it to $$\int \frac{1+\cos 2x}{2}$$

Last edited:
And if you mean the general anti-derivative of cos(x2), it is not an "elementary" function. That is, it cannot be written in terms of functions you normally learn (polynomials, rational functions, radicals, exponentials, logarithms, trig functions.

or you can expand $$\cos (x^{2})$$ into a series and then integrate each term (and thus get an approximation).

by the way, how can you prove this:
$$\int_{0}^{\infty} \cos (x^{2}) dx = \int_{0}^{\infty} \sin (x^{2}) dx = \frac{1}{2}\sqrt{\frac{\pi}{2}}$$

Simple Solution

To prove:
$$\int_{0}^{\infty} \cos (x^{2}) dx = \int_{0}^{\infty} \sin (x^{2}) dx = \frac{1}{2}\sqrt{\frac{\pi}{2}}$$

Given:
$$e^{i \theta} = \cos (\theta) + i \sin (\theta)$$ & the Gaussian Integral: $$\int_{-\infty}^{\infty} e^{-\alpha x^2} dx = \sqrt{\frac{\pi}{\alpha}}$$

Consider:
$$\int_{-\infty}^{\infty} e^{-i x^{2}} dx = \int_{-\infty}^{\infty}\cos (x^{2}) - i \sin (x^{2}) dx = \sqrt{\frac{\pi}{i}}$$

Now $$\sqrt{-i} = \sqrt{e^{-i \frac{\pi}{2}}} = e^{-i \frac{\pi}{4}}$$ in the principal branch $$(-\pi < \theta \leq \pi)$$

Therefore:
$$\int_{0}^{\infty}\cos (x^{2}) dx - i \int_{0}^{\infty} \sin (x^{2}) dx = \frac{1}{2}\sqrt{\frac{\pi}{2}} - i\frac{1}{2}\sqrt{\frac{\pi}{2}}$$ since the integrands are even functions.

QED

Hello there =)
I got it, its a brilliant way of proving it. But i think I am missing something ...

isnt it true that:
$$e^{-i\frac{\pi}{4}}=\cos{\frac{\pi}{4}}-i\sin{\frac{\pi}{4}}$$ ?

and

$$\cos{\frac{\pi}{4}}=\sin{\frac{\pi}{4}}=\frac{\sqrt{2}}{2}$$

which ,I don't know how, got to be (according to you) :

$$\frac{1}{2\sqrt{2}}$$

...im really stuck here...can you help me?

like I said...im missing smth here...

...limits of integration...got it!

agomez said:
$$e^{i \theta} = \cos (\theta) + i \sin (\theta)$$ & the Gaussian Integral: $$\int_{-\infty}^{\infty} e^{-\alpha x^2} dx = \sqrt{\frac{\pi}{\alpha}}$$
But the major task here is to show that your result holds for $$\alpha$$ imaginary. This requires complex analysis.

Anthony said:
But the major task here is to show that your result holds for $$\alpha$$ imaginary. This requires complex analysis.

It's not that major a task. It's pretty easy once you have the right contour. ;) For those interested,

$$\oint_C dz e^{iz^2}$$

where C is the contour with components C1 = the real axis from 0 to R, C2 = an arc of radius R subtending an angle of $\pi/4$, and C3 = a straight line from the end of C2 to the origin.

Since this contour encloses no poles, the contour integral is zero. Hence, parametrizing $z = x$ on C1, $z = Re^{i\theta}$ on C2 and $z = xe^{i\pi/4}$ on C3,

$$0 = \int_0^R dx e^{ix^2} + iR\int_0^{\pi/4}d\theta e^{i\theta} e^{iR^2e^{i2\theta}} + \int_R^0 dx e^{i\pi/4} e^{ix^2e^{i\pi/2}},$$
which gives

$$\int_0^R dx e^{-x^2} e^{i\pi/4} = \int_0^R dx e^{ix^2} + iR\int_0^{\pi/4}d\theta e^{i\theta} e^{iR^2\cos(2\theta)}e^{-R^2\sin(2\theta)}$$

Now we take the limit as $R \rightarrow \infty$. The integral on C2 satisfies the inequality

$$\left|iR\int_0^{\pi/4}d\theta e^{i\theta} e^{iR^2\cos(2\theta)}e^{-R^2\sin(2\theta)}\right| \leq R\int_0^{\pi/4}d\theta e^{-R^2\sin(2\theta)}$$

Because $\sin(2\theta) > 0$ when $0 < 2\theta < \pi/4$, the RHS of the inequality tends to zero as R grows large and hence doesn't contribute to the integral. We thus have

$$\int_0^\infty dx e^{-x^2} e^{i\pi/4} = \int_0^\infty dx e^{ix^2}$$.

Recognizing the Gaussian integral on the LHS and taking the complex conjugate to get the desired integral gives

$$\int_0^\infty dx e^{-ix^2} = \frac{\sqrt{\pi}}{2}e^{-i\pi/4} = \frac{1}{2}\sqrt{\frac{\pi}{i}}$$
as required for the above proof of the integral of cos(x^2) or sin(x^2).

Mute said:
It's not that major a task. It's pretty easy once you have the right contour. ;)
Not easy enough, it would seem!

Mute said:
Now we take the limit as $R \rightarrow \infty$. The integral on C2 satisfies the inequality

$$\left|iR\int_0^{\pi/4}d\theta e^{i\theta} e^{iR^2\cos(2\theta)}e^{-R^2\sin(2\theta)}\right| \leq R\int_0^{\pi/4}d\theta e^{-R^2\sin(2\theta)}$$

Because $\sin(2\theta) > 0$ when $0 < 2\theta < \pi/4$, the RHS of the inequality tends to zero as R grows large and hence doesn't contribute to the integral.
You need Jordan's lemma type argument - your current version doesn't hold water, I'm afraid.

\begin{aligned} R\int_{0}^{\pi/4} e^{-R^2\sin(2t)}dt&<R\int_{0}^{\pi/4} e^{-R^2 4x/\pi}dx \\ &<-\frac{R\pi}{4R^2}e^{-R^2 4x/\pi}\biggr|_0^{\pi/4} \\ &<-\frac{\pi}{4R}\left(e^{-R^2}-1\right) \end{aligned}

Just draw a line segment from the origin to the point (pi/4,1) to get the line y=4x/pi and that is less than sin(2t) which is above it in the integration interval. That last expression then goes to zero as R goes to infinity.

Anthony said:
Not easy enough, it would seem!You need Jordan's lemma type argument - your current version doesn't hold water, I'm afraid.

If you insist on more rigor, it is easily supplied: on the integration contour the inequality

$$\sin(2\theta) \geq \frac{4\theta}{\pi}$$
holds. (Due to concavity of the sine function on this interval).

Hence,
$$R\int_0^{\pi/4}d\theta e^{-R^2\sin(2\theta)} \leq R\int_0^{\pi/4}d\theta e^{-4R^2\theta/\pi} = -\frac{4}{\pi R}\left(e^{-R^2} - 1\right)$$
which tends to zero as R tends to infinity.

Still pretty easy. ;) (Edit: And beaten to it, too!)

Of course, I can keep adding rigor and other steps I skipped:

$$\sin(2\theta) \geq \frac{4\theta}{\pi}$$
so, because $e^x$ is a monotonically increasing function, it follows that $\exp(\sin(2\theta)) \geq \exp(\frac{4\theta}{\pi})$; taking the reciprocal reverses the inequality, so we have $\exp(-\sin(2\theta)) \leq \exp(-\frac{4\theta}{\pi})$. By a theorem of calculus, if $f(x) \leq g(x)$ on some interval, then
$$\int dx f(x) \leq \int dx g(x)$$
as long as the limits of integral are a subset of the interval on which the inequality holds. Thus,
$$R\int_0^{\pi/4}d\theta e^{-R^2\sin(2\theta)} \leq R\int_0^{\pi/4}d\theta e^{-4R^2\theta/\pi} = -\frac{4}{\pi R}\left(e^{-R^2} - 1\right).$$

Boy, that's a long proof! Maybe it isn't easy after all! No wonder mathematicians take forever to get anything done, always insisting on so much rigor! ;)

Last edited:
Don't know what Jordan's lemma is (will find out soon enough), but I'm pretty sure you can just integrate by parts to get the estimate for
$$R\int_0^{\pi/4}d\theta e^{-R^2\sin(2\theta)}.$$

Also you do not need complex analysis to evaluate the Fresnel integrals. You can use somewhat contrived arguments to compute the integrals via multivariable calculus. Since I'm more fond of real analysis at this point, I prefer real-analytic solutions.

Mute said:
If you insist on more rigor, it is easily supplied: on the integration contour the inequality

$$\sin(2\theta) \geq \frac{4\theta}{\pi}$$
holds. (Due to concavity of the sine function on this interval).

Hence,
$$R\int_0^{\pi/4}d\theta e^{-R^2\sin(2\theta)} \leq R\int_0^{\pi/4}d\theta e^{-4R^2\theta/\pi} = -\frac{4}{\pi R}\left(e^{-R^2} - 1\right)$$
which tends to zero as R tends to infinity.
Excellent, well done!
snipez90 said:
Don't know what Jordan's lemma is (will find out soon enough), but I'm pretty sure you can just integrate by parts to get the estimate for
$$R\int_0^{\pi/4}d\theta e^{-R^2\sin(2\theta)}.$$

Also you do not need complex analysis to evaluate the Fresnel integrals. You can use somewhat contrived arguments to compute the integrals via multivariable calculus. Since I'm more fond of real analysis at this point, I prefer real-analytic solutions.
You might not need complex analysis to evaluate integrals of this form, but it's the standard treatment. I'm sure there's actually a book containing lots of integrals that are usually done via complex analysis, but explicitly calculates them using real analysis. I don't really see the point (why rub sticks together if you have a lighter), but some are fond of such things.

How would your integration by parts estimate work?

An interesting note about multivariate calculus methods vs. complex calculus methods, to go on a slight tangent here, is that the Gaussian integral is evaluated by multivariate calculus instead of complex calculus because it's actually very hard to find a contour and integrand that you can actually use to evaluate the integral. I saw a contour integral for it once, and it was a somewhat contrived looking integrand. After some searching I found it (incidentally my Google search led to another thread on the forums which linked to the page with the document):

$$\oint dz \frac{e^{i\pi z^2}}{\sin(\pi z)}$$

Integrating around a parallelogram with vertices $\pm \pi/2 \pm Re^{i\pi/4}$ and taking R to infinity gives the result.

(A note on the document linked to: it contains many derivations of the Gaussian integral, but they are not 'rigorous' derivations that would satisfy our mathematician friends in the audience - for instance, the standard double integral method is performed, but no care is taken in treating the limits of integration properly: they simply switch from $\{x,y\} \in (-\infty,\infty)U(-\infty,\infty)$ to $\{r,\theta\} \in [0,\infty)U[0,2\pi)$, which as far as a real analyst is concerned is too presumptuous, I believe ;) )

Last edited:
Hello,
Would it also hold true if the limits of integration are other than 0 to infinity that
$$\int_{ }^{ } \cos (x^{2}) dx = \int_{ }^{} \sin (x^{2}) dx$$ ?

What about if $$x^{a}$$ (x is raised to an arbitrary power like?
$$\int_{ }^{ } \cos (x^{3}) dx$$

Thank you for the help.

murshid_islam said:
or you can expand $$\cos (x^{2})$$ into a series and then integrate each term (and thus get an approximation).

by the way, how can you prove this:
$$\int_{0}^{\infty} \cos (x^{2}) dx = \int_{0}^{\infty} \sin (x^{2}) dx = \frac{1}{2}\sqrt{\frac{\pi}{2}}$$

I ran into the same cos (x^2) in a problem... though not as complex. how do you solve this for zero? I need to find where the graph crosses the x-axis.

Cos (x^2) = 0...?

Crap, nevermind... been a while... ;)

can it be done without countor integration?

## 1. What is Special About the Integral of Cos(x²)?

The integral of cos(x²), often written as ∫cos(x²) dx, is notable because it does not have a solution in terms of elementary functions (like polynomials, exponential functions, trigonometric functions, etc.). This means it cannot be expressed in a simple closed formula using basic functions.

## 2. How Can You Compute the Integral of Cos(x²)?

Although the integral of cos(x²) cannot be expressed with elementary functions, it can be evaluated using numerical methods or special functions. For instance, computer algorithms or numerical integration techniques like Simpson's rule or the trapezoidal rule can be used to approximate its value over a specific interval.

## 3. Is There a Related Function for the Integral of Cos(x²)?

Yes, the integral of cos(x²) is closely related to the Fresnel integrals, which are used in wave optics and other fields. The Fresnel integrals are defined as special functions and are often used to study the properties of ∫cos(x²) dx.

## 4. Can You Use Series Expansion for This Integral?

A series expansion of cos(x²) can be used to approximate the integral. By expanding cos(x²) into a Taylor series and then integrating term by term, one can obtain an approximate series representation of the integral. However, this method may require many terms to achieve a high degree of accuracy, especially for large values of x.

## 5. Are There Any Graphical Methods to Understand This Integral?

Graphical methods, like plotting the function cos(x²) over a certain interval, can provide a visual understanding of the integral. While it doesn't give a numerical answer, it can help in comprehending the behavior of the integral, such as its symmetry and periodicity.

## 6. How is the Integral of Cos(x²) Applied in Practical Scenarios?

While ∫cos(x²) dx may not have a straightforward elementary function solution, it finds applications in physics, particularly in optics and wave theory. The function is significant in the study of diffraction patterns and wave propagation, where Fresnel integrals are commonly applied.

Replies
2
Views
1K
Replies
3
Views
2K
Replies
3
Views
466
Replies
8
Views
1K
Replies
4
Views
2K
Replies
5
Views
2K
Replies
10
Views
332
Replies
4
Views
2K
Replies
8
Views
960
Replies
8
Views
1K