1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Double integral of gaussian times mod cos function

  1. Aug 11, 2016 #1
    1. The problem statement, all variables and given/known data
    I want to evaluate the following definite integral of the form,

    [tex] I = \int\limits_{x = -\infty}^{\infty}\int\limits_{y = -\infty}^{\infty} e^{-ax^2} e^{-by^2} | \cos(c x + d y)| dx dy[/tex]
    where a, b, c, and d are constants, as part of a larger problem I am doing,
    2. Relevant equations
    [tex] \cos x = \frac{1}{2} ( e^{ix} + e^{-ix}) [/tex]
    [tex] \int\limits_{-\infty}^{\infty} e^{-a(x - b)^2} dx= \sqrt{\frac{\pi}{a}}[/tex]
    3. The attempt at a solution
    If it wasn't for the abs value on the cos function it would be easy to write it in terms of exponentials and complete squares and perform the integral. As it is I don't know how to approach this, any help would be great. I have given a general form of the integral but for my purpose it's ok to assume a =b.
     
  2. jcsd
  3. Aug 11, 2016 #2

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    If you change variables to ##cx+dy = z\; \Rightarrow \; y = pz - qx## your integral becomes
    $$I = \int_{x=-\infty}^{\infty} \int_{z = -\infty}^{\infty} p\, e^{-ax^2 - b(pz-qx)^2} |\cos(z)| \, dx \, dz$$
    For fixed ##z## you can do the ##x##-integral first, and so end up with
    $$I = A \int_{-\infty}^{\infty} e^{-r z^2} |\cos(z)| \, dz,$$
    where
    $$A =p \frac{\sqrt{\pi}}{\sqrt{a+bq^2}} \: \text{and} \; r = \frac{a b p^2}{a+bq^2}$$

    You can go a bit farther, by writing
    $$\begin{array}{l} I = A \int_{-\infty}^{\infty} e^{-r z^2} \cos(z) \, dz\\
    - 2A\left[ \int_{-3\pi/2}^{-\pi/2} + \int_{\pi/2}^{3\pi/2} + \int_{-7\pi/2}^{-5\pi/2} + \int_{5\pi/2}^{7\pi/2} + \int_{-11\pi/2}^{-9\pi/2} +\int_{9\pi/2}^{11\pi/2} + \cdots \right] \,e^{-rz^2} \cos(z) \, dz,
    \end{array}$$
    That comes from adding to the simple "cos" integral, twice the sum of those "cos" integrals where ##\cos(z) < 0## and noting that these latter cover the intervals ##(-3\pi/2,-\pi/2), (\pi/2 , 3\pi/2)## and the intervals ##(\pi/2 + 2 \pi n, 3\pi/2 +2 \pi n), (-3\pi/2 - 2 \pi n, -\pi/2 - 2 \pi n)## for ##n =1,2,\ldots ##.

    At that point I cannot see how to give a more useful answer, although the integrals can be done in terms or error functions of complex arguments that depend on r and n, but I don't see that as very helpful. The expression might well be amenable to numerical evaluation, since the presence of factors ##e^{-4 \pi^2 r n^2}## means that good accuracy ought to be attainable from a few small values of ##n = 0, \pm1, \pm2, \ldots## and then the individual integrals can be tackled numerically.
     
    Last edited: Aug 12, 2016
  4. Aug 12, 2016 #3

    Thank you for the reply. I have a doubt though. If you change variables such that ## cx + dy = z \Rightarrow y = \frac{z}{d} - \frac{cx}{d} \equiv pz - q, ## where ## q(x) = \frac{cx}{d} ## how can you do the x integral? Do you mean complete squares in the x variable and then inegrate? But then there shouldn't be any q after integration right? But it looks like q is being treated as a constant.
     
  5. Aug 12, 2016 #4

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    I made a typo when I wrote ##e^{-ax^2-b(pz-qy)^2} \,dx##; it should have been ##e^{-ax^2-b(pz-qx)^2} \,dx##, because ##y = pz - qx##; and, of course, ##p=1/d## and ##q=c/d## really are constants. The ##x##-integral will be of the form ##\int_R e^{-Ax^2-Bx-C} \, dx## with constants ##A,B,C## (which may contain the un-integrated variable ##z##). Certainly the answer will be in terms of ##A,B,C##.

    The formulas I wrote later are correct; I did them on the computer algebra system Maple, using correct formulas without any typos in the inputs. You should never, never just copy down such things, but should yourself carry through all the steps to see what you get.

    Typos fixed in original.
     
    Last edited: Aug 12, 2016
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Double integral of gaussian times mod cos function
Loading...