Non elementary integral Okay, so one of the places I looked up, there was a result that integration of cosx/x is from 0 to ∞ is 0.5π. I'm not sure if the result is correct or not. How can I solve the integral? It was given as a result to be used in some other problem. Now how does one calculate it? I know it's non elementary, but I have seen that some non elementary integrals can be evaluated provided the limits are specified. Like erf(x). So can someone provide the derivation or a reference link maybe? 
 A: A link you wanted:
https://proofwiki.org/wiki/Primitive_of_Cosine_of_a_x_over_x
$\displaystyle \int \frac {\cos a x \ \mathrm d x} x = \ln |x| + \sum_{k \ge 1} \frac {(-1)^k (a x)^{2 k} } {(2 k) (2 k)!} + C = \ln |x| - \frac {(a x)^2} {2 \times 2!} + \frac {(a x)^4} {4 \times 4!} - \frac {(a x)^6} {6 \times 6!} - \cdots + C$
A: You can use the following formula:
$$\int_0^\infty \frac{f(x)}{x}dx=\int_0^\infty \mathcal{L}\{f(x)\}(s)ds$$
where $\mathcal{L}\{f(x)\}(s)$ is the laplace transform of your function $f$. The laplace transform is defined as: $$\mathcal{L}\{f(x)\}(s)=\int_0^\infty f(x)e^{-sx} dx$$
so the final result will be a function of $s$.
for your integral we have:
$$\int_0^\infty \frac{\cos(x)}{x}dx=\int_0^\infty \mathcal{L}\{\cos(x)\}(s)ds$$
and the laplace transform of $\cos(x)$ is $\frac{s}{s^2+1}$
So 
$$\int_0^\infty \frac{\cos(x)}{x}dx=\int_0^\infty \frac{s}{s^2+1} ds $$
and the second integral it's easy to evaluate and you can see that it diverges. So
$\int_0^\infty \frac{\cos(x)}{x}dx$ diverges as well.
I think you mixed up this integrals: $\int_0^\infty \frac{\cos(x)}{x}dx$, that diverges, and $\int_0^\infty \frac{\sin(x)}{x}dx$ that actually converges do $\pi/2$. To evaluate $$\int_0^\infty \frac{\sin(x)}{x}dx$$ you can use the same process. The laplace transform of $\sin(x)$ is $\frac{1}{s^2+1}$, so:
$$\int_0^\infty \frac{\sin(x)}{x}dx=\int_0^\infty \frac{1}{s^2+1}ds$$
The primitive of $\frac{1}{s^2+1}$ is $\arctan(s)$ so you have that:
$$\int_0^\infty \frac{1}{s^2+1}ds=\lim_{s\rightarrow \infty} \arctan(s) - \arctan(0)$$
$\arctan(0)=0$ and $\lim_{s\rightarrow \infty} \arctan(s)=\pi/2$, so we end up with:
$$\int_0^\infty \frac{\sin(x)}{x}dx = \frac{\pi}{2}$$
