Skip to main content
Tweeted twitter.com/#!/StackMma/status/477124384067293184
added 17 characters in body
Source Link
Sjoerd C. de Vries
  • 66.2k
  • 15
  • 189
  • 327

I am confused with the Integrate Given by mathematicaMathematica.First Let's First let's see a one dimensional-dimensional case:

    Integrate[UnitStep[k - Sqrt[kx^2]], {kx, -Infinity, Infinity}, Assumptions -> k > 0]

The result is 2k. Right answer! You can change UnitStep to HeavisideTheta,it give it still gives the same correct answer.

However, when changing to three dimension case.,HeavisideTheta givegives the wrong answer. See the following:

Integrate[ HeavisideTheta[k - Sqrt[kx^2 + ky^2 + kz^2]],
  {kx,-Infinity,  Infinity}, {ky, -Infinity, Infinity}, {kz, -Infinity, Infinity},
  Assumptions -> k > 0]

MathematicaMathematica gives the wrong answer 0 and with an error message which I don't know what does it meansunderstand.

    Refine::fas: Warning: One or more assumptions evaluated to False.

Refine::fas: Warning: One or more assumptions evaluated to False.

If AssumptionsAssumptions is not added, it directly gives 0 without any WARNING! As if it calculatecalculated it right! How dangerous if I previously don'tdidn't know the answer!!!

@Jens suggested using UnitStep instead of HeavisideStep,. I tried: in mathematica7Mathematica 7 it fails  (giving the wrong anwseranswer 0) but in version8version 8 it givegives the right result:

    (4 k^3 \[Pi])/3

Still with the same message:

    Refine::fas: Warning: One or more assumptions evaluated to False.

Refine::fas: Warning: One or more assumptions evaluated to False.

So what does this message mean? Why indo different mathematica givesMathematica versions give different answeranswers? Is this because of the computing time involved?


Above is the main question, here is some subtle question I wantwould like to ask,ask; see this integral:

Assuming[k > 0, Integrate[ UnitStep[k - Sqrt[kx^2 + ky^2 + kz^2]],
  {kx, -Infinity, Infinity}, {ky, -Infinity, Infinity}, {kz, -Infinity, Infinity}]]

the results:

    (4 k^3 \[Pi])/3 k>0
     0  True

It seems mathematicaMathematica 'forgets' that I have assumed that k>0k>0. whyWhy is that? whatWhat does the second line of the result mean?

I am confused with the Integrate Given by mathematica.First Let's see a one dimensional case:

    Integrate[UnitStep[k - Sqrt[kx^2]], {kx, -Infinity, Infinity}, Assumptions -> k > 0]

The result is 2k. Right answer! You can change UnitStep to HeavisideTheta,it give the same correct answer.

However, when changing to three dimension case.HeavisideTheta give the wrong answer. See the following:

Integrate[ HeavisideTheta[k - Sqrt[kx^2 + ky^2 + kz^2]],
  {kx,-Infinity,  Infinity}, {ky, -Infinity, Infinity}, {kz, -Infinity, Infinity},
  Assumptions -> k > 0]

Mathematica gives the wrong answer 0 and with an error message which I don't know what does it means.

    Refine::fas: Warning: One or more assumptions evaluated to False.

If Assumptions is not added, it directly gives 0 without any WARNING! As if it calculate it right! How dangerous if I previously don't know the answer!!!

@Jens suggested using UnitStep instead HeavisideStep, I tried: in mathematica7 it fails(giving the wrong anwser 0) but in version8 it give the right result:

    (4 k^3 \[Pi])/3

Still with the same message:

    Refine::fas: Warning: One or more assumptions evaluated to False.

So what does this message mean? Why in different mathematica gives different answer? Is this because of the computing time involved?


Above is the main question, here is some subtle question I want to ask, see this integral:

Assuming[k > 0, Integrate[ UnitStep[k - Sqrt[kx^2 + ky^2 + kz^2]],
  {kx, -Infinity, Infinity}, {ky, -Infinity, Infinity}, {kz, -Infinity, Infinity}]]

the results:

    (4 k^3 \[Pi])/3 k>0
     0  True

It seems mathematica 'forgets' that I have assumed that k>0. why is that? what does the second line of the result mean?

I am confused with the Integrate Given by Mathematica. First let's see a one-dimensional case:

    Integrate[UnitStep[k - Sqrt[kx^2]], {kx, -Infinity, Infinity}, Assumptions -> k > 0]

The result is 2k. Right answer! You can change UnitStep to HeavisideTheta, it still gives the same correct answer.

