I am trying to find Integral[Cos[x]/x,{x,0,infinite}].
Integrate can not give a result since the expression is divergent.
However, NIntegrate gives a result that I do not trust.
The integral diverges because of the singularity at x==0. NIntegrate does not commit, but it gives serious warnings. Compare with converging integrals: