Welcome to our community

Be a part of something great, join today!

Solve the following integral without complex analysis:

ZaidAlyafey

Well-known member
MHB Math Helper
Jan 17, 2013
1,667
\[\int^{\infty}_{0} \frac{\cos(x) }{1+x^2}\,dx\]

I know it can be solved by fourier transform and also by residues , but my teacher
asked me to solve it by not using transformation or complex analysis (Happy)
 
Last edited by a moderator:

topsquark

Well-known member
MHB Math Helper
Aug 30, 2012
1,123
$\int^{\infty}_{0} \frac{\cos(x) }{1+x^2}$

I know it can be solved by fourier transform and also by residues , but my teacher
asked me to solve it by not using transformation or complex analysis (Happy)
Try integration by parts twice.

Warning: There are some limits that come up which I think can be removed. But I didn't check that in detail.

-Dan
 

ZaidAlyafey

Well-known member
MHB Math Helper
Jan 17, 2013
1,667
Try integration by parts twice.

-Dan
Is this just a suggestion , or does it really work because it doesn't get any simper ?

Warning: There are some limits that come up which I think can be removed. But I didn't check that in detail.

-Dan
I don't get what you mean ?
 

Sherlock

Member
Jan 28, 2012
59
$\displaystyle \int^{\infty}_{0} \frac{\cos(x) }{1+x^2}\;{dx}$
Let $\displaystyle I(\lambda) = \int_{0}^{\infty}\frac{\sin(\lambda x)}{x(1+x^2)}\;{dx} ~~ (\lambda > 0). $ Differentiating this w.r.t. $\lambda$ we have $\displaystyle I'(\lambda) = \int^{\infty}_{0} \frac{\cos(\lambda x) }{1+x^2}\;{dx}.$

Also $\displaystyle I''(\lambda) = -\int_{0}^{\infty}\frac{x\sin(\lambda x)}{1+x^2}\;{dx}$ thus $\displaystyle I(\lambda)-I''(\lambda) =\int_{0}^{\infty}\frac{(1+x^2) \sin( \lambda x)}{x(1+x^2)}\;{dx} = \int_{0}^{\infty} \frac{\sin(\lambda x)}{x}\;{dx}.$

Letting $\displaystyle t = \lambda x$ we have $\displaystyle \int_{0}^{\infty} \frac{\sin(\lambda x)}{x}\;{dx} = \int_{0}^{\infty} \frac{\sin{t}}{t}\;{dt} = \frac{\pi}{2}$ (well-known). Hence $\displaystyle I(\lambda)-I''(\lambda) = \frac{\pi}{2}$.



Solving $ I''(\lambda)-I(\lambda)+\frac{\pi}{2} =0$ we get $ I(\lambda) = \mathcal{C}_{1}e^x+\mathcal{C}_{2}e^{-x}+\frac{\pi}{2}$. From the integral we observe that $I(0) = 0$, thus we have $ 0 = \mathcal{C}_{1}+\mathcal{C}_{2}+\frac{\pi}{2}$ so $\mathcal{C}_{1}+\mathcal{C}_{2} = -\frac{\pi}{2}$ (1). But also by differentiating we get $I'(\lambda) = \mathcal{C}_{1}e^x-\mathcal{C}_{2}e^{-x}$. From our integral we observe that $I'(0) = \frac{\pi}{2}$, and thus we have $ \mathcal{C}_{1}-\mathcal{C}_{2} = \frac{\pi}{2}$ (2). Adding (1) and (2) we have $\mathcal{C}_{1} = 0$ and/so $\mathcal{C}_{2} = -\frac{\pi}{2}$. Hence $\displaystyle I'(\lambda) = \frac{\pi}{2e^{\lambda}}$, thus:

$$\displaystyle \int^{\infty}_{0} \frac{\cos(x) }{1+x^2} = \frac{\pi}{2e}. $$
 
Last edited:

Ackbach

Indicium Physicus
Staff member
Jan 26, 2012
4,193
Let $\displaystyle I(\lambda) = \int_{0}^{\infty}\frac{\sin(\lambda x)}{x(1+x^2)}\;{dx} ~~ (\lambda > 0). $. Differentiating this w.r.t. $\lambda$ we have $\displaystyle I'(\lambda) = \int^{\infty}_{0} \frac{\cos(\lambda x) }{1+x^2}\;{dx}.$

Also $\displaystyle I''(\lambda) = -\int_{0}^{\infty}\frac{x\sin(\lambda x)}{1+x^2}\;{dx}$ thus $\displaystyle I(\lambda)-I''(\lambda) =\int_{0}^{\infty}\frac{(1+x^2) \sin( \lambda x)}{x(1+x^2)}\;{dx} = \int_{0}^{\infty} \frac{\sin(\lambda x)}{x}\;{dx}.$

Letting $\displaystyle t = \lambda x$ we have $\displaystyle \int_{0}^{\infty} \frac{\sin(\lambda x)}{x}\;{dx} = \int_{0}^{\infty} \frac{\sin{t}}{t}\;{dt} = \frac{\pi}{2}$ (well-known). Hence $\displaystyle I(\lambda)-I''(\lambda) = \frac{\pi}{2}$.



