# Computing the elliptic integral $\int \frac{1}{x \sqrt{f+\frac{a}{x^3}-\frac{k}{x^2}}} \, dx$

I don't know how to solve this with or without Rubi?!!

 Get["Rubi"]
Assuming[f > 0 && k > 0, Int[1/(x*Sqrt[f + a*x^-3 - k*x^-2]), {x,1,u}]]

• Are there any assumptions on a?
– bmf
Apr 20 at 18:55
• Rubi indifinite integration does not use assumptions. They have no effect. It is all just rules based. Apr 20 at 18:59
• This gives a result: Integrate[1/(x*Sqrt[f + a*x^-3 - k*x^-2]), x] Apr 20 at 19:03
• In the future it would be good to use @ and start typing a user's name, so they can receive a notification that you answered to their comment. Also, you changed the statement of the problem and now you want a definite integral. Q: what is u. Finally, since you use V13 am I right to assume that you want an explicit result and nothing with Root in it?
– bmf
Apr 20 at 19:19
• @FelipeDura also try this integral[f_?NumericQ, a_?NumericQ, k_?NumericQ, u_?NumericQ] := NIntegrate[1/(x*Sqrt[f + a*x^-3 - k*x^-2]), {x, 1, u}] and then Manipulate[ListPlot[Table[integral[f, a, k, u], {u, 1, 100, 1}], PlotStyle -> Red, PlotRange -> {{0, 100}, {0, 5}}, ImageSize -> Large], {f, 1, 3}, {a, 1, 3}, {k, 1, 3}. You should get this
– bmf
Apr 21 at 16:58

## 3 Answers

I wanted to see if MathJax could handle rendering the result: Daniel Lichtbau points out that directly calling Integrate works.

TeXForm@Simplify@ToRadicals@Integrate[1/(x Sqrt[f+a x^-3-k x^-2]),x]


gives this when pasted.

$$\frac{2 \left(\sqrt[3]{2} \left(-i+\sqrt{3}\right) \left(\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2\right)^{2/3}-2 \sqrt[3]{3} \left(i+\sqrt{3}\right) f k\right) \left(2 \sqrt[3]{2} 3^{2/3} f k-6 f \sqrt[3]{\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2} x+\sqrt[3]{3} \left(2 \sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-18 a f^2\right)^{2/3}\right)^2 \sqrt{\frac{f^2 \left(\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2\right)^{7/3} x \left(-108 i \sqrt{3} a^2 f^3+3 a \left(36 k x f^2+\sqrt[6]{3} \sqrt[3]{2 \sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-18 a f^2} \left(2 \sqrt[3]{2} \sqrt[6]{3} \left(3+i \sqrt{3}\right) k+3 \left(i+\sqrt{3}\right) \sqrt[3]{\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2} x\right) f+12 i \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}\right) f-\sqrt[6]{3} \left(2 \left(2^{2/3} \sqrt[6]{3} \left(3-i \sqrt{3}\right) k^2 \sqrt[3]{\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2} x-8 i \sqrt[3]{3} k^3\right) f^2+4 \left(\sqrt[3]{2} \left(-i+\sqrt{3}\right) \left(\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2\right)^{2/3} k^2+3 \sqrt[3]{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)} x k\right) f+\sqrt{f^3 \left(27 a^2 f-4 k^3\right)} \sqrt[3]{2 \sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-18 a f^2} \left(2 \sqrt[3]{2} \sqrt[6]{3} \left(i+\sqrt{3}\right) k+\left(3+i \sqrt{3}\right) \sqrt[3]{\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2} x\right)\right)\right)}{\left(-9 i \sqrt[3]{2} \left(-i+\sqrt{3}\right) a f^2+2 \left(1-i \sqrt{3}\right) k \sqrt[3]{3 \sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-27 a f^2} f+\sqrt[3]{2} \left(3 i+\sqrt{3}\right) \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}\right)^2 \left(-9 a \left(2^{2/3} \sqrt[3]{3 \sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-27 a f^2}-6 f x\right) f^2-6 \sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)} x f+2 \sqrt[3]{2} k \left(3 \sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-27 a f^2\right)^{2/3} f+2^{2/3} 3^{5/6} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)} \sqrt[3]{\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2}\right)^2}} \sqrt{\frac{\left(\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2\right)^{2/3} \left(2 k \sqrt[3]{6 \sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-54 a f^2} \left(\sqrt[3]{2} \left(-i+\sqrt{3}\right) k-2 i \sqrt[3]{3 \sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-27 a f^2} x\right) f^2+3 i a \left(6 f \left(2 k+2^{2/3} \sqrt[3]{3 \sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-27 a f^2} x\right)+\sqrt[3]{2} \sqrt[6]{3} \left(-3 i+\sqrt{3}\right) \left(\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2\right)^{2/3}\right) f^2-2 i \sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)} \left(2 k+2^{2/3} \sqrt[3]{3 \sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-27 a f^2} x\right) f-\sqrt[3]{2} \sqrt[6]{3} \left(i+\sqrt{3}\right) \sqrt{f^3 \left(27 a^2 f-4 k^3\right)} \left(\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2\right)^{2/3}\right)}{\left(9 \sqrt[3]{2} \left(i+\sqrt{3}\right) a f^2+2 \left(-i+\sqrt{3}\right) k \sqrt[3]{3 \sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-27 a f^2} f+\sqrt[3]{2} \left(-3-i \sqrt{3}\right) \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}\right) \left(-9 a \left(2^{2/3} \sqrt[3]{3 \sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-27 a f^2}-6 f x\right) f^2-6 \sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)} x f+2 \sqrt[3]{2} k \left(3 \sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-27 a f^2\right)^{2/3} f+2^{2/3} 3^{5/6} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)} \sqrt[3]{\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2}\right)}} \left(F\left(\sin ^{-1}\left(\sqrt{6} \sqrt{\frac{f \left(2 \left(3 i+\sqrt{3}\right) f k \sqrt[3]{3 \sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-27 a f^2}-\sqrt[3]{2} \left(-3 i+\sqrt{3}\right) \left(\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2\right)\right) x}{\left(\sqrt[3]{2} \left(-i+\sqrt{3}\right) \left(\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2\right)^{2/3}-2 \sqrt[3]{3} \left(i+\sqrt{3}\right) f k\right) \left(2 \sqrt[3]{2} 3^{2/3} f k-6 f \sqrt[3]{\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2} x+\sqrt[3]{3} \left(2 \sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-18 a f^2\right)^{2/3}\right)}}\right)|\frac{\left(\sqrt[3]{2} \left(-i+\sqrt{3}\right) \left(\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2\right)^{2/3}-2 \sqrt[3]{3} \left(i+\sqrt{3}\right) f k\right) \left(\sqrt[3]{2} \left(3 i+\sqrt{3}\right) \left(\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2\right)^{2/3}-2 \sqrt[3]{3} \left(-3 i+\sqrt{3}\right) f k\right)}{\left(\sqrt[3]{2} \left(i+\sqrt{3}\right) \left(\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2\right)^{2/3}-2 \sqrt[3]{3} \left(-i+\sqrt{3}\right) f k\right) \left(\sqrt[3]{2} \left(-3 i+\sqrt{3}\right) \left(\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2\right)^{2/3}-2 \sqrt[3]{3} \left(3 i+\sqrt{3}\right) f k\right)}\right)-\Pi \left(\frac{\sqrt[3]{2} \left(-i+\sqrt{3}\right) \left(\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2\right)^{2/3}-2 \sqrt[3]{3} \left(i+\sqrt{3}\right) f k}{\sqrt[3]{2} \left(-3 i+\sqrt{3}\right) \left(\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2\right)^{2/3}-2 \sqrt[3]{3} \left(3 i+\sqrt{3}\right) f k};\sin ^{-1}\left(\sqrt{6} \sqrt{\frac{f \left(2 \left(3 i+\sqrt{3}\right) f k \sqrt[3]{3 \sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-27 a f^2}-\sqrt[3]{2} \left(-3 i+\sqrt{3}\right) \left(\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2\right)\right) x}{\left(\sqrt[3]{2} \left(-i+\sqrt{3}\right) \left(\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2\right)^{2/3}-2 \sqrt[3]{3} \left(i+\sqrt{3}\right) f k\right) \left(2 \sqrt[3]{2} 3^{2/3} f k-6 f \sqrt[3]{\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2} x+\sqrt[3]{3} \left(2 \sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-18 a f^2\right)^{2/3}\right)}}\right)|\frac{\left(\sqrt[3]{2} \left(-i+\sqrt{3}\right) \left(\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2\right)^{2/3}-2 \sqrt[3]{3} \left(i+\sqrt{3}\right) f k\right) \left(\sqrt[3]{2} \left(3 i+\sqrt{3}\right) \left(\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2\right)^{2/3}-2 \sqrt[3]{3} \left(-3 i+\sqrt{3}\right) f k\right)}{\left(\sqrt[3]{2} \left(i+\sqrt{3}\right) \left(\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2\right)^{2/3}-2 \sqrt[3]{3} \left(-i+\sqrt{3}\right) f k\right) \left(\sqrt[3]{2} \left(-3 i+\sqrt{3}\right) \left(\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2\right)^{2/3}-2 \sqrt[3]{3} \left(3 i+\sqrt{3}\right) f k\right)}\right)\right)}{\sqrt{3} f^2 \left(\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2\right)^{2/3} \left(2 \sqrt[3]{3} \left(3 i+\sqrt{3}\right) f k-\sqrt[3]{2} \left(-3 i+\sqrt{3}\right) \left(\sqrt{3} \sqrt{f^3 \left(27 a^2 f-4 k^3\right)}-9 a f^2\right)^{2/3}\right) x^2 \sqrt{f+\frac{a-k x}{x^3}}}$$

