Definite Integral

Calculus Level 5

Compute the following:

0 cos ( 2 x ) 4 + x 2 d x \int\limits_0^{\infty} \frac{\cos(2x)}{4+x^2} \,\mathrm dx

Give your answer to 4 significant figures.


The answer is 0.01438506914.

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.

1 solution

Tunk-Fey Ariawan
Feb 28, 2014

This problem has been bugging me since yesterday because I couldn't solve it using 'standard' methods like: IBP, algebra manipulations, substitution methods, integration by reduction formulae, or infinite series. If someone here could solve it by using 'standard' methods, I wish you'd be so kind enough to share with me. Anyway, I solved this problem by using integral Fourier transform . Other methods to solve it are using exponential integral, sine or cosine integral, contour integral, and residual theorem, but I'm not familiar with those methods. Consider the function f ( t ) = e a t f(t)=e^{-a|t|} , then the Fourier transform of f ( t ) f(t) is given by F ( ω ) = F [ f ( t ) ] = f ( t ) e i ω t d t = e a t e i ω t d t = 0 e a t e i ω t d t + 0 e a t e i ω t d t = lim u e ( a i ω ) t a i ω t = u 0 lim v e ( a + i ω ) t a + i ω 0 t = v = 1 a i ω + 1 a + i ω = 2 a ω 2 + a 2 . \begin{aligned} F(\omega)=\mathcal{F}[f(t)]&=\int_{-\infty}^{\infty}f(t)e^{-i\omega t}\,dt\\ &=\int_{-\infty}^{\infty}e^{-a|t|}e^{-i\omega t}\,dt\\ &=\int_{-\infty}^{0}e^{at}e^{-i\omega t}\,dt+\int_{0}^{\infty}e^{-at}e^{-i\omega t}\,dt\\ &=\lim_{u\to-\infty}\left. \frac{e^{(a-i\omega)t}}{a-i\omega} \right|_{t=u}^0-\lim_{v\to\infty}\left. \frac{e^{-(a+i\omega)t}}{a+i\omega} \right|_{0}^{t=v}\\ &=\frac{1}{a-i\omega}+\frac{1}{a+i\omega}\\ &=\frac{2a}{\omega^2+a^2}. \end{aligned} Next, the inverse Fourier transform of F ( ω ) F(\omega) is f ( t ) = F 1 [ F ( ω ) ] = 1 2 π F ( ω ) e i ω t d ω e a t = 1 2 π 2 a ω 2 + a 2 e i ω t d ω π e a t a = e i ω t ω 2 + a 2 d ω . ( 1 ) \begin{aligned} f(t)=\mathcal{F}^{-1}[F(\omega)]&=\frac{1}{2\pi}\int_{-\infty}^{\infty}F(\omega)e^{i\omega t}\,d\omega\\ e^{-a|t|}&=\frac{1}{2\pi}\int_{-\infty}^{\infty}\frac{2a}{\omega^2+a^2}e^{i\omega t}\,d\omega\\ \frac{\pi e^{-a|t|}}{a}&=\int_{-\infty}^{\infty}\frac{e^{i\omega t}}{\omega^2+a^2}\,d\omega.\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;(1) \end{aligned} Now, rewrite 0 cos 2 x x 2 + 4 d x = 1 2 R e ( e 2 i x ) x 2 + 2 2 d x . ( 2 ) \int_0^{\infty}\frac{\cos2x}{x^2+4}\,dx=\frac{1}{2}\int_{-\infty}^{\infty}\frac{\mathbb{Re}\left(e^{2ix}\right)}{x^2+2^2}\,dx.\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;(2) Comparing ( 2 ) (2) to ( 1 ) (1) yield t = 2 t=2 and a = 2 a=2 . Thus, 0 cos 2 x x 2 + 4 d x = 1 2 π e 2 2 2 = π 4 e 4 0.0143851 \begin{aligned} \int_0^{\infty}\frac{\cos2x}{x^2+4}\,dx &=\frac{1}{2}\frac{\pi e^{-2\cdot|2|}}{2}\\ &=\frac{\pi}{4e^4}\\ &\approx\boxed{0.0143851} \end{aligned} U P D A T E : \mathbf{UPDATE: } Finally, I found how to solve this integral by using the 'standard' method. Note that: y = 0 e ( x 2 + 4 ) y d y = 1 x 2 + 4 , \int_{y=0}^\infty e^{-(x^2+4)y}\,dy=\frac{1}{x^2+4}, therefore x = 0 y = 0 e ( x 2 + 4 ) y cos 2 x d y d x = 0 cos 2 x x 2 + 4 d x \int_{x=0}^\infty\int_{y=0}^\infty e^{-(x^2+4)y}\cos2x\,dy\,dx=\int_0^{\infty}\frac{\cos2x}{x^2+4}\,dx Rewrite cos 2 x = R e ( e 2 i x ) \cos2x=\mathbb{Re}\left(e^{-2ix}\right) , then 0 cos 2 x x 2 + 4 d x = x = 0 y = 0 e ( x 2 + 4 ) y cos 2 x d y d x = y = 0 x = 0 e ( y x 2 + 2 i x + 4 y ) d x d y = y = 0 e 4 y x = 0 e ( y x 2 + 2 i x ) d x d y . \begin{aligned} \int_0^{\infty}\frac{\cos2x}{x^2+4}\,dx&=\int_{x=0}^\infty\int_{y=0}^\infty e^{-(x^2+4)y}\cos2x\,dy\,dx\\ &=\int_{y=0}^\infty\int_{x=0}^\infty e^{-(yx^2+2ix+4y)}\,dx\,dy\\ &=\int_{y=0}^\infty e^{-4y} \int_{x=0}^\infty e^{-(yx^2+2ix)}\,dx\,dy. \end{aligned} In general x = 0 e ( a x 2 + b x ) d x = x = 0 exp ( a ( ( x + b 2 a ) 2 b 2 4 a 2 ) ) d x = exp ( b 2 4 a ) x = 0 exp ( a ( x + b 2 a ) 2 ) d x \begin{aligned} \int_{x=0}^\infty e^{-(ax^2+bx)}\,dx&=\int_{x=0}^\infty \exp\left(-a\left(\left(x+\frac{b}{2a}\right)^2-\frac{b^2}{4a^2}\right)\right)\,dx\\ &=\exp\left(\frac{b^2}{4a}\right)\int_{x=0}^\infty \exp\left(-a\left(x+\frac{b}{2a}\right)^2\right)\,dx\\ \end{aligned} Let u = x + b 2 a d u = d x u=x+\frac{b}{2a}\;\rightarrow\;du=dx , then x = 0 e ( a x 2 + b x ) d x = exp ( b 2 4 a ) x = 0 exp ( a ( x + b 2 a ) 2 ) d x = exp ( b 2 4 a ) u = 0 e a u 2 d u . \begin{aligned} \int_{x=0}^\infty e^{-(ax^2+bx)}\,dx&=\exp\left(\frac{b^2}{4a}\right)\int_{x=0}^\infty \exp\left(-a\left(x+\frac{b}{2a}\right)^2\right)\,dx\\ &=\exp\left(\frac{b^2}{4a}\right)\int_{u=0}^\infty e^{-au^2}\,du.\\ \end{aligned} The last form integral is Gaussian integral that equals to 1 2 π a \frac{1}{2}\sqrt{\frac{\pi}{a}} . Hence x = 0 e ( a x 2 + b x ) d x = 1 2 π a exp ( b 2 4 a ) . \int_{x=0}^\infty e^{-(ax^2+bx)}\,dx=\frac{1}{2}\sqrt{\frac{\pi}{a}}\exp\left(\frac{b^2}{4a}\right). Thus x = 0 e ( y x 2 + 2 i x ) d x = 1 2 π y exp ( ( 2 i ) 2 4 y ) = 1 2 π y exp ( 1 y ) . \int_{x=0}^\infty e^{-(yx^2+2ix)}\,dx=\frac{1}{2}\sqrt{\frac{\pi}{y}}\exp\left(\frac{(2i)^2}{4y}\right)=\frac{1}{2}\sqrt{\frac{\pi}{y}}\exp\left(-\frac{1}{y}\right). Next 0 cos 2 x x 2 + 4 d x = π 2 y = 0 exp ( 4 y 1 y ) y d y . \int_0^{\infty}\frac{\cos2x}{x^2+4}\,dx=\frac{\sqrt{\pi}}{2}\int_{y=0}^\infty \frac{\exp\left(-4y-\frac{1}{y}\right)}{\sqrt{y}}\,dy. In general y = 0 exp ( a y b y ) y d y = 2 v = 0 exp ( a v 2 b v 2 ) d v = 2 v = 0 exp ( a ( v 2 + b a v 2 ) ) d v = 2 v = 0 exp ( a ( v 2 2 b a + b a v 2 + 2 b a ) ) d v = 2 v = 0 exp ( a ( v 1 v b a ) 2 2 a b ) d v = 2 exp ( 2 a b ) v = 0 exp ( a ( v 1 v b a ) 2 ) d v \begin{aligned} \int_{y=0}^\infty \frac{\exp\left(-ay-\frac{b}{y}\right)}{\sqrt{y}}\,dy&=2\int_{v=0}^\infty \exp\left(-av^2-\frac{b}{v^2}\right)\,dv\\ &=2\int_{v=0}^\infty \exp\left(-a\left(v^2+\frac{b}{av^2}\right)\right)\,dv\\ &=2\int_{v=0}^\infty \exp\left(-a\left(v^2-2\sqrt{\frac{b}{a}}+\frac{b}{av^2}+2\sqrt{\frac{b}{a}}\right)\right)\,dv\\ &=2\int_{v=0}^\infty \exp\left(-a\left(v-\frac{1}{v}\sqrt{\frac{b}{a}}\right)^2-2\sqrt{ab}\right)\,dv\\ &=2\exp(-2\sqrt{ab})\int_{v=0}^\infty \exp\left(-a\left(v-\frac{1}{v}\sqrt{\frac{b}{a}}\right)^2\right)\,dv\\ \end{aligned} The trick to solve the last integral is by setting I = v = 0 exp ( a ( v 1 v b a ) 2 ) d v . I=\int_{v=0}^\infty \exp\left(-a\left(v-\frac{1}{v}\sqrt{\frac{b}{a}}\right)^2\right)\,dv. Let t = 1 v b a v = 1 t b a d v = 1 t 2 b a d t t=-\frac{1}{v}\sqrt{\frac{b}{a}}\;\rightarrow\;v=-\frac{1}{t}\sqrt{\frac{b}{a}}\;\rightarrow\;dv=\frac{1}{t^2}\sqrt{\frac{b}{a}}\,dt , then I t = b a t = 0 exp ( a ( 1 t b a + t ) 2 ) t 2 d t . I_t=\sqrt{\frac{b}{a}}\int_{t=0}^\infty \frac{\exp\left(-a\left(-\frac{1}{t}\sqrt{\frac{b}{a}}+t\right)^2\right)}{t^2}\,dt. Let t = v d t = d v t=v\;\rightarrow\;dt=dv , then I t = t = 0 exp ( a ( t 1 t b a ) 2 ) d t . I_t=\int_{t=0}^\infty \exp\left(-a\left(t-\frac{1}{t}\sqrt{\frac{b}{a}}\right)^2\right)\,dt. Adding the two I t I_t s yields 2 I = I t + I t = t = 0 ( 1 + 1 t 2 b a ) exp ( a ( t 1 t b a ) 2 ) d t . 2I=I_t+I_t=\int_{t=0}^\infty\left(1+\frac{1}{t^2}\sqrt{\frac{b}{a}}\right)\exp\left(-a\left(t-\frac{1}{t}\sqrt{\frac{b}{a}}\right)^2\right)\,dt. Let s = t 1 t b a d s = ( 1 + 1 t 2 b a ) d t s=t-\frac{1}{t}\sqrt{\frac{b}{a}}\;\rightarrow\;ds=\left(1+\frac{1}{t^2}\sqrt{\frac{b}{a}}\right)dt and for 0 < t < 0<t<\infty is corresponding to < s < -\infty<s<\infty , then I = 1 2 s = e a s 2 d s = 1 2 π a . I=\frac{1}{2}\int_{s=-\infty}^\infty e^{-as^2}\,ds=\frac{1}{2}\sqrt{\frac{\pi}{a}}. Thus y = 0 exp ( a y b y ) y d y = 2 exp ( 2 a b ) v = 0 exp ( a ( v 1 v b a ) 2 ) d v = π a e 2 a b \begin{aligned} \int_{y=0}^\infty \frac{\exp\left(-ay-\frac{b}{y}\right)}{\sqrt{y}}\,dy&=2\exp(-2\sqrt{ab})\int_{v=0}^\infty \exp\left(-a\left(v-\frac{1}{v}\sqrt{\frac{b}{a}}\right)^2\right)\,dv\\ &=\sqrt{\frac{\pi}{a}}e^{-2\sqrt{ab}}\\ \end{aligned} and 0 cos 2 x x 2 + 4 d x = π 2 y = 0 exp ( 4 y 1 y ) y d y = π 2 π 4 e 2 4 1 = π 4 e 4 . \begin{aligned} \int_0^{\infty}\frac{\cos2x}{x^2+4}\,dx&=\frac{\sqrt{\pi}}{2}\int_{y=0}^\infty \frac{\exp\left(-4y-\frac{1}{y}\right)}{\sqrt{y}}\,dy\\ &=\frac{\sqrt{\pi}}{2}\cdot\sqrt{\frac{\pi}{4}}e^{-2\sqrt{4\cdot1}}\\ &=\frac{\pi}{4e^4}. \end{aligned} # Q . E . D . # \text{\# }\mathbb{Q.E.D.}\text{ \#}

