How Can I Solve This Integral Using Complex Integration?

Click For Summary

Discussion Overview

The discussion revolves around solving the integral $$\int_0^\infty e^{-x^2} \cos(kx) dx$$ using complex integration techniques. Participants explore various methods, including contour integration and the Laplace transform, while debating the appropriate contours and conditions for convergence.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant suggests using a rectangular contour for complex integration, questioning the suitable height $h$ for the contour.
  • Another participant proposes integrating over the upper half-plane instead, noting that the integrand is even and the circular part of the contour vanishes by Jordan's lemma.
  • A different approach is introduced using the Laplace transform, leading to a specific expression for the integral involving the error function.
  • One participant elaborates on the contour integration method, detailing the contributions from different segments of the contour and asserting that certain integrals vanish as $R$ approaches infinity.
  • Concerns are raised about the correctness of the contour integration argument, particularly regarding the behavior of the integral over the semi-circle and the nature of the integrand being entire.
  • Another participant rewrites the integral in terms of a complex exponential and applies a general formula for Gaussian integrals, arriving at a similar expression for the integral.
  • There is a discussion about the necessity of the condition $k > 0$, with one participant arguing that it is not needed for the derivation.

Areas of Agreement / Disagreement

Participants express differing opinions on the choice of contour for integration and the implications of the integrand's properties. There is no consensus on the best approach, and multiple competing views remain throughout the discussion.

Contextual Notes

Some participants note the need to prove that certain integrals vanish as $R$ approaches infinity, while others highlight the dependence on the properties of the integrand and the chosen contour. The discussion reflects various assumptions and conditions that have not been fully resolved.

pantboio
Messages
43
Reaction score
0
I'm struggling for a long time to solve this integral
$$\int_0^\infty e^{-x^2}cos(kx)dx$$
with $k>0$

I know there are a number of ways, but I'm interested in using complex integration. In particular, I believe that we can solve by integrating $e^{-z^2}$ over the boundary of the rectangule $[-R,R]\times[0,h]$ for a suitable $h$.
What $h$ do you think i should use?
 
Physics news on Phys.org
pantboio said:
I'm struggling for a long time to solve this integral
$$\int_0^\infty e^{-x^2}cos(kx)dx$$
with $k>0$

I know there are a number of ways, but I'm interested in using complex integration. In particular, I believe that we can solve by integrating $e^{-z^2}$ over the boundary of the rectangule $[-R,R]\times[0,h]$ for a suitable $h$.
What $h$ do you think i should use?
Personally I wouldn't use the rectangle. I'd note that the integrand is even so
\int_0^{\infty} e^{-z^2}cos(kz)~dz = \frac{1}{2}\int_{-\infty}^{\infty} e^{-z^2}cos(kz)~dz
and integrate over the upper half plane. (The circular part goes to zero by Jordan's lemma.)

-Dan
 
pantboio said:
I'm struggling for a long time to solve this integral
$$\int_0^\infty e^{-x^2}cos(kx)dx$$
with $k>0$

I know there are a number of ways, but I'm interested in using complex integration. In particular, I believe that we can solve by integrating $e^{-z^2}$ over the boundary of the rectangule $[-R,R]\times[0,h]$ for a suitable $h$.
What $h$ do you think i should use?

A very comfortable way is the use of the Laplace Transform, using the relation...

$\displaystyle \mathcal{L} \{e^{- t^{2}}\}= \frac{\sqrt{\pi}}{2}\ e^{\frac{s^{2}}{4}}\ \text{erfc} (\frac{s}{2})$ (1)

... obtaining...

$\displaystyle \int_{0}^{\infty} e^{- t^{2}} \cos k t\ dt = \frac{\sqrt{\pi}}{2}\ e^{- \frac{k^{2}}{4}}\ \text{Re} \{ \text{erfc} (\frac{i\ k}{2})\} = \frac{\sqrt{\pi}}{2}\ e^{- \frac{k^{2}}{4}}$ (2)

Kind regards$\chi$ $\sigma$
 
Last edited:
my solution:
let $\gamma_R$ be the boundary of the rectangle $[-R,R]\times[0,h]$,for $h$ to determine. Let $f(z)=e^{-z^2}$. Thus
$$\oint_{\gamma_R}f(z)dz=0$$
...but we also have

$$\oint_{\gamma_R}f(z)dz=\oint_{\gamma_1}f +\oint_{\gamma2}f+\oint_{\gamma3}f+\oint_{\gamma_4}f$$
where $\gamma_1(t)=t,t\in[-R,R]$, $\gamma_2(t)=R+ti,t\in[0,h]$ ,$-\gamma_3(t)=t+hi,t\in[-R,R]$ and $-\gamma_4(t)=-R+ti,t\in[0,h]$
Hence we have

$$\oint_{\gamma_1} e^{-z^2}dz=\int_{-R}^{R}e^{-t^2}dt$$

$$\oint_{\gamma_3}e^{-z^2}dz=-\int_{-R}^{R}e^{-(t+hi)^2}dt=-e^{h^2}\int_{-R}^{R}e^{-t^2}e^{i(-2ht)}dt$$

Using the fact that sine is odd, the second integral is

$$-e^{h^2}\int_{-R}^{R}e^{-t^2}cos(2ht)dt$$

Now, settin $I_j=\oint_{\gamma_j}$ , $I$=the integral we want to compute, and choosing $h=\frac{k}{2}$ we have

$0=\int_{-R}^{R}e^{-t^2}dt +I_2+I_4-e^{\frac{k^2}{4}}\int_{-R}^{R}e^{-t^2}cos(kt)dt$

Claim: $I_2$ and $I_4$ go to zero for $r$ going to infinite. If so, passing to the limit i get

$$\sqrt\pi-e^{\frac{k^2}{4}}I=0$$
from which
$I=\frac{\sqrt\pi}{2}e^{-\frac{k^2}{4}}$
So we are left to prove:
1)$I_2$ and $I_4$ tends to zero as $R\rightarrow\infty$

