Have fun with integral

Calculus Level 4

Evaluate 0 e x 2 cos 2 x d x \int_0^{\infty}e^{-x^2}\cos 2x\, dx


The answer is 0.326024666086646.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

Chew-Seong Cheong
Jul 27, 2018

I = 0 e x 2 cos ( 2 x ) d x By Euler’s formula = 0 e x 2 e 2 x i + e 2 x i 2 d x = 1 2 0 ( e ( i x + 1 ) 2 1 + e ( i x 1 ) 2 1 ) d x erfi ( z ) = 2 π e z 2 d z = π 4 e i ( erfi ( i x + 1 ) + erfi ( i x 1 ) ) 0 Note that erfi ( z ) = i erf ( i z ) = π 4 e i ( i erf ( x + i ) i erf ( x i ) ) 0 = π 4 e ( 1 + erf ( i ) + 1 + erf ( i ) ) = π 4 e ( 2 + i erf ( 1 ) i erf ( 1 ) ) = π 2 e 0.326 \begin{aligned} I &= \int_0^\infty e^{-x^2}{\color{#3D99F6}\cos (2x)} \ dx & \small \color{#3D99F6} \text{By Euler's formula} \\ &= \int_0^\infty e^{-x^2}\cdot {\color{#3D99F6} \frac{e^{2xi}+e^{-2xi}}2} \ dx \\ &= \frac 12 \int_0^\infty \left(e^{(ix+1)^2-1} + e^{(ix-1)^2-1} \right) dx & \small \color{#3D99F6} \text{erfi }(z) = \frac 2 {\sqrt \pi}\int e^{z^2}dz \\ &= \frac {\sqrt \pi}{4ei}(\text{erfi }(ix+1)+ \text{erfi }(ix-1))\bigg|_0^\infty & \small \color{#3D99F6} \text{Note that }\text{erfi }(z) = -i\text {erf }(iz) \\ &= \frac {\sqrt \pi}{4ei}(-i\text{erf }(-x+i) - i \text{erf }(-x-i))\bigg|_0^\infty \\ &= \frac {\sqrt \pi}{4e}(1 + \text{erf }(i) +1 + \text{erf }(-i)) \\ &= \frac {\sqrt \pi}{4e}(2 + i\text{erf }(1) -i \text{erf }(1)) \\ &= \frac {\sqrt \pi}{2e} \approx \boxed{0.326} \end{aligned}

Brian Moehring
Jul 27, 2018

Relevant wiki: Contour Integration

Since the integrand is even 0 e x 2 cos 2 x d x = 1 2 e x 2 cos 2 x d x \int_0^\infty e^{-x^2}\cos 2x\,dx = \frac{1}{2} \int_{-\infty}^\infty e^{-x^2}\cos 2x\,dx and since cos 2 x = Re [ e 2 i x ] \cos 2x = \text{Re}[e^{2ix}] , 1 2 e x 2 cos 2 x d x = 1 2 Re e x 2 + 2 i x d x = 1 2 e Re e ( x i ) 2 d x \frac{1}{2} \int_{-\infty}^\infty e^{-x^2}\cos 2x\,dx = \frac{1}{2} \text{Re} \int_{-\infty}^\infty e^{-x^2 + 2ix}\,dx = \frac{1}{2e} \text{Re} \int_{-\infty}^\infty e^{-(x-i)^2}\,dx

Now, e z 2 e^{-z^2} is entire and it goes to zero uniformly on Re [ z ] = ± R , 1 Im [ z ] 0 \text{Re}[z] = \pm R, \quad -1 \leq \text{Im}[z] \leq 0 as R R\to\infty , so we can conclude by contour integration around the rectangle with vertices ± R , ± R i \pm R, \pm R - i that e ( x i ) 2 d x = e x 2 d x \int_{-\infty}^\infty e^{-(x-i)^2}\,dx = \int_{-\infty}^\infty e^{-x^2}\,dx

This last integral is real-valued, so the integral in question equals 1 2 e e x 2 d x = 1 2 e π 0.326024666 \frac{1}{2e} \int_{-\infty}^\infty e^{-x^2}\,dx = \frac{1}{2e} \cdot \sqrt{\pi} \approx \boxed{0.326024666}

Leonel Castillo
Aug 24, 2018

Solution without complex numbers:

A problem like this is clearly meant to be solved by relating it to the Gaussian integral. However, the connection is not obvious so let's try the following standard trick: Let F ( t ) = 0 e x 2 cos ( 2 t x ) d x F(t) = \int_0^{\infty} e^{-x^2} \cos (2tx) dx . Then F ( t ) = 0 e x 2 ( 2 x sin ( 2 t x ) ) d x = 0 2 x e x 2 sin ( 2 t x ) d x F'(t) = \int_0^{\infty} e^{-x^2} (-2x \sin(2tx)) dx = \int_0^{\infty} -2xe^{-x^2} \sin(2tx) dx . The previous form makes an integration by parts obvious: let u = sin ( 2 t x ) d u = 2 t cos ( 2 t x ) u = \sin (2tx) \implies du = 2t \cos (2tx) and d v = 2 x e x 2 v = e x 2 dv = -2xe^{-x^2} \implies v = e^{-x^2} . Thus:

F ( t ) = sin ( 2 t x ) e x 2 0 0 e x 2 2 t cos ( 2 t x ) = 0 2 t 0 e x 2 cos ( 2 t x ) = 2 t F ( t ) F'(t) = \sin(2tx) e^{-x^2} \Big|_0^{\infty} - \int_0^{\infty} e^{-x^2} 2t \cos(2tx) = 0 - 2t \int_0^{\infty} e^{-x^2} \cos(2tx) = -2t F(t) This is now a differential equation that can be solved through standard methods: F ( t ) = 2 t F ( t ) F ( t ) F ( t ) = 2 t log F ( t ) = t 2 + C F ( t ) = k e t 2 F'(t) = -2tF(t) \implies \frac{F'(t)}{F(t)} = -2t \implies \log F(t) = -t^2 + C \implies F(t) = k e^{-t^2}

We only need to find the constant k k but notice that k = k e 0 2 = F ( 0 ) = 0 e x 2 d x = π 2 k = k e^{-0^2} = F(0) = \int_0^{\infty} e^{-x^2} dx = \frac{\sqrt{\pi}}{2} . Thus, F ( t ) = π 2 e t 2 F(t) = \frac{\sqrt{\pi}}{2} e^{-t^2} . For the problem, we care about F ( 1 ) = π 2 e F(1) = \frac{\sqrt{\pi}}{2e}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...