Great solution Tunk! Thumbs up for such an excellent write-up. :)

I myself approached it by noticing that 0 e ( x 2 + 4 ) y d y = 1 x 2 + 4 \int_0^{\infty} e^{-(x^2+4)y}\,dy=\frac{1}{x^2+4} . I am curious to know how others approached it.

Pranav Arora - 7 years, 3 months ago

Log in to reply

My approach is :

Let f ( a ) = 0 cos ( a x ) 1 + x 2 d x \displaystyle f(a) = \int _{ 0 }^{ \infty }{ \frac { \cos { (ax) } }{ 1+{ x }^{ 2 } } dx } , for positive a a

Differentiating it we have :

f ( a ) = 0 x sin ( a x ) 1 + x 2 d x \displaystyle f'(a) = -\int _{ 0 }^{ \infty }{ \frac { x\sin { (ax) } }{ 1+{ x }^{ 2 } } dx }

Integration f ( a ) f(a) by parts we have :

f ( a ) = sin ( a x ) a ( 1 + x 2 ) 0 + 2 a 0 x sin ( a x ) ( 1 + x 2 ) 2 d x = 2 a 0 x sin ( a x ) ( 1 + x 2 ) 2 d x \displaystyle f(a) = \frac { \sin { (ax) } }{ a(1+{ x }^{ 2 }) } { | }_{ 0 }^{ \infty }+\frac { 2 }{ a } \int _{ 0 }^{ \infty }{ \frac { x\sin { (ax) } }{ { (1+{ x }^{ 2 }) }^{ 2 } } dx } =\frac { 2 }{ a } \int _{ 0 }^{ \infty }{ \frac { x\sin { (ax) } }{ { (1+{ x }^{ 2 }) }^{ 2 } } dx }

