# Thread: Yet another integral challenge question

1. ## Yet another integral challenge question

Challenge Question:

$\displaystyle \int^{\infty}_{-\infty} \sin (x) \arctan \Big(\frac{1}{x}\Big) \ dx$

Moderator editor: Approved Challenge question.

2. Originally Posted by Random Variable
Challenge Question:

$\displaystyle \int^{\infty}_{-\infty} \sin (x) \arctan \Big(\frac{1}{x}\Big) \ dx$

Moderator editor: Approved Challenge question.
Spoiler:
well, if i've done everything (which starts with by parts and ends very quickly) correctly at 3:38am, the answer should be $\displaystyle \pi(1-e^{-1}).$

3. NonCommAlg

So are you saying that this problem is way to easy?

Anyways, here's what I did (which sounds like exactly what you did):

$\displaystyle \int^{\infty}_{-\infty} \sin(x) \arctan\Big(\frac{1}{x}\Big) \ dx$

$\displaystyle = \lim_{a \to 0^{-}} \int^{a}_{-\infty} \sin(x) \arctan\Big(\frac{1}{x}\Big) \ dx + \lim_{b \to 0^{+}}\int^{\infty}_{b} \sin(x) \arctan\Big(\frac{1}{x}\Big) \ dx$

$\displaystyle = \lim_{a \to 0^{-}} \Bigg(-\cos(x) \arctan\Big(\frac{1}{x}\Big) \Big|^{a}_{-\infty} - \int^{a}_{-\infty} \frac{\cos x}{1+x^{2}} \ dx \Bigg)$ $\displaystyle + \lim_{b \to 0^{+}} \Bigg(-\cos(x) \arctan\Big(\frac{1}{x}\Big) \Big|^{\infty}_{b} - \int^{\infty}_{b} \frac{\cos x}{1+x^{2}} \ dx \Bigg)$

$\displaystyle = \frac{\pi}{2} - \lim_{a \to 0^{-}} \int^{a}_{-\infty} \frac{\cos x}{1+x^{2}} \ dx + \frac{\pi}{2} - \lim_{b \to 0^{+}} \int^{\infty}_{b} \frac{\cos x}{1+x^{2}} \ dx$

$\displaystyle = \pi - \int^{\infty}_{-\infty} \frac{\cos x}{1+x^{2}} \ dx$

let $\displaystyle f(z) = \frac{e^{iz}}{1+z^{2}}$

then $\displaystyle \int^{\infty}_{-\infty} \sin(x) \arctan\Big(\frac{1}{x}\Big) \ dx = \pi + 2\pi \ Im (Res[f,i])$

$\displaystyle = \pi + 2 \pi \ Im \Big(\lim_{z \to i} \frac{e^{iz}}{1+i} \Big) = \pi + 2 \pi Im \Big(\frac{-i}{2e} \Big) = \pi \Big(1-\frac{1}{e} \Big)$

4. well, first of all the intagrand is an even function and so we just need to find the integral over $\displaystyle (0, \infty).$ then by parts gets us somewhere that we only need to find $\displaystyle I=\int_0^{\infty} \frac{\cos x}{1+x^2} \ dx,$ as you showed yourself. to find the value of $\displaystyle I$ i didn't use contour integration:

let $\displaystyle f(t)=\int_0^{\infty} \frac{\cos (tx)}{1+x^2} \ dx, \ t>0.$ first note that $\displaystyle \frac{1}{1+x^2}=\int_0^{\infty} e^{-xy} \sin y \ dy$ and $\displaystyle \frac{y}{t^2+y^2}=\int_0^{\infty}e^{-xy} \cos (tx) \ dx.$ so:

$\displaystyle f(t)=\int_0^{\infty} \int_0^{\infty} e^{-xy} \cos (tx) \sin y \ dy \ dx = \int_0^{\infty} \sin y \int_0^{\infty} e^{-xy} \cos (tx) \ dx \ dy$

$\displaystyle =\int_0^{\infty} \frac{y \sin y}{t^2+y^2} \ dy.$

on the other hand, $\displaystyle f'(t)=-\int_0^{\infty} \frac{x\sin(tx)}{1+x^2} \ dx=-\int_0^{\infty} \frac{x \sin x}{t^2+x^2} \ dx = -f(t).$ thus $\displaystyle f'(t)=-f(t)$ with $\displaystyle f(0)=\int_0^{\infty} \frac{dx}{1+x^2}=\frac{\pi}{2}.$ solving this simple differential equation gives us $\displaystyle f(t)=\frac{\pi}{2}e^{-t}$
and therefore $\displaystyle I=f(1)=\frac{\pi}{2e}.$

