Integrand size = 40, antiderivative size = 108 \[ \int \frac {-1+k^3 x^3}{\sqrt {(1-x) x \left (1-k^2 x\right )} \left (1+k^3 x^3\right )} \, dx=-\frac {2 \arctan \left (\frac {(1+k) x}{\sqrt {x+\left (-1-k^2\right ) x^2+k^2 x^3}}\right )}{3 (1+k)}-\frac {4 \arctan \left (\frac {\sqrt {1-k+k^2} \sqrt {x+\left (-1-k^2\right ) x^2+k^2 x^3}}{(-1+x) \left (-1+k^2 x\right )}\right )}{3 \sqrt {1-k+k^2}} \] Output:
-2*arctan((1+k)*x/(x+(-k^2-1)*x^2+k^2*x^3)^(1/2))/(3+3*k)-4/3*arctan((k^2- k+1)^(1/2)*(x+(-k^2-1)*x^2+k^2*x^3)^(1/2)/(-1+x)/(k^2*x-1))/(k^2-k+1)^(1/2 )
Time = 15.27 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.73 \[ \int \frac {-1+k^3 x^3}{\sqrt {(1-x) x \left (1-k^2 x\right )} \left (1+k^3 x^3\right )} \, dx=-\frac {2 \arctan \left (\frac {(1+k) x}{\sqrt {(-1+x) x \left (-1+k^2 x\right )}}\right )}{3 (1+k)}-\frac {4 \arctan \left (\frac {\sqrt {1-k+k^2} x}{\sqrt {(-1+x) x \left (-1+k^2 x\right )}}\right )}{3 \sqrt {1-k+k^2}} \] Input:
Integrate[(-1 + k^3*x^3)/(Sqrt[(1 - x)*x*(1 - k^2*x)]*(1 + k^3*x^3)),x]
Output:
(-2*ArcTan[((1 + k)*x)/Sqrt[(-1 + x)*x*(-1 + k^2*x)]])/(3*(1 + k)) - (4*Ar cTan[(Sqrt[1 - k + k^2]*x)/Sqrt[(-1 + x)*x*(-1 + k^2*x)]])/(3*Sqrt[1 - k + k^2])
Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.
Time = 7.43 (sec) , antiderivative size = 1360, normalized size of antiderivative = 12.59, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2467, 25, 2035, 7276, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {k^3 x^3-1}{\sqrt {(1-x) x \left (1-k^2 x\right )} \left (k^3 x^3+1\right )} \, dx\) |
\(\Big \downarrow \) 2467 |
\(\displaystyle \frac {\sqrt {x} \sqrt {k^2 x^2-\left (k^2+1\right ) x+1} \int -\frac {1-k^3 x^3}{\sqrt {x} \sqrt {k^2 x^2-\left (k^2+1\right ) x+1} \left (k^3 x^3+1\right )}dx}{\sqrt {(1-x) x \left (1-k^2 x\right )}}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\sqrt {x} \sqrt {k^2 x^2-\left (k^2+1\right ) x+1} \int \frac {1-k^3 x^3}{\sqrt {x} \sqrt {k^2 x^2-\left (k^2+1\right ) x+1} \left (k^3 x^3+1\right )}dx}{\sqrt {(1-x) x \left (1-k^2 x\right )}}\) |
\(\Big \downarrow \) 2035 |
\(\displaystyle -\frac {2 \sqrt {x} \sqrt {k^2 x^2-\left (k^2+1\right ) x+1} \int \frac {1-k^3 x^3}{\sqrt {k^2 x^2-\left (k^2+1\right ) x+1} \left (k^3 x^3+1\right )}d\sqrt {x}}{\sqrt {(1-x) x \left (1-k^2 x\right )}}\) |
\(\Big \downarrow \) 7276 |
\(\displaystyle -\frac {2 \sqrt {x} \sqrt {k^2 x^2-\left (k^2+1\right ) x+1} \int \left (\frac {2}{\sqrt {k^2 x^2-\left (k^2+1\right ) x+1} \left (k^3 x^3+1\right )}-\frac {1}{\sqrt {k^2 x^2-\left (k^2+1\right ) x+1}}\right )d\sqrt {x}}{\sqrt {(1-x) x \left (1-k^2 x\right )}}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {2 \sqrt {x} \sqrt {k^2 x^2-\left (k^2+1\right ) x+1} \left (\frac {\sqrt {k} \arctan \left (\frac {\sqrt {k^3-\sqrt [3]{-k^3} k+k+\left (-k^3\right )^{2/3}} \sqrt {x}}{\sqrt {k} \sqrt {k^2 x^2-\left (k^2+1\right ) x+1}}\right )}{3 \sqrt {k^3-\sqrt [3]{-k^3} k+k+\left (-k^3\right )^{2/3}}}+\frac {\sqrt {k} \arctan \left (\frac {\sqrt {k^3+\sqrt [3]{-1} \sqrt [3]{-k^3} k+k+(-1)^{2/3} \left (-k^3\right )^{2/3}} \sqrt {x}}{\sqrt {k} \sqrt {k^2 x^2-\left (k^2+1\right ) x+1}}\right )}{3 \sqrt {k^3+\sqrt [3]{-1} \sqrt [3]{-k^3} k+k+(-1)^{2/3} \left (-k^3\right )^{2/3}}}+\frac {\sqrt [6]{-k^3} \arctan \left (\frac {\sqrt {\left (\sqrt [3]{-k^3}+\sqrt [3]{-1}\right ) k^2-(-1)^{2/3} \left (-k^3\right )^{2/3}+\sqrt [3]{-k^3}} \sqrt {x}}{\sqrt [6]{-k^3} \sqrt {k^2 x^2-\left (k^2+1\right ) x+1}}\right )}{3 \sqrt {\left (\sqrt [3]{-k^3}+\sqrt [3]{-1}\right ) k^2-(-1)^{2/3} \left (-k^3\right )^{2/3}+\sqrt [3]{-k^3}}}-\frac {(k x+1) \sqrt {\frac {k^2 x^2-\left (k^2+1\right ) x+1}{(k x+1)^2}} \operatorname {EllipticF}\left (2 \arctan \left (\sqrt {k} \sqrt {x}\right ),\frac {(k+1)^2}{4 k}\right )}{2 \sqrt {k} \sqrt {k^2 x^2-\left (k^2+1\right ) x+1}}+\frac {\sqrt {k} (k x+1) \sqrt {\frac {k^2 x^2-\left (k^2+1\right ) x+1}{(k x+1)^2}} \operatorname {EllipticF}\left (2 \arctan \left (\sqrt {k} \sqrt {x}\right ),\frac {(k+1)^2}{4 k}\right )}{3 \left (k+\sqrt [3]{-k^3}\right ) \sqrt {k^2 x^2-\left (k^2+1\right ) x+1}}+\frac {\sqrt {k} (k x+1) \sqrt {\frac {k^2 x^2-\left (k^2+1\right ) x+1}{(k x+1)^2}} \operatorname {EllipticF}\left (2 \arctan \left (\sqrt {k} \sqrt {x}\right ),\frac {(k+1)^2}{4 k}\right )}{3 \left (k-\sqrt [3]{-1} \sqrt [3]{-k^3}\right ) \sqrt {k^2 x^2-\left (k^2+1\right ) x+1}}+\frac {\sqrt {k} \left (k-(-1)^{2/3} \sqrt [3]{-k^3}\right ) (k x+1) \sqrt {\frac {k^2 x^2-\left (k^2+1\right ) x+1}{(k x+1)^2}} \operatorname {EllipticF}\left (2 \arctan \left (\sqrt {k} \sqrt {x}\right ),\frac {(k+1)^2}{4 k}\right )}{3 \left (k^2+\sqrt [3]{-1} \left (-k^3\right )^{2/3}\right ) \sqrt {k^2 x^2-\left (k^2+1\right ) x+1}}-\frac {\left (k-\sqrt [3]{-k^3}\right ) (k x+1) \sqrt {\frac {k^2 x^2-\left (k^2+1\right ) x+1}{(k x+1)^2}} \operatorname {EllipticPi}\left (\frac {\left (k+\sqrt [3]{-k^3}\right )^2}{4 k \sqrt [3]{-k^3}},2 \arctan \left (\sqrt {k} \sqrt {x}\right ),\frac {(k+1)^2}{4 k}\right )}{6 \sqrt {k} \left (k+\sqrt [3]{-k^3}\right ) \sqrt {k^2 x^2-\left (k^2+1\right ) x+1}}-\frac {\left (k+\sqrt [3]{-1} \sqrt [3]{-k^3}\right ) (k x+1) \sqrt {\frac {k^2 x^2-\left (k^2+1\right ) x+1}{(k x+1)^2}} \operatorname {EllipticPi}\left (\frac {(-1)^{2/3} \left (k-\sqrt [3]{-1} \sqrt [3]{-k^3}\right )^2}{4 k \sqrt [3]{-k^3}},2 \arctan \left (\sqrt {k} \sqrt {x}\right ),\frac {(k+1)^2}{4 k}\right )}{6 \sqrt {k} \left (k-\sqrt [3]{-1} \sqrt [3]{-k^3}\right ) \sqrt {k^2 x^2-\left (k^2+1\right ) x+1}}-\frac {\left (k^2-2 (-1)^{2/3} \sqrt [3]{-k^3} k-\sqrt [3]{-1} \left (-k^3\right )^{2/3}\right ) (k x+1) \sqrt {\frac {k^2 x^2-\left (k^2+1\right ) x+1}{(k x+1)^2}} \operatorname {EllipticPi}\left (\frac {\sqrt [3]{-1} k^2 \left (k+(-1)^{2/3} \sqrt [3]{-k^3}\right )^2}{4 \left (-k^3\right )^{4/3}},2 \arctan \left (\sqrt {k} \sqrt {x}\right ),\frac {(k+1)^2}{4 k}\right )}{6 \sqrt {k} \left (k^2+\sqrt [3]{-1} \left (-k^3\right )^{2/3}\right ) \sqrt {k^2 x^2-\left (k^2+1\right ) x+1}}\right )}{\sqrt {(1-x) x \left (1-k^2 x\right )}}\) |
Input:
Int[(-1 + k^3*x^3)/(Sqrt[(1 - x)*x*(1 - k^2*x)]*(1 + k^3*x^3)),x]
Output:
(-2*Sqrt[x]*Sqrt[1 - (1 + k^2)*x + k^2*x^2]*((Sqrt[k]*ArcTan[(Sqrt[k + k^3 - k*(-k^3)^(1/3) + (-k^3)^(2/3)]*Sqrt[x])/(Sqrt[k]*Sqrt[1 - (1 + k^2)*x + k^2*x^2])])/(3*Sqrt[k + k^3 - k*(-k^3)^(1/3) + (-k^3)^(2/3)]) + (Sqrt[k]* ArcTan[(Sqrt[k + k^3 + (-1)^(1/3)*k*(-k^3)^(1/3) + (-1)^(2/3)*(-k^3)^(2/3) ]*Sqrt[x])/(Sqrt[k]*Sqrt[1 - (1 + k^2)*x + k^2*x^2])])/(3*Sqrt[k + k^3 + ( -1)^(1/3)*k*(-k^3)^(1/3) + (-1)^(2/3)*(-k^3)^(2/3)]) + ((-k^3)^(1/6)*ArcTa n[(Sqrt[(-k^3)^(1/3) - (-1)^(2/3)*(-k^3)^(2/3) + k^2*((-1)^(1/3) + (-k^3)^ (1/3))]*Sqrt[x])/((-k^3)^(1/6)*Sqrt[1 - (1 + k^2)*x + k^2*x^2])])/(3*Sqrt[ (-k^3)^(1/3) - (-1)^(2/3)*(-k^3)^(2/3) + k^2*((-1)^(1/3) + (-k^3)^(1/3))]) - ((1 + k*x)*Sqrt[(1 - (1 + k^2)*x + k^2*x^2)/(1 + k*x)^2]*EllipticF[2*Ar cTan[Sqrt[k]*Sqrt[x]], (1 + k)^2/(4*k)])/(2*Sqrt[k]*Sqrt[1 - (1 + k^2)*x + k^2*x^2]) + (Sqrt[k]*(1 + k*x)*Sqrt[(1 - (1 + k^2)*x + k^2*x^2)/(1 + k*x) ^2]*EllipticF[2*ArcTan[Sqrt[k]*Sqrt[x]], (1 + k)^2/(4*k)])/(3*(k + (-k^3)^ (1/3))*Sqrt[1 - (1 + k^2)*x + k^2*x^2]) + (Sqrt[k]*(1 + k*x)*Sqrt[(1 - (1 + k^2)*x + k^2*x^2)/(1 + k*x)^2]*EllipticF[2*ArcTan[Sqrt[k]*Sqrt[x]], (1 + k)^2/(4*k)])/(3*(k - (-1)^(1/3)*(-k^3)^(1/3))*Sqrt[1 - (1 + k^2)*x + k^2* x^2]) + (Sqrt[k]*(k - (-1)^(2/3)*(-k^3)^(1/3))*(1 + k*x)*Sqrt[(1 - (1 + k^ 2)*x + k^2*x^2)/(1 + k*x)^2]*EllipticF[2*ArcTan[Sqrt[k]*Sqrt[x]], (1 + k)^ 2/(4*k)])/(3*(k^2 + (-1)^(1/3)*(-k^3)^(2/3))*Sqrt[1 - (1 + k^2)*x + k^2*x^ 2]) - ((k - (-k^3)^(1/3))*(1 + k*x)*Sqrt[(1 - (1 + k^2)*x + k^2*x^2)/(1...
Int[(Fx_)*(x_)^(m_), x_Symbol] :> With[{k = Denominator[m]}, Simp[k Subst [Int[x^(k*(m + 1) - 1)*SubstPower[Fx, x, k], x], x, x^(1/k)], x]] /; Fracti onQ[m] && AlgebraicFunctionQ[Fx, x]
Int[(Fx_.)*(Px_)^(p_), x_Symbol] :> With[{r = Expon[Px, x, Min]}, Simp[Px^F racPart[p]/(x^(r*FracPart[p])*ExpandToSum[Px/x^r, x]^FracPart[p]) Int[x^( p*r)*ExpandToSum[Px/x^r, x]^p*Fx, x], x] /; IGtQ[r, 0]] /; FreeQ[p, x] && P olyQ[Px, x] && !IntegerQ[p] && !MonomialQ[Px, x] && !PolyQ[Fx, x]
Int[(u_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> With[{v = RationalFunctionE xpand[u/(a + b*x^n), x]}, Int[v, x] /; SumQ[v]] /; FreeQ[{a, b}, x] && IGtQ [n, 0]
Time = 1.27 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.70
method | result | size |
default | \(\frac {4 \arctan \left (\frac {\sqrt {\left (-1+x \right ) x \left (k^{2} x -1\right )}}{x \sqrt {k^{2}-k +1}}\right )}{3 \sqrt {k^{2}-k +1}}+\frac {2 \arctan \left (\frac {\sqrt {\left (-1+x \right ) x \left (k^{2} x -1\right )}}{\left (1+k \right ) x}\right )}{3+3 k}\) | \(76\) |
pseudoelliptic | \(\frac {4 \arctan \left (\frac {\sqrt {\left (-1+x \right ) x \left (k^{2} x -1\right )}}{x \sqrt {k^{2}-k +1}}\right )}{3 \sqrt {k^{2}-k +1}}+\frac {2 \arctan \left (\frac {\sqrt {\left (-1+x \right ) x \left (k^{2} x -1\right )}}{\left (1+k \right ) x}\right )}{3+3 k}\) | \(76\) |
elliptic | \(\text {Expression too large to display}\) | \(907\) |
Input:
int((k^3*x^3-1)/((1-x)*x*(-k^2*x+1))^(1/2)/(k^3*x^3+1),x,method=_RETURNVER BOSE)
Output:
4/3/(k^2-k+1)^(1/2)*arctan(((-1+x)*x*(k^2*x-1))^(1/2)/x/(k^2-k+1)^(1/2))+2 *arctan(((-1+x)*x*(k^2*x-1))^(1/2)/(1+k)/x)/(3+3*k)
Leaf count of result is larger than twice the leaf count of optimal. 217 vs. \(2 (94) = 188\).
Time = 0.14 (sec) , antiderivative size = 217, normalized size of antiderivative = 2.01 \[ \int \frac {-1+k^3 x^3}{\sqrt {(1-x) x \left (1-k^2 x\right )} \left (1+k^3 x^3\right )} \, dx=\frac {2 \, \sqrt {k^{2} - k + 1} {\left (k + 1\right )} \arctan \left (\frac {\sqrt {k^{2} x^{3} - {\left (k^{2} + 1\right )} x^{2} + x} {\left (k^{2} x^{2} - {\left (2 \, k^{2} - k + 2\right )} x + 1\right )} \sqrt {k^{2} - k + 1}}{2 \, {\left ({\left (k^{4} - k^{3} + k^{2}\right )} x^{3} - {\left (k^{4} - k^{3} + 2 \, k^{2} - k + 1\right )} x^{2} + {\left (k^{2} - k + 1\right )} x\right )}}\right ) + {\left (k^{2} - k + 1\right )} \arctan \left (\frac {\sqrt {k^{2} x^{3} - {\left (k^{2} + 1\right )} x^{2} + x} {\left (k^{2} x^{2} - 2 \, {\left (k^{2} + k + 1\right )} x + 1\right )}}{2 \, {\left ({\left (k^{3} + k^{2}\right )} x^{3} - {\left (k^{3} + k^{2} + k + 1\right )} x^{2} + {\left (k + 1\right )} x\right )}}\right )}{3 \, {\left (k^{3} + 1\right )}} \] Input:
integrate((k^3*x^3-1)/((1-x)*x*(-k^2*x+1))^(1/2)/(k^3*x^3+1),x, algorithm= "fricas")
Output:
1/3*(2*sqrt(k^2 - k + 1)*(k + 1)*arctan(1/2*sqrt(k^2*x^3 - (k^2 + 1)*x^2 + x)*(k^2*x^2 - (2*k^2 - k + 2)*x + 1)*sqrt(k^2 - k + 1)/((k^4 - k^3 + k^2) *x^3 - (k^4 - k^3 + 2*k^2 - k + 1)*x^2 + (k^2 - k + 1)*x)) + (k^2 - k + 1) *arctan(1/2*sqrt(k^2*x^3 - (k^2 + 1)*x^2 + x)*(k^2*x^2 - 2*(k^2 + k + 1)*x + 1)/((k^3 + k^2)*x^3 - (k^3 + k^2 + k + 1)*x^2 + (k + 1)*x)))/(k^3 + 1)
Timed out. \[ \int \frac {-1+k^3 x^3}{\sqrt {(1-x) x \left (1-k^2 x\right )} \left (1+k^3 x^3\right )} \, dx=\text {Timed out} \] Input:
integrate((k**3*x**3-1)/((1-x)*x*(-k**2*x+1))**(1/2)/(k**3*x**3+1),x)
Output:
Timed out
\[ \int \frac {-1+k^3 x^3}{\sqrt {(1-x) x \left (1-k^2 x\right )} \left (1+k^3 x^3\right )} \, dx=\int { \frac {k^{3} x^{3} - 1}{{\left (k^{3} x^{3} + 1\right )} \sqrt {{\left (k^{2} x - 1\right )} {\left (x - 1\right )} x}} \,d x } \] Input:
integrate((k^3*x^3-1)/((1-x)*x*(-k^2*x+1))^(1/2)/(k^3*x^3+1),x, algorithm= "maxima")
Output:
integrate((k^3*x^3 - 1)/((k^3*x^3 + 1)*sqrt((k^2*x - 1)*(x - 1)*x)), x)
\[ \int \frac {-1+k^3 x^3}{\sqrt {(1-x) x \left (1-k^2 x\right )} \left (1+k^3 x^3\right )} \, dx=\int { \frac {k^{3} x^{3} - 1}{{\left (k^{3} x^{3} + 1\right )} \sqrt {{\left (k^{2} x - 1\right )} {\left (x - 1\right )} x}} \,d x } \] Input:
integrate((k^3*x^3-1)/((1-x)*x*(-k^2*x+1))^(1/2)/(k^3*x^3+1),x, algorithm= "giac")
Output:
integrate((k^3*x^3 - 1)/((k^3*x^3 + 1)*sqrt((k^2*x - 1)*(x - 1)*x)), x)
Timed out. \[ \int \frac {-1+k^3 x^3}{\sqrt {(1-x) x \left (1-k^2 x\right )} \left (1+k^3 x^3\right )} \, dx=\text {Hanged} \] Input:
int((k^3*x^3 - 1)/((k^3*x^3 + 1)*(x*(k^2*x - 1)*(x - 1))^(1/2)),x)
Output:
\text{Hanged}
\[ \int \frac {-1+k^3 x^3}{\sqrt {(1-x) x \left (1-k^2 x\right )} \left (1+k^3 x^3\right )} \, dx=\left (\int \frac {\sqrt {x}\, \sqrt {x -1}\, \sqrt {k^{2} x -1}\, x^{2}}{k^{5} x^{5}-k^{5} x^{4}-k^{3} x^{4}+k^{3} x^{3}+k^{2} x^{2}-k^{2} x -x +1}d x \right ) k^{3}-\left (\int \frac {\sqrt {x}\, \sqrt {x -1}\, \sqrt {k^{2} x -1}}{k^{5} x^{6}-k^{5} x^{5}-k^{3} x^{5}+k^{3} x^{4}+k^{2} x^{3}-k^{2} x^{2}-x^{2}+x}d x \right ) \] Input:
int((k^3*x^3-1)/((1-x)*x*(-k^2*x+1))^(1/2)/(k^3*x^3+1),x)
Output:
int((sqrt(x)*sqrt(x - 1)*sqrt(k**2*x - 1)*x**2)/(k**5*x**5 - k**5*x**4 - k **3*x**4 + k**3*x**3 + k**2*x**2 - k**2*x - x + 1),x)*k**3 - int((sqrt(x)* sqrt(x - 1)*sqrt(k**2*x - 1))/(k**5*x**6 - k**5*x**5 - k**3*x**5 + k**3*x* *4 + k**2*x**3 - k**2*x**2 - x**2 + x),x)