a f ( a ) 2 = 0 x sin ( a x ) ( 1 + x 2 ) 2 d x \displaystyle \Rightarrow \frac{af(a)}{2} = \int _{ 0 }^{ \infty }{ \frac { x\sin { (ax) } }{ { (1+{ x }^{ 2 }) }^{ 2 } } dx }

Double differentiating both side with respect to a a we have :

a f ( a ) 2 + f ( a ) = 0 x 3 sin ( a x ) ( 1 + x 2 ) 2 d x \displaystyle \frac{af''(a)}{2}+f'(a) = -\int _{ 0 }^{ \infty }{ \frac { { x }^{ 3 }\sin { (ax) } }{ { (1+{ x }^{ 2 }) }^{ 2 } } dx }

It can be also written as :

a f ( a ) 2 + f ( a ) = 0 x sin ( a x ) 1 + x 2 d x + 0 x sin ( a x ) ( 1 + x 2 ) 2 d x \displaystyle \frac{af''(a)}{2}+f'(a) = -\int _{ 0 }^{ \infty }{ \frac { x\sin { (ax) } }{ 1+{ x }^{ 2 } } dx } +\int _{ 0 }^{ \infty }{ \frac { x\sin { (ax) } }{ { (1+{ x }^{ 2 }) }^{ 2 } } dx }