5. well, first of all the intagrand is an even function and so we just need to find the integral over

Here's another approach:

$\displaystyle 2 \int^{\infty}_{0} \sin (x) \arctan\Big(\frac{1}{x}\Big) \ dx = 2 \int^{\infty}_{0} \int^{1}_{0} \frac{x \sin x}{t^{2}+x^{2}} \ dt \ dx$

switch the order of integration

$\displaystyle = \pi \int^{1}_{0} e^{-t} \ dt$ (again I used contour integration)

$\displaystyle = \pi \Big(1-\frac{1}{e} \Big)$

6. it'd be nice to find an elementary proof of $\displaystyle \int_0^{\infty} \frac{\cos x}{1+x^2} \ dx = \frac{\pi}{2e}.$ mine is not elementary yet because i used differentiating an integral with respect to a parameter.

7. Originally Posted by NonCommAlg
it'd be nice to find an elementary proof of $\displaystyle \int_0^{\infty} \frac{\cos x}{1+x^2} \ dx = \frac{\pi}{2e}.$ mine is not elementary yet because i used differentiating an integral with respect to a parameter.
I'm not exactly sure what you mean by "elementary, but you could do the following:

The Fourier integral representation of $\displaystyle e^{-|x|}$ is $\displaystyle \int^{\infty}_{0}\big( A(\omega) \cos \omega x + B(\omega) \sin \omega x\big) d \omega$

where $\displaystyle A(\omega) = \int^{\infty}_{-\infty} e^{-|t|} \cos \omega t \ dt = 2 \int^{\infty}_{0} e^{-t} \cos \omega t \ dt = \frac{2}{\pi} \frac{1}{1+\omega^{2}}$ (integration by parts)

and $\displaystyle B (\omega) = \frac{1}{\pi} \int^{\infty}_{-\infty} e^{-|t|} \sin \omega t \ dt = 0$

so $\displaystyle \int^{\infty}_{0} \frac{\cos \omega x}{1+\omega^{2}} \ d \omega = \frac{\pi}{2e^{|x|}}$

let $\displaystyle x =1$

then $\displaystyle \int^{\infty}_{0} \frac{\cos \omega }{1+\omega^{2}} \ d \omega = \frac{\pi}{2e}$

8. Or take a look if you are free ...

$\displaystyle \int_{ - \infty}^{\infty} \frac{\cos{x}}{x^2 + 1}~dx$

$\displaystyle = Im \int_{ - \infty}^{\infty} \frac{\cos{x}}{x-i}~dx$

$\displaystyle = Im \int_0^{2\pi} \cos{x} \left[ \frac{1}{x-i} + \sum_{k=1}^{\infty} \frac{ 2(x-i)}{ (x-i)^2 - 4k^2\pi^2} \right]~dx$

$\displaystyle = \frac{1}{2} Im \left[ \int_0^{2\pi} \cos{x} \cot(\frac{x-i}{2})~dx \right ]$

$\displaystyle = \frac{1}{2} Im \left[ \int_0^{\pi} \cos{x} \cot(\frac{x-i}{2})~dx + \int_{\pi}^{2\pi} \cos{x} \cot(\frac{x-i}{2})~dx \right]$

Sub. $\displaystyle x= t + \pi$ in the second integral , we have

$\displaystyle Im \left[ \int_0^{\pi} \cos{x} \frac{dx}{ \sin(x-i) } \right]$

$\displaystyle = Im \left[ \int_0^{\pi} \cos{x} \frac{ \sin{x} \cosh{1} + i\cos{x}\sinh{1} }{ (\sin{x} \cosh{1} )^2 + (\cos{x}\sinh{1})^2}~dx \right]$

$\displaystyle = \sinh{1} \int_0^{\pi} \frac{ \cos^2{x}}{ (\cosh{1} )^2 - (\cos{x}) ^2}~dx$

$\displaystyle = 2\sinh{1} \int_0^{\frac{\pi}{2}} \frac{ \cos^2{x}}{ (\cosh{1} )^2 - (\cos{x}) ^2}~dx$

Not long later , we will find that the integral is equal to :

$\displaystyle \pi \cosh{1} - \pi \sinh{1} = \frac{\pi}{e}$

9. Originally Posted by NonCommAlg
it'd be nice to find an elementary proof of $\displaystyle \int_0^{\infty} \frac{\cos x}{1+x^2} \ dx = \frac{\pi}{2e}.$ mine is not elementary yet because i used differentiating an integral with respect to a parameter.

I could 'feel' what your definition to an elementary proof is but perhaps much much sweat is needed for finding the elementary proof (Not sure is this true if you work in a room that the air-conditioner is on ).