However, when changing to three dimension case,HeavisideTheta gives the wrong answer. See the following:

Integrate[ HeavisideTheta[k - Sqrt[kx^2 + ky^2 + kz^2]],
  {kx,-Infinity,  Infinity}, {ky, -Infinity, Infinity}, {kz, -Infinity, Infinity},
  Assumptions -> k > 0]

Mathematica gives the wrong answer 0 and with an error message I don't understand.

Refine::fas: Warning: One or more assumptions evaluated to False.

If Assumptions is not added, it directly gives 0 without any WARNING! As if it calculated it right! How dangerous if I previously didn't know the answer!

@Jens suggested using UnitStep instead of HeavisideStep. I tried: in Mathematica 7 it fails  (giving the wrong answer 0) but in version 8 it gives the right result:

    (4 k^3 \[Pi])/3

Still with the same message:

Refine::fas: Warning: One or more assumptions evaluated to False.

So what does this message mean? Why do different Mathematica versions give different answers? Is this because of the computing time involved?


Above is the main question, here is some subtle question I would like to ask; see this integral:

Assuming[k > 0, Integrate[ UnitStep[k - Sqrt[kx^2 + ky^2 + kz^2]],
  {kx, -Infinity, Infinity}, {ky, -Infinity, Infinity}, {kz, -Infinity, Infinity}]]

the results:

    (4 k^3 \[Pi])/3 k>0
     0  True

It seems Mathematica 'forgets' that I have assumed that k>0. Why is that? What does the second line of the result mean?

Improved formatting
Source Link
Michael E2
  • 245k
  • 18
  • 351
  • 775

whether Is this wrong result iswrong because of calculation time?  ( andand more questionquestions about Assumptions  )

I am confused with the Integrate Given by mathematica.First Let's see a one dimensional case:

    Integrate[UnitStep[k - Sqrt[kx^2]], {kx, -Infinity, Infinity}, Assumptions -> k > 0]

The result is 2k. Right answer! You can change UnitStep to HeavisideTheta,it give the same correct answer.

However, when changing to three dimension case.HeavisideTheta give the wrong answer. See the following:

    Integrate[ HeavisideTheta[k - Sqrt[kx^2 + ky^2 + kz^2]],
  {kx,-Infinity,  Infinity}, {ky, -Infinity, Infinity}, {kz, -Infinity, Infinity},
  Assumptions -> k > 0]

Mathematica gives the wrong answer 0 and with an error message which I don't know what does it means.

    Refine::fas: Warning: One or more assumptions evaluated to False.

If Assumptions is not added, it directly gives 0 without any WARNING! As if it calculate it right! How dangerous if I previously don't know the answer!!!

@Jens suggested using UnitStep instead HeavisideStep, I tried: in mathematica7 it fails(giving the wrong anwser 0) but in version8 it give the right result:

    (4 k^3 \[Pi])/3

Still with the same message:

    Refine::fas: Warning: One or more assumptions evaluated to False.

So what does this message mean? Why in different mathematica gives different answer? Is this because of the computing time involved?


Above is the main question, here is some subtle question I want to ask, see this integral:

    Assuming[k > 0, Integrate[ UnitStep[k - Sqrt[kx^2 + ky^2 + kz^2]],
  {kx, -Infinity, Infinity}, {ky, -Infinity, Infinity}, {kz, -Infinity, Infinity}]]

the results:

    (4 k^3 \[Pi])/3 k>0
     0  True

It seems mathematica 'forgets' that I have assumed that k>0. why is that? what does the second line of the result mean?

whether this wrong result is because of calculation time?( and more question about Assumptions  )

I am confused with the Integrate Given by mathematica.First Let's see a one dimensional case:

    Integrate[UnitStep[k - Sqrt[kx^2]], {kx, -Infinity, Infinity},Assumptions -> k > 0]

The result is 2k. Right answer! You can change UnitStep to HeavisideTheta,it give the same correct answer.

However, when changing to three dimension case.HeavisideTheta give the wrong answer. See the following:

    Integrate[ HeavisideTheta[k - Sqrt[kx^2 + ky^2 + kz^2]], {kx,-Infinity,  Infinity}, {ky, -Infinity, Infinity}, {kz, -Infinity, Infinity}, Assumptions -> k > 0]

Mathematica gives the wrong answer 0 and with an error message which I don't know what does it means.

    Refine::fas: Warning: One or more assumptions evaluated to False.

If Assumptions is not added, it directly gives 0 without any WARNING! As if it calculate it right! How dangerous if I previously don't know the answer!!!