a f ( a ) 2 + f ( a ) = f ( a ) + a f ( a ) 2 \displaystyle \Rightarrow \frac { af''(a) }{ 2 } +f'(a)=f'(a)+\frac { af(a) }{ 2 }

Finally we have :

f ( a ) = f ( a ) \displaystyle f''(a)=f(a)

The solution of differential equation is :

f ( a ) = c 1 e a + c 2 e a \displaystyle f(a) = {c}_{1}{e}^{a}+{c}_{2}{e}^{-a}

It is easy to check that f ( 0 ) = π 2 f(0)=\dfrac{\pi}{2}

Now f ( a ) = 0 x sin ( a x ) 1 + x 2 d x = 0 x sin ( x ) a 2 + x 2 d x \displaystyle f'(a) = -\int _{ 0 }^{ \infty }{ \frac { x\sin { (ax) } }{ 1+{ x }^{ 2 } } dx } =-\int _{ 0 }^{ \infty }{ \frac { x\sin { (x) } }{ { a }^{ 2 }+{ x }^{ 2 } } dx }

That also proves that f ( 0 ) = 0 sin ( x ) x d x = π 2 \displaystyle f'(0) = -\int _{ 0 }^{ \infty }{ \frac { \sin { (x) } }{ x } dx } =-\frac { \pi }{ 2 }

