Integration is not working

Integrate[-((0.5 Sqrt[(-0.008 + 0.08 r^2 - 3. r^3 + r^4)/
r^4] (-0.0000853333 + 0.00128 r^2 - 0.024 r^3 - 0.0170667 r^4 +
0.36 r^5 - 6. r^6 +
r^7) (0.00188562 Sqrt[2 - 0.016/r^4 + 0.16/r^2 - 6/r] -
0.0282843 Sqrt[2 - 0.016/r^4 + 0.16/r^2 - 6/r] r^2 +
1.41421 Sqrt[2 - 0.016/r^4 + 0.16/r^2 - 6/r] r^3 -
0.707107 Sqrt[2 - 0.016/r^4 + 0.16/r^2 - 6/r] r^4 +
1. r^5 Sqrt[(0.00533333 - 0.04 r^2 + r^3)/r^6] Sqrt[(
0.00533333 - 0.04 r^2 + r^3)/r^4]
Sqrt[(-0.008 + 0.08 r^2 - 3. r^3 + r^4)/r^4]))/(Sqrt[(
0.00533333 - 0.04 r^2 + r^3)/
r^4] (-0.008 + 0.08 r^2 - 3. r^3 + r^4)^3)), {r, 5.93999, mu},
Assumptions -> {mu > 5.94, r > 0}, GenerateConditions -> False]

• Why not use NIntegrate? int[mu_] := NIntegrate[expr, {r, 5.93999, mu}]; Plot[int[mu], {mu, 5.9399, 8}] Aug 25, 2022 at 7:20
• @cvgmt , with NIntegrate it is showing this , NIntegrate::nlim: r = mu is not a valid limit of integration.
– AAA
Aug 25, 2022 at 7:49
• As suggested by @cvgmt, int[mu_?NumericQ] := NIntegrate[expr, {r, 5.93999, mu}]; Plot[int[mu], {mu, 5.9399, 8}] produces the result that I presume you wish. Aug 25, 2022 at 21:29

Since you have already numerical values in your expression, you are probably best serve using numerical integration. I'm not sure for what you need the Integration, but for instance you can plot the values using NIntegrate. Here for example a plot until mu=10:

Plot[
NIntegrate[-((0.5 Sqrt[(-0.008 + 0.08 r^2 - 3. r^3 + r^4)/
r^4] (-0.0000853333 + 0.00128 r^2 - 0.024 r^3 -
0.0170667 r^4 + 0.36 r^5 - 6. r^6 +
r^7) (0.00188562 Sqrt[2 - 0.016/r^4 + 0.16/r^2 - 6/r] -
0.0282843 Sqrt[2 - 0.016/r^4 + 0.16/r^2 - 6/r] r^2 +
1.41421 Sqrt[2 - 0.016/r^4 + 0.16/r^2 - 6/r] r^3 -
0.707107 Sqrt[2 - 0.016/r^4 + 0.16/r^2 - 6/r] r^4 +
1. r^5 Sqrt[(0.00533333 - 0.04 r^2 + r^3)/
r^6] Sqrt[(0.00533333 - 0.04 r^2 + r^3)/
r^4] Sqrt[(-0.008 + 0.08 r^2 - 3. r^3 + r^4)/
r^4]))/(Sqrt[(0.00533333 - 0.04 r^2 + r^3)/
r^4] (-0.008 + 0.08 r^2 - 3. r^3 + r^4)^3)), {r, 5.94, mu}],
{mu, 5.94, 10}
]


• Actually, I need the expression in terms of mu as further, I have to integrate with respect to mu after putting this result in some expression.
– AAA
Aug 25, 2022 at 8:03
• Could you post the whole problem, so we can figure out a way around that? With such complicated expressions an analytic workflow is probably not possible, so a numerical approximation of your whole project will be necessary.
– azt
Aug 25, 2022 at 8:53
Clear["Global*"];
f[r_] = -((0.5 Sqrt[(-0.008 + 0.08 r^2 - 3. r^3 + r^4)/
r^4] (-0.0000853333 + 0.00128 r^2 - 0.024 r^3 -
0.0170667 r^4 + 0.36 r^5 - 6. r^6 +
r^7) (0.00188562 Sqrt[2 - 0.016/r^4 + 0.16/r^2 - 6/r] -
0.0282843 Sqrt[2 - 0.016/r^4 + 0.16/r^2 - 6/r] r^2 +
1.41421 Sqrt[2 - 0.016/r^4 + 0.16/r^2 - 6/r] r^3 -
0.707107 Sqrt[2 - 0.016/r^4 + 0.16/r^2 - 6/r] r^4 +
1. r^5 Sqrt[(0.00533333 - 0.04 r^2 + r^3)/
r^6] Sqrt[(0.00533333 - 0.04 r^2 + r^3)/
r^4] Sqrt[(-0.008 + 0.08 r^2 - 3. r^3 + r^4)/
r^4]))/(Sqrt[(0.00533333 - 0.04 r^2 + r^3)/
r^4] (-0.008 + 0.08 r^2 - 3. r^3 + r^4)^3));
int[mu_?NumericQ] := NIntegrate[f[r], {r, 5.93999, mu}]
Plot[int[mu], {mu, 5.93999, 8}, AxesOrigin -> {0, 0}]


Or

Clear[F];
F = NDSolveValue[{y'[mu] == f[mu], y[5.93999] == 0},    y, {mu, 5.93999, 8}];
Plot[F[mu], {mu, 5.93999, 8}, AxesOrigin -> {0, 0}]

• Or use Clear[F]; F = NDSolveValue[{y'[mu] == f[mu], y[5.93999] == 0}, y, {mu, 5.93999, 8}]; Plot[F[mu], {mu, 5.93999, 8}, AxesOrigin -> {0, 0}] Aug 25, 2022 at 8:00
• Actually, I need the expression in terms of mu as further, I have to integrate with respect to mu after putting this result in some expression.
– AAA
Aug 25, 2022 at 8:03
• @AKU Use int[mu]`. Aug 25, 2022 at 8:05
• I am using Mathematica 13 , and using the same way you did, I am getting this error. NIntegrate::nlim: r = mu is not a valid limit of integration.
– AAA
Aug 25, 2022 at 8:06
• it is plotting it but not giving the expression.
– AAA
Aug 25, 2022 at 8:09