Skip to main content
deleted 19 characters in body
Source Link
Szabolcs
  • 236.5k
  • 31
  • 641
  • 1.3k

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}$

Bug introduced in 7.0 or earlier and persisting through 10.4 or later


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}$

Bug introduced in 7.0 or earlier and fixed in 11.0


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}$

deleted 2 characters in body
Source Link
kirma
  • 19.1k
  • 1
  • 55
  • 95

Bug introduced in 7.0 or earlier and persisting through 10.3.14 or later


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}$

Bug introduced in 7.0 or earlier and persisting through 10.3.1 or later


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}$

Bug introduced in 7.0 or earlier and persisting through 10.4 or later


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}$

Notice removed Draw attention by Vadim Ponomarenko
Bounty Ended with Michael E2's answer chosen by Vadim Ponomarenko
Notice added Draw attention by Vadim Ponomarenko
Bounty Started worth 50 reputation by Vadim Ponomarenko
same result in version 7 under Windows
Source Link
Mr.Wizard
  • 273.1k
  • 34
  • 595
  • 1.4k

Bug introduced in 87.0.4 or earlier and persisting through 10.3.1. or later


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}$

Bug introduced in 8.0.4 or earlier and persisting through 10.3.1.


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}$

Bug introduced in 7.0 or earlier and persisting through 10.3.1 or later


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}$

added 80 characters in body; edited tags
Source Link
Loading
Tweeted twitter.com/StackMma/status/697791163923873792
added 3 characters in body
Source Link
Loading
added 480 characters in body
Source Link
Jason B.
  • 70.2k
  • 3
  • 144
  • 298
Loading
added 551 characters in body; edited title
Source Link
Jason B.
  • 70.2k
  • 3
  • 144
  • 298
Loading
edited tags; edited tags
Link
Loading
Source Link
JEM
  • 1.2k
  • 6
  • 15
Loading