So with these set of initial values we can establish that :

f ( a ) = π 2 e a \displaystyle f(a) = \frac { \pi }{ 2{ e }^{ a } }

Coming back to the problem :

The integral to be calculated can be written as :

I = 1 2 0 cos ( 4 x ) x 2 + 1 d x \displaystyle I = \frac { 1 }{ 2 } \int _{ 0 }^{ \infty }{ \frac { \cos { (4x) } }{ { x }^{ 2 }+1 } dx }

Using the result I have just used gets us :

I = π 4 e 4 \displaystyle I = \frac { \pi }{ 4{ e }^{ 4 } }

Ronak Agarwal - 5 years, 5 months ago

Log in to reply

Ya I too did the same.

Spandan Senapati - 4 years ago

my answer was 0.14

Parth Lohomi - 6 years, 10 months ago

Like many other seemingly classically intractable real integrals, this integral can also be evaluated easily (in two to three lines) using complex analytical methods and in particular using Cauchy's integral formula . I would encourage you all to read the wikipedia article and study the example given there. Now can you think of a suitable contour to evaluate the integral in question here ? You might need to take a sequence of contours and evaluate it in the limit.

Abhishek Sinha - 7 years, 2 months ago

Log in to reply

Come on Abhishek!? I think complex integral that involves residual theorem or contour is still too complicated for most of members here. That's why I use a 'standard' method to solve it. :)

Tunk-Fey Ariawan - 7 years, 2 months ago

Log in to reply

Hi Mr. @Tunk-Fey Ariawan ! Please clarify this for me: when you made the substitution u = x + b 2 a u=x+\frac{b}{2a} to get the Gaussian integral, you didn't change the limits of integration. I think the whole answer is a coincidence that it gave the correct answer, right?

Hasan Kassim - 6 years, 7 months ago

Log in to reply

@Hasan Kassim Finally, someone here notice this. I've been waiting for so long time. :D

It's not a coincidence, in fact this is true if we first consider the bounds from -\infty to \infty , it can be justified since the integrand is an even function. Nice catch! :)

Tunk-Fey Ariawan - 6 years, 7 months ago

wow! pretty cool solutions! XD

Kentucky Potrido - 6 years, 11 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...