Skip to main content
added 178 characters in body
Source Link
Nasser
  • 150.5k
  • 12
  • 161
  • 374

Just a quick observation. Your integrand is not defined over some range, as can be seen by this plot

integrand = ((3.4641 (0.866025 + 
        r (-0.288675 + Sqrt[1 - 2/r + 0.01 r^2])))/(r^3 Sqrt[
       1 - 2/r + 0.01 r^2] w)) // Rationalize

Mathematica graphics

Plot[integrand /. w -> 1, {r, -5, 5}]

Mathematica graphics

So to help Mathematica, tell it where the a and b are to avoid the problem area. Mathematica can do the indefinite integral OK

anti = Integrate[integrand, r]

Mathematica graphics

Which gives one the clue the problem is with the limits given.

anti = Integrate[integrand, {r, a, b}, Assumptions -> {a > 2, b > a}, 
  GenerateConditions -> False]

Mathematica graphics

Compare to numerical:

 anti /. {w -> 1, a -> 3, b -> 5} // N
 (* 0.429391*)

And

 NIntegrate[integrand /. w -> 1, {r, 3, 5}]

 (* 0.429391 *)

Just a quick observation. Your integrand is not defined over some range, as can be seen by this plot

integrand = ((3.4641 (0.866025 + 
        r (-0.288675 + Sqrt[1 - 2/r + 0.01 r^2])))/(r^3 Sqrt[
       1 - 2/r + 0.01 r^2] w)) // Rationalize

Mathematica graphics

Plot[integrand /. w -> 1, {r, -5, 5}]

Mathematica graphics

So to help Mathematica, tell it where the a and b are to avoid the problem area. Mathematica can do the indefinite integral OK

anti = Integrate[integrand, r]

Mathematica graphics

Which gives one the clue the problem is with the limits given.

anti = Integrate[integrand, {r, a, b}, Assumptions -> {a > 2, b > a}, 
  GenerateConditions -> False]

Mathematica graphics

Just a quick observation. Your integrand is not defined over some range, as can be seen by this plot

integrand = ((3.4641 (0.866025 + 
        r (-0.288675 + Sqrt[1 - 2/r + 0.01 r^2])))/(r^3 Sqrt[
       1 - 2/r + 0.01 r^2] w)) // Rationalize

Mathematica graphics

Plot[integrand /. w -> 1, {r, -5, 5}]

Mathematica graphics

So to help Mathematica, tell it where the a and b are to avoid the problem area. Mathematica can do the indefinite integral OK

anti = Integrate[integrand, r]

Mathematica graphics

Which gives one the clue the problem is with the limits given.

anti = Integrate[integrand, {r, a, b}, Assumptions -> {a > 2, b > a}, 
  GenerateConditions -> False]

Mathematica graphics

Compare to numerical:

 anti /. {w -> 1, a -> 3, b -> 5} // N
 (* 0.429391*)

And

 NIntegrate[integrand /. w -> 1, {r, 3, 5}]

 (* 0.429391 *)
Source Link
Nasser
  • 150.5k
  • 12
  • 161
  • 374

Just a quick observation. Your integrand is not defined over some range, as can be seen by this plot

integrand = ((3.4641 (0.866025 + 
        r (-0.288675 + Sqrt[1 - 2/r + 0.01 r^2])))/(r^3 Sqrt[
       1 - 2/r + 0.01 r^2] w)) // Rationalize

Mathematica graphics

Plot[integrand /. w -> 1, {r, -5, 5}]

Mathematica graphics

So to help Mathematica, tell it where the a and b are to avoid the problem area. Mathematica can do the indefinite integral OK

anti = Integrate[integrand, r]

Mathematica graphics

Which gives one the clue the problem is with the limits given.

anti = Integrate[integrand, {r, a, b}, Assumptions -> {a > 2, b > a}, 
  GenerateConditions -> False]

Mathematica graphics