2)$\int_{-\infty}^{\infty}e^{-t^2}dt=\sqrt{\pi}$
 
Last edited:
pantboio said:
$$\int_0^\infty e^{-x^2}cos(kx)dx$$
with $k>0$

First: why k > 0 ?

second : I will try to solve it and confirm your result , which is surely correct .

\int_0^\infty e^{-x^2}cos(kx)dx

I will use the substitution x^2 = t

\int_0^\infty e^{-t}\frac{cos(k\sqrt{t})}{2\sqrt{t}}dt\int_0^\infty e^{-t}\, \frac{\sum^{\infty}_{n=0}\, \frac{(-1)^n(k\sqrt{t})^{2n}}{(2n)!}}{2\sqrt{t}}dt

\frac{1}{2}\int_0^\infty e^{-t}\, \sum^{\infty}_{n=0} \frac{(-1)^n k^{2n}t^{n-\frac{1}{2}}}{(2n)!}\,dt\frac{1}{2}\sum^{\infty}_{n=0} \frac{(-1)^n k^{2n}}{(2n)!}\,\int_0^\infty e^{-t}t^{n-\frac{1}{2}}\, \,dt

\frac{1}{2}\sum^{\infty}_{n=0} \frac{(-1)^n k^{2n}\Gamma{(n+\frac{1}{2})}}{(2n)!}

\frac{1}{2}\sum^{\infty}_{n=0} \frac{(-1)^n k^{2n}\frac{2^{1-2n}\sqrt{\pi}\Gamma{(2n)}}{\Gamma{(n)}}}{(2n)!}\,

\frac{1}{2}\sum^{\infty}_{n=0} \frac{2\sqrt{\pi}(-k^2)^{n}\Gamma{(2n)}}{4^n(2n)!\Gamma{(n)}}\, \,

\frac{1}{2}\sum^{\infty}_{n=0} \frac{2\sqrt{\pi}(-k^2)^{n}(2n-1)!}{(2n)4^n(2n-1)!(n-1)!}\, \,

\frac{1}{2}\sum^{\infty}_{n=0} \frac{\sqrt{\pi}(-\frac{k^2}{4})^{n}}{(n!)}\, \,= \frac{\sqrt{\pi}}{2}e^{-\frac{k^2}{4}}

Clearly we don't need the condition k>0 !
 
