1

Any clue regarding this:

$$\int_0^\infty e^{-a^2x^2} \cos (bx) dx = \frac {\sqrt \pi}{2a}e^{\frac{-b^2}{4a^2}}$$

Magneto
  • 1,571
  • 1
    Please show some effort on what you have tried and where exactly you are stuck on. If you're looking for where to start, you still can show what you have tried and why it didn't work. – Toby Mak Nov 09 '17 at 11:59
  • 1
    I can hardly believe this has not been asked before... – Jack D'Aurizio Nov 09 '17 at 12:03
  • Anyway, one parameter between $a$ and $b$ can be eliminated through a suitable substitution, and $F(b)=\int_{0}^{+\infty}e^{-x^2}\cos(bx),dx$ is the solution of a simple differential equation, by integration by parts. See, for instance, this answer. Plenty of other methods can be used. – Jack D'Aurizio Nov 09 '17 at 12:05
  • got it made a mistake. Here is what i did - $e^{-a{x^2}+ibx}=e^{-(ax-ib/2)^2} e^{(ib/2)^2} $ and then used $\int^\infty_0e^{-x^2} = \frac{\sqrt \pi}{2}$ – Magneto Nov 09 '17 at 12:14

2 Answers2

3

Let $$I(b) = \int^\infty_0 e^{-a^2 x^2} \cos (b x) \, dx, \quad a > 0.$$ Integrating by parts gives $$I(b) = \frac{2a^2}{b} \int^\infty_0 x e^{-a^2 x^2} \sin (bx) \, dx.$$

Also, differentiating $I(b)$ with respect to the parameter $b$ we have $$I'(b) = - \int^\infty_0 x e^{-a^2 x^2} \sin (bx) \, dx = - \frac{b}{2a^2} I(b).$$ Solving this first-order differential equation yields $$I(b) = K e^{-\frac{b^2}{4a^2}},$$ where $K$ is a constant to be determined. To find this constant, setting $b = 0$ one has $$I(0) = \int^\infty_0 e^{-(ax)^2} \, dx = \frac{\sqrt{\pi}}{2a} \cdot \frac{2}{\sqrt{\pi}} \int^\infty_0 e^{-u^2} \, du = \frac{\sqrt{\pi}}{2a} \cdot \text{erf} (\infty) = \frac{\sqrt{\pi}}{2a}.$$ So $K = \sqrt{\pi}/(2a)$ and we have $$I(b) = \int^\infty_0 e^{-a^2 x^2} \cos (b x) \, dx = \frac{\sqrt{\pi}}{2a} e^{-\frac{b^2}{4a^2}}, \quad a > 0,$$ as required.

omegadot
  • 12,364
1

Note that your solution is only valid for $a>0$. The more general result, valid for $a\in \mathbb{R}\setminus \{0\}$ is: $$\int_0^{\infty} e^{-a^2 x^2}\cos(bx)~dx=\frac{\sqrt{\pi}}{2\cdot \color{#AA0000}{|a|}}e^{-\frac{b^2}{4a^2}} \tag{1}$$


Substitute $u=ax$, then you obtain for $a>0$: $$\int_0^{\infty} e^{-a^2 x^2}\cos(bx)~dx=\frac{1}{a}\int_0^{\infty} e^{-u^2}\cos\left(\frac{b}{a}u\right)~du$$ And for $a<0$: $$\begin{align}\int_0^{\infty} e^{-a^2 x^2}\cos(bx)~dx&=\frac{1}{a}\int_0^{-\infty} e^{-u^2}\cos\left(\frac{b}{a}u\right)~du\\&=-\frac{1}{a}\int_{-\infty}^{0}e^{-u^2}\cos\left(\frac{b}{a}u\right)~du\\&=-\frac{1}{a}\int_{0}^{\infty}e^{-u^2}\cos\left(\frac{b}{a}u\right)~du \end{align}$$ Where on the last step we have made use of the fact that the integrand is even.

Note that the integral obviously diverges for $a=0$. Combining all the above results, we see that we have for $a\in \mathbb{R}\setminus \{0\}$: $$\int_0^{\infty} e^{-a^2 x^2}\cos(bx)~dx=\frac{1}{|a|}\int_0^{\infty} e^{-u^2}\cos\left(\frac{b}{a}u\right)~du \tag{2}$$


Then make use of the following question, which proves that for all $c\in \mathbb {R}$: $$\int_0^{\infty} e^{-x^2}\cos(cx)~dx=\frac{\sqrt{\pi}}{2}e^{-c^2/4}$$ You should obtain the result I have obtained on $(1)$.

  • thnx for enlightenment. I never thought about this value of a>0, a=0 , a <0. Had i not posted this, i would have not known this. – Magneto Nov 09 '17 at 12:26
  • You can easily see that your result is not correct for $a<0$, since the integrand is exactly the same for $a=2$ and $a=-2$ for example, whereas the answer given will not be the same. – projectilemotion Nov 09 '17 at 12:29
  • got it now. thnx. – Magneto Nov 09 '17 at 12:36