# Integrate function is not giving answer

Integrate[((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] \[Omega])),{r,a,b}]


• Welcome to the Mathematica Stack Exchange. Usually when this happens, it means that there is no closed form solution for the integral. Have you tried plotting the function to get a general feel for it? Have you tried NIntegrate so far?
– Syed
Mar 17, 2022 at 17:36

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


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


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]


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]


Compare to numerical:

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


And

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

(* 0.429391 *)

• yes. Now it is working. Thanks
– AAA
Mar 17, 2022 at 19:02
• Is it possible to get the following function in terms of d,w using the same method. I am not getting the solution. Integrate[((Sqrt[3] d (d + ([Pi]^(-d/2) r^-d (((2.309/1000) - (1154/1000) d) [Pi]^(d/2) r^ d + ((-25719/1000) + (25719/1000) d) r^3 Gamma[ 1/2 (-1 + d)]))/((-2 + d) Sqrt[ 1 + (3 r^2)/(50 (2 - 3 d + d^2)) - ( 8 [Pi]^(3/2 - d/2) r^(3 - d) Gamma[1/2 (-1 + d)])/(-2 + d)])))/(8 r^2 [Omega])), {r,a,b}]
– AAA
Mar 17, 2022 at 20:04
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] ω)) // Rationalize // Simplify;

(integral = Assuming[b > a,
Integrate[integrand, {r, a, b},
GenerateConditions -> True] //
Simplify]) // InputForm

(* ConditionalExpression[
(34641*((400000 - 11547*
Sqrt[100 - 200/a + a^2])*b +
a*(-400000 + 11547*Sqrt[100 - 200/b +
b^2])))/(4000000000*
a*b*ω), b < 0 ||
a > Root[-200 + 100*#1 + #1^3 & , 1, 0]] *)


The conditions are

integral[[-1]] /. x_Root :> N[x]

(* b < 0 || a > 1.9283 *)

• Is it possible to get the following function in terms of d,w using the same method. I am not getting the solution. Integrate[((Sqrt[3] d (d + ([Pi]^(-d/2) r^-d (((2.309/1000) - (1154/1000) d) [Pi]^(d/2) r^ d + ((-25719/1000) + (25719/1000) d) r^3 Gamma[ 1/2 (-1 + d)]))/((-2 + d) Sqrt[ 1 + (3 r^2)/(50 (2 - 3 d + d^2)) - ( 8 [Pi]^(3/2 - d/2) r^(3 - d) Gamma[1/2 (-1 + d)])/(-2 + d)])))/(8 r^2 [Omega])), {r,a,b}]
– AAA
Mar 17, 2022 at 20:02
• Not that I can tell. Recommend that you post a new question so that the community can look at it. Mar 17, 2022 at 21:19