Solving $ I''(\lambda)-I(\lambda)+\frac{\pi}{2} =0$ we get $ I(\lambda) = \mathcal{C}_{1}e^x+\mathcal{C}_{2}e^{-x}+\frac{\pi}{2}$. From the integral we observe that $I(0) = 0$, thus we have $ 0 = \mathcal{C}_{1}+\mathcal{C}_{2}+\frac{\pi}{2}$ so $\mathcal{C}_{1}+\mathcal{C}_{2} = -\frac{\pi}{2}$ (1). But also by differentiating we get $I'(\lambda) = \mathcal{C}_{1}e^x-\mathcal{C}_{2}e^{-x}$. From our integral we observe that $I'(0) = \frac{\pi}{2}$, and thus we have $ \mathcal{C}_{1}-\mathcal{C}_{2} = \frac{\pi}{2}$ (2). Adding (1) and (2) we have $\mathcal{C}_{1} = 0$ and/so $\mathcal{C}_{2} = -\frac{\pi}{2}$. Hence $\displaystyle I'(\lambda) = \frac{\pi}{2e^{\lambda}}$, thus:

$$\displaystyle \int^{\infty}_{0} \frac{\cos(x) }{1+x^2} = \frac{\pi}{2e}. $$
Feynman would be proud - differentiating under the integral sign!
 

topsquark

Well-known member
MHB Math Helper
Aug 30, 2012
1,123
I don't get what you mean ?
Well, I like Sherlock's method better, but here's a bit more on the integration by parts.

Obviously
[tex]\int_a^b p~dq = pq |_a^b - \int_a^b q~dp[/tex]

There will be two limits [tex]cos(x)atan(x)|_0^{\infty}[/tex] and [tex]sin(x)atan(x)|_0^{\infty}[/tex]

I didn't check these limits to see if they actually cancel out. (I still didn't. Lazy again.)

-Dan

Ach-choo: You say that like it's a bad thing...
 

ZaidAlyafey

Well-known member
MHB Math Helper
Jan 17, 2013
1,667
Ok , I will show the other two methods .

First : By residues :

[tex]\int^{\infty}_0 \frac{\cos(x) }{x^2+1}=\frac{1}{2}\int^{\infty}_{-\infty} \frac{\cos(x) }{x^2+1}=\mathcal{Re}( \frac{1}{2}\int^{\infty}_{-\infty} \frac{e^{iz} }{z^2+1})[/tex]

By drawing a sermi-circle in the upper half plane we get the following :

[tex]\frac{1}{2}\int^{\infty}_{-\infty} \frac{e^{ix} }{x^2+1}= \pi i \mathcal{Rez}(f(z) ,i )[/tex]

[tex]\pi i (\frac{e^{iz}}{2z}|_{z=i})= \pi i \frac{e^{-1}}{2i}= \frac{\pi}{2e}[/tex]
 

Sherlock

Member
Jan 28, 2012
59
I'm looking forward to the Fourier transform method (unless you meant Laplace (Giggle)).
 

ZaidAlyafey

Well-known member
MHB Math Helper
Jan 17, 2013
1,667
Second by the Fourier integral :

[tex]f(x)= \int^{\infty}_0 A(\lambda) \cos(\lambda x)d\lambda +\int^{\infty}_0 B(\lambda) \sin(\lambda x)d\lambda[/tex] -----(1)

[tex]f(x) = \begin{cases}e^{-x} &; \mbox{if } x > 0 \\e^{x} &; \mbox{if } x<0 \\1 &; \mbox{if } x=0\end{cases}[/tex]

[tex]A(\lambda)= \frac{1}{\pi}\int^{\infty}_{-\infty}\, f(x)\, \cos(\lambda x)dx[/tex]

Now since f(x) is an even function :

[tex]A(\lambda)= \frac{2}{\pi}\int^{\infty}_{0}\, e^{-x}\, \cos(\lambda x)dx =\frac{ 2\mathcal{L}(\cos(\lambda x))}{\pi}= \frac{2}{\pi(x^2+\lambda^2)}[/tex]

[tex]B(\lambda)=\int^{\infty}_{-\infty} f(x) \sin(\lambda x)dx=0[/tex]

By evenness the upper integral is zero .

substituting in ---(1) we get the following :


[tex]e^{-x}= \int^{\infty}_0 \frac{2\cos(\lambda x)}{\pi(x^2+\lambda^2)}d\lambda \,\, \, x>0[/tex]

Now putting x =1 we get the following :

[tex]e^{-1}= \frac{2}{\pi}\int^{\infty}_0 \frac{\cos(\lambda)}{(1+\lambda^2)}d\lambda[/tex]

[tex]\int^{\infty}_0 \frac{\cos(x)}{(1+x^2)}dx= \frac{\pi}{2e}[/tex]
 
Last edited:

ZaidAlyafey

Well-known member
MHB Math Helper
Jan 17, 2013
1,667
I'm looking forward to the Fourier transform method (unless you meant Laplace (Giggle)).
I always think that Laplace transform is a special case of the general Fourier transform .