@Jens suggested using UnitStep instead HeavisideStep, I tried: in mathematica7 it fails(giving the wrong anwser 0) but in version8 it give the right result:

    (4 k^3 \[Pi])/3

Still with the same message:

    Refine::fas: Warning: One or more assumptions evaluated to False.

So what does this message mean? Why in different mathematica gives different answer? Is this because of the computing time involved?


Above is the main question, here is some subtle question I want to ask, see this integral:

    Assuming[k > 0, Integrate[ UnitStep[k - Sqrt[kx^2 + ky^2 + kz^2]], {kx, -Infinity, Infinity}, {ky, -Infinity, Infinity}, {kz, -Infinity, Infinity}]]

the results:

    (4 k^3 \[Pi])/3 k>0
     0  True

It seems mathematica 'forgets' that I have assumed that k>0. why is that? what does the second line of the result mean?

Is this result wrong because of calculation time?  (and more questions about Assumptions)

I am confused with the Integrate Given by mathematica.First Let's see a one dimensional case:

    Integrate[UnitStep[k - Sqrt[kx^2]], {kx, -Infinity, Infinity}, Assumptions -> k > 0]

The result is 2k. Right answer! You can change UnitStep to HeavisideTheta,it give the same correct answer.

However, when changing to three dimension case.HeavisideTheta give the wrong answer. See the following:

Integrate[ HeavisideTheta[k - Sqrt[kx^2 + ky^2 + kz^2]],
  {kx,-Infinity,  Infinity}, {ky, -Infinity, Infinity}, {kz, -Infinity, Infinity},
  Assumptions -> k > 0]

Mathematica gives the wrong answer 0 and with an error message which I don't know what does it means.

    Refine::fas: Warning: One or more assumptions evaluated to False.

If Assumptions is not added, it directly gives 0 without any WARNING! As if it calculate it right! How dangerous if I previously don't know the answer!!!

@Jens suggested using UnitStep instead HeavisideStep, I tried: in mathematica7 it fails(giving the wrong anwser 0) but in version8 it give the right result:

    (4 k^3 \[Pi])/3

Still with the same message:

    Refine::fas: Warning: One or more assumptions evaluated to False.

So what does this message mean? Why in different mathematica gives different answer? Is this because of the computing time involved?


Above is the main question, here is some subtle question I want to ask, see this integral:

Assuming[k > 0, Integrate[ UnitStep[k - Sqrt[kx^2 + ky^2 + kz^2]],
  {kx, -Infinity, Infinity}, {ky, -Infinity, Infinity}, {kz, -Infinity, Infinity}]]

the results:

    (4 k^3 \[Pi])/3 k>0
     0  True

It seems mathematica 'forgets' that I have assumed that k>0. why is that? what does the second line of the result mean?

Source Link

whether this wrong result is because of calculation time?( and more question about Assumptions )

I am confused with the Integrate Given by mathematica.First Let's see a one dimensional case:

    Integrate[UnitStep[k - Sqrt[kx^2]], {kx, -Infinity, Infinity},Assumptions -> k > 0]

The result is 2k. Right answer! You can change UnitStep to HeavisideTheta,it give the same correct answer.

However, when changing to three dimension case.HeavisideTheta give the wrong answer. See the following:

    Integrate[ HeavisideTheta[k - Sqrt[kx^2 + ky^2 + kz^2]], {kx,-Infinity,  Infinity}, {ky, -Infinity, Infinity}, {kz, -Infinity, Infinity}, Assumptions -> k > 0]

Mathematica gives the wrong answer 0 and with an error message which I don't know what does it means.

    Refine::fas: Warning: One or more assumptions evaluated to False.

If Assumptions is not added, it directly gives 0 without any WARNING! As if it calculate it right! How dangerous if I previously don't know the answer!!!

@Jens suggested using UnitStep instead HeavisideStep, I tried: in mathematica7 it fails(giving the wrong anwser 0) but in version8 it give the right result:

    (4 k^3 \[Pi])/3

Still with the same message:

    Refine::fas: Warning: One or more assumptions evaluated to False.

So what does this message mean? Why in different mathematica gives different answer? Is this because of the computing time involved?


Above is the main question, here is some subtle question I want to ask, see this integral:

    Assuming[k > 0, Integrate[ UnitStep[k - Sqrt[kx^2 + ky^2 + kz^2]], {kx, -Infinity, Infinity}, {ky, -Infinity, Infinity}, {kz, -Infinity, Infinity}]]

the results:

    (4 k^3 \[Pi])/3 k>0
     0  True

It seems mathematica 'forgets' that I have assumed that k>0. why is that? what does the second line of the result mean?