This expression has an evaluation of EllipticF, $$F$$, and EllipticPi, $$\Pi$$. Both of them have some weird TeX rendering with $$|$$ and $$;$$. If this is buggy or makes the page slow, I'll remove it and link to an image instead.

I'd like to verify the Mathematica result by taking a derivative, but

Simplify@D[Simplify@ToRadicals@Integrate[1/(x Sqrt[f+a x^-3-k x^-2]),x],x]


doesn't evaluate for me.

Interestingly, calling Integrate[1/(x Sqrt[f+a x^-3-k x^-2]),{x,1,u}] takes a very long time to evaluate (I don't know if it completes). To evaluate the result another way, you can do something like

Remove@result
result[x_] = Integrate[1/(x Sqrt[f+a x^-3-k x^-2]),x]


once, then use it

N[result[99]-result[1]/.{k->1,f->2,a->2}]


with whatever values you like, or for plotting.

 (2 (EllipticF[ArcSin[Sqrt[(x (-Root[a - k #1 + f #1^3 &, 1] +
Root[a - k #1 + f #1^3 &, 3]))/((x -
Root[a - k #1 + f #1^3 &, 1]) Root[a - k #1 + f #1^3 &,
3])]], ((Root[a - k #1 + f #1^3 &, 1] -
Root[a - k #1 + f #1^3 &, 2]) Root[a - k #1 + f #1^3 &, 3])/(
Root[a - k #1 + f #1^3 &, 2] (Root[a - k #1 + f #1^3 &, 1] -
Root[a - k #1 + f #1^3 &, 3]))] -
EllipticPi[Root[a - k #1 + f #1^3 &, 3]/(-Root[a - k #1 + f #1^3 &, 1]
+ Root[a - k #1 + f #1^3 &, 3]),
ArcSin[Sqrt[(x (-Root[a - k #1 + f #1^3 &, 1] +
Root[a - k #1 + f #1^3 &, 3]))/((x -
Root[a - k #1 + f #1^3 &, 1]) Root[a - k #1 + f #1^3 &,
3])]], ((Root[a - k #1 + f #1^3 &, 1] -
Root[a - k #1 + f #1^3 &, 2]) Root[a - k #1 + f #1^3 &, 3])/(
Root[a - k #1 + f #1^3 &,
2] (Root[a - k #1 + f #1^3 &, 1] -
Root[a - k #1 + f #1^3 &, 3]))]) (x - Root[a - k #1 + f #1^3 &, 1])^2 Sqrt[(
Root[a - k #1 + f #1^3 &, 1] (x - Root[a - k #1 + f #1^3 &, 2]))/((x - Root[a - k #1 + f #1^3 &, 1]) Root[a - k #1 + f #1^3 &, 2])]Root[a - k #1 + f #1^3 &, 3] \[Sqrt]((x Root[a - k #1 + f #1^3 &,
1] (x - Root[a - k #1 + f #1^3 &, 3]) (-Root[a - k #1 + f #1^3 &, 1] + Root[a - k #1 + f #1^3 &, 3]))/((x - Root[a - k #1 + f #1^3 &, 1])^2 Root[a - k #1 + f #1^3 &, 3]^2)))/(x^2 Sqrt[f + (a - k x)/x^3] (Root[a - k #1 + f #1^3 &, 1] - Root[a - k #1 + f #1^3 &, 3]))

• The op has changed the question again. It is now definite integral. so the answer should not have $x$ in it. And it would be better to have the answer be self contained. i.e. including the input and output and not just the output just to make it more clear. Apr 20 at 19:34
• Can anyone make more simple this solution?? Integrate[1/(xSqrt[f + ax^-3 - k*x^-2]), x] Apr 20 at 19:52
• @FelipeDura it does not look like the indefinite integral can be expressed in terms of elementary functions, which is what you seem to want. Mathematica's result using Elliptic functions could be the best one can hope for. I tried this in other CAS systems, and non of them solved it, other than Maple, which gives similar result to Mathematica's. Apr 20 at 19:56
• What about if we solve this under some limit like x->infinity and see which terms play important rule!! Apr 20 at 20:04
• @FelipeDura well, we cannot be guessing that you wanted these things, I hope you can understand that. AsymptoticIntegrate` is the command you want by the way
– bmf
Apr 20 at 20:09

AsymptoticIntegrate[1/(xSqrt[f + ax^-3 - k*x^-2]), x, x -> 1]

• This does not appear to answer the question. Apr 20 at 21:08
• Is there anyway to compute like numerical or parametric integral?!! Apr 21 at 14:22
• @bbgodfrey I tried to flag this as not-being-an-answer to no avail.
– bmf
Apr 21 at 16:18