Bug introduced in 7.0 or earlier and persisting through 10fixed in 11.4 or later0
Mathematica 10 gives the following very odd result,
Integrate[Sin[Sqrt[x]]/Sqrt[x], {x, 1, ∞}]
(* 2 Cos[1] *)
which seems unintuitive. The integrand has an easy to find antiderivative,
Integrate[Sin[Sqrt[x]]/Sqrt[x], x]
(* -2 Cos[Sqrt[x]] *)
When we evaluate this at the limits of integration, nothing surprising,
Function[x, -2 Cos[Sqrt[x]]] /@ {∞, 1}
(* {Interval[{-2, 2}], -2 Cos[1]} *)
And it isn't that Mathematica can't handle the difference between an Interval
object and a number,
Differences@%
(* {Interval[{-2 - 2 Cos[1], 2 - 2 Cos[1]}]} *)
So why does it seem so confident that the answer is 2 Cos[1]
?
Edit
We can even go further to see that this is wrong by making the substitution $u^2=x$ ($2u \mathrm{d}u=\mathrm{d}x$)
Integrate[2*u*(Sin[u]/u), {u, 1, Infinity}]
During evaluation of Integrate::idiv:Integral of Sin[u] does not converge on {1,∞}. >>
(* Integrate[2*Sin[u], {u, 1, Infinity}] *)
And just to drive this home even further, we try with NIntegrate
, which after spitting out error messages gives an answer on the order of $10^{114}$