topsquark said:
Personally I wouldn't use the rectangle. I'd note that the integrand is even so
\int_0^{\infty} e^{-z^2}cos(kz)~dz = \frac{1}{2}\int_{-\infty}^{\infty} e^{-z^2}cos(kz)~dz
and integrate over the upper half plane. (The circular part goes to zero by Jordan's lemma.)

-Dan

How , would you please illustrate ?
 
ZaidAlyafey said:
How , would you please illustrate ?
Let's take a contour such that we include the whole real axis (from -infinity to infinity) and close it off with a semi-circle going from infinity to -infinty. Of course we really have a half-circle with radius R and we take the limit of R as it goes to infinity at the end.

So the integral will be composed of two parts: the real line and the semi-circle. So we have:

\int_c = \int_{-\infty}^{\infty} + \int_{R} = 2 \pi i \sum \text{residues in upper half plane}

The nice thing about this is that the integral over the semi-circle goes to zero by Jordan's Lemma. So all you are left with calculating the residues in the upper half plane.

-Dan
 
topsquark said:
Let's take a contour such that we include the whole real axis (from -infinity to infinity) and close it off with a semi-circle going from infinity to -infinty. Of course we really have a half-circle with radius R and we take the limit of R as it goes to infinity at the end.

So the integral will be composed of two parts: the real line and the semi-circle. So we have:

\int_c = \int_{-\infty}^{\infty} + \int_{R} = 2 \pi i \sum \text{residues in upper half plane}

The nice thing about this is that the integral over the semi-circle goes to zero by Jordan's Lemma. So all you are left with calculating the residues in the upper half plane.

-Dan

Well, that is not completely correct , first you have to prove that the integral over the semi-circle is zero . Second, the function $e^{-z^2}\cos(kz) $ is entire that means if we enclose it by any simply-connected contour the integral is zero . Actually there are no residues since the function has no singularities so if what you are implying is correct then $\int_c = \int_{-\infty}^{\infty} +0 =0$ that means the integral is equal to zero !
 
ZaidAlyafey said:
Well, that is not completely correct , first you have to prove that the integral over the semi-circle is zero . Second, the function $e^{-z^2}\cos(kz) $ is entire that means if we enclose it by any simply-connected contour the integral is zero . Actually there are no residues since the function has no singularities so if what you are implying is correct then $\int_c = \int_{-\infty}^{\infty} +0 =0$ that means the integral is equal to zero !
Hmmmm...maybe I need to brush up on Jordan's lemma.

-Dan
 
  • #10
The integral may be rewritten as

$$ \begin{aligned} I=\int_0^\infty e^{-x^2}\cos(kx) dx &= \frac{1}{2}\int_{-\infty}^{\infty} e^{-x^2}\cos(kx) dx \\ &= \frac{1}{2} \text{Re} \left[\int_{-\infty}^{\infty} e^{-x^2+ikx} dx\right]\end{aligned}$$

Here, we can use the general formula

$$ \int_{-\infty}^\infty e^{-x^2+bx+c}dx = \sqrt{\pi} e^{b^2/4+c}$$

with $b=ik$ and $c=0$.

$$ I =\frac{1}{2} \text{Re} \left[\sqrt{\pi} e^{-k^2/4}\right] = \frac{\sqrt{\pi}}{2} e^{-k^2/4}$$

The formula, I have used can be proved in the following manner:

$$
\begin{aligned}
\int_{-\infty}^\infty e^{-x^2+bx+c}dx &= \int_{-\infty}^{\infty} \exp \left\{{-\left( x^2-bx+\frac{b^2}{4}-c-\frac{b^2}{4}\right)} \right\}dx \\
&= e^{b^2/4+c} \int_{-\infty}^\infty e^{-(x-b/2)^2}dx \\
&= \sqrt{\pi} e^{b^2/4+c}
\end{aligned}
$$

The last integral has been done with the substitution $t=x-b/2$.
 
  • #11
sbhatnagar said:
The formula, I have used can be proved in the following manner:

$$
\begin{aligned}
\int_{-\infty}^\infty e^{-x^2+bx+c}dx &= \int_{-\infty}^{\infty} \exp \left\{{-\left( x^2-bx+\frac{b^2}{4}-c-\frac{b^2}{4}\right)} \right\}dx \\
&= e^{b^2/4+c} \int_{-\infty}^\infty e^{-(x-b/2)^2}dx \\
&= \sqrt{\pi} e^{b^2/4+c}
\end{aligned}
$$

The last integral has been done with the substitution $t=x-b/2$.

This is not enough to deduce that the formula can be analytically continued to be used for b is complex .
 
Last edited:
  • #12
sbhatnagar said:
$$
\begin{aligned}
\int_{-\infty}^\infty e^{-x^2+bx+c}dx &= \int_{-\infty}^{\infty} \exp \left\{{-\left( x^2-bx+\frac{b^2}{4}-c-\frac{b^2}{4}\right)} \right\}dx \\
&= e^{b^2/4+c} \int_{-\infty}^\infty e^{-(x-b/2)^2}dx \\
&= \sqrt{\pi} e^{b^2/4+c}
\end{aligned}
$$

The last integral has been done with the substitution $t=x-b/2$.

So we have the integral $ \int_{-\infty}^\infty e^{-(x-b/2)^2}dx$

Now if we assume that b is complex the substitution you made is a bit tricky .why ?
Assume that $b= ic $ for simplicity Re(b)=0 .
So let us make the substitution $t= x-\frac{b}{2}= x-\frac{ic}{2}$ but we know that when making a substitution this applies to the bounds of integration as well , but wait how do we do that ?
Well, the limits of integration after substitution will not still be the same so they will change.

$$\lim_{R\to \infty }\int^{R-\frac{ic}{2}}_{-R-\frac{ic}{2}}e^{-t^2}\, dt$$

Now this looks familiar in the complex plane it is an integration a long a closed rectangle contour the has and infinite width along the x-axis and a height equal to c/2 .
To solve this we apply the method that pantboio described earlier which is a contour integration .
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 29 ·
Replies
29
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 27 ·
Replies
27
Views
3K