Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

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

  1. Oct 22, 2006 #1
    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!
  2. jcsd
  3. Oct 22, 2006 #2
    you have to look it up in a table of integrals:

    [tex] \int_{0}^{\infty} \cos (x^{2}) dx = \int_{0}^{\infty} \sin (x^{2}) dx = \frac{1}{2}\sqrt{\frac{\pi}{2}} [/tex]

    If you mean [tex] \int \cos^{2} x [/tex] then you would change it to [tex] \int \frac{1+\cos 2x}{2} [/tex]
    Last edited: Oct 22, 2006
  4. Oct 22, 2006 #3


    User Avatar
    Science Advisor

    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.
  5. Oct 22, 2006 #4
    or you can expand [tex]\cos (x^{2})[/tex] into a series and then integrate each term (and thus get an approximation).

    by the way, how can you prove this:
    [tex] \int_{0}^{\infty} \cos (x^{2}) dx = \int_{0}^{\infty} \sin (x^{2}) dx = \frac{1}{2}\sqrt{\frac{\pi}{2}} [/tex]
  6. Feb 2, 2008 #5
    Simple Solution

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

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

    [tex] \int_{-\infty}^{\infty} e^{-i x^{2}} dx = \int_{-\infty}^{\infty}\cos (x^{2}) - i \sin (x^{2}) dx = \sqrt{\frac{\pi}{i}} [/tex]

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

    [tex] \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}} [/tex] since the integrands are even functions.

  7. Jul 23, 2010 #6
    Hello there =)
    I got it, its a brilliant way of proving it. But i think im missing something ....

    isnt it true that:
    [tex]e^{-i\frac{\pi}{4}}=\cos{\frac{\pi}{4}}-i\sin{\frac{\pi}{4}}[/tex] ?



    which ,I dont know how, got to be (according to you) :


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

    like I said...im missing smth here...
  8. Jul 23, 2010 #7
    ...limits of integration....got it!!!
  9. Jul 23, 2010 #8
    Re: Simple Solution

    But the major task here is to show that your result holds for [tex]\alpha[/tex] imaginary. This requires complex analysis.
  10. Jul 23, 2010 #9


    User Avatar
    Homework Helper

    Re: Simple Solution

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

    [tex]\oint_C dz e^{iz^2}[/tex]

    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 [itex]\pi/4[/itex], 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 [itex]z = x[/itex] on C1, [itex]z = Re^{i\theta}[/itex] on C2 and [itex]z = xe^{i\pi/4}[/itex] on C3,

    [tex]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}},[/tex]
    which gives

    [tex]\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)}[/tex]

    Now we take the limit as [itex]R \rightarrow \infty[/itex]. The integral on C2 satisfies the inequality

    [tex]\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)}[/tex]

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

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

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

    [tex]\int_0^\infty dx e^{-ix^2} = \frac{\sqrt{\pi}}{2}e^{-i\pi/4} = \frac{1}{2}\sqrt{\frac{\pi}{i}}[/tex]
    as required for the above proof of the integral of cos(x^2) or sin(x^2).
  11. Jul 23, 2010 #10
    Re: Simple Solution

    Not easy enough, it would seem!

    You need Jordan's lemma type argument - your current version doesn't hold water, I'm afraid.
  12. Jul 23, 2010 #11
    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} \\

    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.
  13. Jul 23, 2010 #12


    User Avatar
    Homework Helper

    Re: Simple Solution

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

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

    [tex] 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)[/tex]
    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:

    [tex]\sin(2\theta) \geq \frac{4\theta}{\pi}[/tex]
    so, because [itex]e^x[/itex] is a monotonically increasing function, it follows that [itex]\exp(\sin(2\theta)) \geq \exp(\frac{4\theta}{\pi})[/itex]; taking the reciprocal reverses the inequality, so we have [itex]\exp(-\sin(2\theta)) \leq \exp(-\frac{4\theta}{\pi})[/itex]. By a theorem of calculus, if [itex]f(x) \leq g(x)[/itex] on some interval, then
    [tex]\int dx f(x) \leq \int dx g(x) [/tex]
    as long as the limits of integral are a subset of the interval on which the inequality holds. Thus,
    [tex] 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).[/tex]

    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: Jul 23, 2010
  14. Jul 23, 2010 #13
    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
    [tex]R\int_0^{\pi/4}d\theta e^{-R^2\sin(2\theta)}.[/tex]

    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.
  15. Jul 24, 2010 #14
    Excellent, well done!
    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?
  16. Jul 24, 2010 #15


    User Avatar
    Homework Helper

    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):

    [tex]\oint dz \frac{e^{i\pi z^2}}{\sin(\pi z)}[/tex]

    Integrating around a parallelogram with vertices [itex]\pm \pi/2 \pm Re^{i\pi/4}[/itex] 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 [itex]\{x,y\} \in (-\infty,\infty)U(-\infty,\infty)[/itex] to [itex]\{r,\theta\} \in [0,\infty)U[0,2\pi)[/itex], which as far as a real analyst is concerned is too presumptuous, I believe ;) )
    Last edited: Jul 24, 2010
  17. Oct 20, 2010 #16
    Would it also hold true if the limits of integration are other than 0 to infinity that
    [tex] \int_{ }^{ } \cos (x^{2}) dx = \int_{ }^{} \sin (x^{2}) dx [/tex] ?

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

    Thank you for the help.

  18. Jan 23, 2011 #17
    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...?
  19. Jan 23, 2011 #18
    Crap, nevermind... been a while... ;)
  20. Dec 9, 2012 #19
    can it be done without countor integration?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook