\(\int \frac {1-x^2+x^4}{\sqrt {x+x^2+x^3} (-1+x^4)} \, dx\) [1220]

   Optimal result
   Rubi [C] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 30, antiderivative size = 89 \[ \int \frac {1-x^2+x^4}{\sqrt {x+x^2+x^3} \left (-1+x^4\right )} \, dx=-\frac {1}{4} \arctan \left (\frac {\sqrt {x+x^2+x^3}}{1+x+x^2}\right )-\frac {3}{2} \text {arctanh}\left (\frac {\sqrt {x+x^2+x^3}}{1+x+x^2}\right )-\frac {\text {arctanh}\left (\frac {\sqrt {3} \sqrt {x+x^2+x^3}}{1+x+x^2}\right )}{4 \sqrt {3}} \]

[Out]

-1/4*arctan((x^3+x^2+x)^(1/2)/(x^2+x+1))-3/2*arctanh((x^3+x^2+x)^(1/2)/(x^2+x+1))-1/12*arctanh(3^(1/2)*(x^3+x^
2+x)^(1/2)/(x^2+x+1))*3^(1/2)

Rubi [C] (verified)

Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.

Time = 2.17 (sec) , antiderivative size = 592, normalized size of antiderivative = 6.65, number of steps used = 31, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {2081, 6857, 730, 1117, 948, 175, 552, 551} \[ \int \frac {1-x^2+x^4}{\sqrt {x+x^2+x^3} \left (-1+x^4\right )} \, dx=-\frac {3 \sqrt {x} \sqrt {1+\frac {2 x}{1-i \sqrt {3}}} \sqrt {1+\frac {2 x}{1+i \sqrt {3}}} \operatorname {EllipticPi}\left (\frac {1}{2} \left (-i-\sqrt {3}\right ),\arcsin \left (\frac {1}{2} \left (1-i \sqrt {3}\right ) \sqrt {x}\right ),\frac {i+\sqrt {3}}{i-\sqrt {3}}\right )}{\left (1-i \sqrt {3}\right ) \sqrt {x^3+x^2+x}}-\frac {\sqrt {x} \sqrt {1+\frac {2 x}{1-i \sqrt {3}}} \sqrt {1+\frac {2 x}{1+i \sqrt {3}}} \operatorname {EllipticPi}\left (\frac {1}{2} \left (1-i \sqrt {3}\right ),\arcsin \left (\frac {1}{2} \left (1-i \sqrt {3}\right ) \sqrt {x}\right ),\frac {i+\sqrt {3}}{i-\sqrt {3}}\right )}{\left (1-i \sqrt {3}\right ) \sqrt {x^3+x^2+x}}-\frac {\sqrt {x} \sqrt {1+\frac {2 x}{1-i \sqrt {3}}} \sqrt {1+\frac {2 x}{1+i \sqrt {3}}} \operatorname {EllipticPi}\left (\frac {1}{2} \left (-1+i \sqrt {3}\right ),\arcsin \left (\frac {1}{2} \left (1-i \sqrt {3}\right ) \sqrt {x}\right ),\frac {i+\sqrt {3}}{i-\sqrt {3}}\right )}{\left (1-i \sqrt {3}\right ) \sqrt {x^3+x^2+x}}-\frac {3 \sqrt {x} \sqrt {1+\frac {2 x}{1-i \sqrt {3}}} \sqrt {1+\frac {2 x}{1+i \sqrt {3}}} \operatorname {EllipticPi}\left (\frac {1}{2} \left (i+\sqrt {3}\right ),\arcsin \left (\frac {1}{2} \left (1-i \sqrt {3}\right ) \sqrt {x}\right ),\frac {i+\sqrt {3}}{i-\sqrt {3}}\right )}{\left (1-i \sqrt {3}\right ) \sqrt {x^3+x^2+x}}+\frac {\sqrt {x} (x+1) \sqrt {\frac {x^2+x+1}{(x+1)^2}} \operatorname {EllipticF}\left (2 \arctan \left (\sqrt {x}\right ),\frac {1}{4}\right )}{\sqrt {x^3+x^2+x}} \]

[In]

Int[(1 - x^2 + x^4)/(Sqrt[x + x^2 + x^3]*(-1 + x^4)),x]

[Out]

(Sqrt[x]*(1 + x)*Sqrt[(1 + x + x^2)/(1 + x)^2]*EllipticF[2*ArcTan[Sqrt[x]], 1/4])/Sqrt[x + x^2 + x^3] - (3*Sqr
t[x]*Sqrt[1 + (2*x)/(1 - I*Sqrt[3])]*Sqrt[1 + (2*x)/(1 + I*Sqrt[3])]*EllipticPi[(-I - Sqrt[3])/2, ArcSin[((1 -
 I*Sqrt[3])*Sqrt[x])/2], (I + Sqrt[3])/(I - Sqrt[3])])/((1 - I*Sqrt[3])*Sqrt[x + x^2 + x^3]) - (Sqrt[x]*Sqrt[1
 + (2*x)/(1 - I*Sqrt[3])]*Sqrt[1 + (2*x)/(1 + I*Sqrt[3])]*EllipticPi[(1 - I*Sqrt[3])/2, ArcSin[((1 - I*Sqrt[3]
)*Sqrt[x])/2], (I + Sqrt[3])/(I - Sqrt[3])])/((1 - I*Sqrt[3])*Sqrt[x + x^2 + x^3]) - (Sqrt[x]*Sqrt[1 + (2*x)/(
1 - I*Sqrt[3])]*Sqrt[1 + (2*x)/(1 + I*Sqrt[3])]*EllipticPi[(-1 + I*Sqrt[3])/2, ArcSin[((1 - I*Sqrt[3])*Sqrt[x]
)/2], (I + Sqrt[3])/(I - Sqrt[3])])/((1 - I*Sqrt[3])*Sqrt[x + x^2 + x^3]) - (3*Sqrt[x]*Sqrt[1 + (2*x)/(1 - I*S
qrt[3])]*Sqrt[1 + (2*x)/(1 + I*Sqrt[3])]*EllipticPi[(I + Sqrt[3])/2, ArcSin[((1 - I*Sqrt[3])*Sqrt[x])/2], (I +
 Sqrt[3])/(I - Sqrt[3])])/((1 - I*Sqrt[3])*Sqrt[x + x^2 + x^3])

Rule 175

Int[1/(((a_.) + (b_.)*(x_))*Sqrt[(c_.) + (d_.)*(x_)]*Sqrt[(e_.) + (f_.)*(x_)]*Sqrt[(g_.) + (h_.)*(x_)]), x_Sym
bol] :> Dist[-2, Subst[Int[1/(Simp[b*c - a*d - b*x^2, x]*Sqrt[Simp[(d*e - c*f)/d + f*(x^2/d), x]]*Sqrt[Simp[(d
*g - c*h)/d + h*(x^2/d), x]]), x], x, Sqrt[c + d*x]], x] /; FreeQ[{a, b, c, d, e, f, g, h}, x] &&  !SimplerQ[e
 + f*x, c + d*x] &&  !SimplerQ[g + h*x, c + d*x]

Rule 551

Int[1/(((a_) + (b_.)*(x_)^2)*Sqrt[(c_) + (d_.)*(x_)^2]*Sqrt[(e_) + (f_.)*(x_)^2]), x_Symbol] :> Simp[(1/(a*Sqr
t[c]*Sqrt[e]*Rt[-d/c, 2]))*EllipticPi[b*(c/(a*d)), ArcSin[Rt[-d/c, 2]*x], c*(f/(d*e))], x] /; FreeQ[{a, b, c,
d, e, f}, x] &&  !GtQ[d/c, 0] && GtQ[c, 0] && GtQ[e, 0] &&  !( !GtQ[f/e, 0] && SimplerSqrtQ[-f/e, -d/c])

Rule 552

Int[1/(((a_) + (b_.)*(x_)^2)*Sqrt[(c_) + (d_.)*(x_)^2]*Sqrt[(e_) + (f_.)*(x_)^2]), x_Symbol] :> Dist[Sqrt[1 +
(d/c)*x^2]/Sqrt[c + d*x^2], Int[1/((a + b*x^2)*Sqrt[1 + (d/c)*x^2]*Sqrt[e + f*x^2]), x], x] /; FreeQ[{a, b, c,
 d, e, f}, x] &&  !GtQ[c, 0]

Rule 730

Int[(x_)^(m_)/Sqrt[(a_) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[2, Subst[Int[x^(2*m + 1)/Sqrt[a + b*x^
2 + c*x^4], x], x, Sqrt[x]], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[m^2, 1/4]

Rule 948

Int[1/(((d_.) + (e_.)*(x_))*Sqrt[(f_.) + (g_.)*(x_)]*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]), x_Symbol] :> Wi
th[{q = Rt[b^2 - 4*a*c, 2]}, Dist[Sqrt[b - q + 2*c*x]*(Sqrt[b + q + 2*c*x]/Sqrt[a + b*x + c*x^2]), Int[1/((d +
 e*x)*Sqrt[f + g*x]*Sqrt[b - q + 2*c*x]*Sqrt[b + q + 2*c*x]), x], x]] /; FreeQ[{a, b, c, d, e, f, g}, x] && Ne
Q[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0]

Rule 1117

Int[1/Sqrt[(a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4], x_Symbol] :> With[{q = Rt[c/a, 4]}, Simp[(1 + q^2*x^2)*(Sqrt[(
a + b*x^2 + c*x^4)/(a*(1 + q^2*x^2)^2)]/(2*q*Sqrt[a + b*x^2 + c*x^4]))*EllipticF[2*ArcTan[q*x], 1/2 - b*(q^2/(
4*c))], x]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && PosQ[c/a]

Rule 2081

Int[(u_.)*(P_)^(p_.), x_Symbol] :> With[{m = MinimumMonomialExponent[P, x]}, Dist[P^FracPart[p]/(x^(m*FracPart
[p])*Distrib[1/x^m, P]^FracPart[p]), Int[u*x^(m*p)*Distrib[1/x^m, P]^p, x], x]] /; FreeQ[p, x] &&  !IntegerQ[p
] && SumQ[P] && EveryQ[BinomialQ[#1, x] & , P] &&  !PolyQ[P, x, 2]

Rule 6857

Int[(u_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> With[{v = RationalFunctionExpand[u/(a + b*x^n), x]}, Int[v, x]
 /; SumQ[v]] /; FreeQ[{a, b}, x] && IGtQ[n, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {\left (\sqrt {x} \sqrt {1+x+x^2}\right ) \int \frac {1-x^2+x^4}{\sqrt {x} \sqrt {1+x+x^2} \left (-1+x^4\right )} \, dx}{\sqrt {x+x^2+x^3}} \\ & = \frac {\left (\sqrt {x} \sqrt {1+x+x^2}\right ) \int \left (\frac {1}{\sqrt {x} \sqrt {1+x+x^2}}+\frac {2-x^2}{\sqrt {x} \sqrt {1+x+x^2} \left (-1+x^4\right )}\right ) \, dx}{\sqrt {x+x^2+x^3}} \\ & = \frac {\left (\sqrt {x} \sqrt {1+x+x^2}\right ) \int \frac {1}{\sqrt {x} \sqrt {1+x+x^2}} \, dx}{\sqrt {x+x^2+x^3}}+\frac {\left (\sqrt {x} \sqrt {1+x+x^2}\right ) \int \frac {2-x^2}{\sqrt {x} \sqrt {1+x+x^2} \left (-1+x^4\right )} \, dx}{\sqrt {x+x^2+x^3}} \\ & = \frac {\left (\sqrt {x} \sqrt {1+x+x^2}\right ) \int \left (-\frac {1}{2 \sqrt {x} \left (1-x^2\right ) \sqrt {1+x+x^2}}-\frac {3}{2 \sqrt {x} \left (1+x^2\right ) \sqrt {1+x+x^2}}\right ) \, dx}{\sqrt {x+x^2+x^3}}+\frac {\left (2 \sqrt {x} \sqrt {1+x+x^2}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1+x^2+x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^2+x^3}} \\ & = \frac {\sqrt {x} (1+x) \sqrt {\frac {1+x+x^2}{(1+x)^2}} \operatorname {EllipticF}\left (2 \arctan \left (\sqrt {x}\right ),\frac {1}{4}\right )}{\sqrt {x+x^2+x^3}}-\frac {\left (\sqrt {x} \sqrt {1+x+x^2}\right ) \int \frac {1}{\sqrt {x} \left (1-x^2\right ) \sqrt {1+x+x^2}} \, dx}{2 \sqrt {x+x^2+x^3}}-\frac {\left (3 \sqrt {x} \sqrt {1+x+x^2}\right ) \int \frac {1}{\sqrt {x} \left (1+x^2\right ) \sqrt {1+x+x^2}} \, dx}{2 \sqrt {x+x^2+x^3}} \\ & = \frac {\sqrt {x} (1+x) \sqrt {\frac {1+x+x^2}{(1+x)^2}} \operatorname {EllipticF}\left (2 \arctan \left (\sqrt {x}\right ),\frac {1}{4}\right )}{\sqrt {x+x^2+x^3}}-\frac {\left (\sqrt {x} \sqrt {1+x+x^2}\right ) \int \left (\frac {1}{2 (1-x) \sqrt {x} \sqrt {1+x+x^2}}+\frac {1}{2 \sqrt {x} (1+x) \sqrt {1+x+x^2}}\right ) \, dx}{2 \sqrt {x+x^2+x^3}}-\frac {\left (3 \sqrt {x} \sqrt {1+x+x^2}\right ) \int \left (\frac {i}{2 (i-x) \sqrt {x} \sqrt {1+x+x^2}}+\frac {i}{2 \sqrt {x} (i+x) \sqrt {1+x+x^2}}\right ) \, dx}{2 \sqrt {x+x^2+x^3}} \\ & = \frac {\sqrt {x} (1+x) \sqrt {\frac {1+x+x^2}{(1+x)^2}} \operatorname {EllipticF}\left (2 \arctan \left (\sqrt {x}\right ),\frac {1}{4}\right )}{\sqrt {x+x^2+x^3}}-\frac {\left (3 i \sqrt {x} \sqrt {1+x+x^2}\right ) \int \frac {1}{(i-x) \sqrt {x} \sqrt {1+x+x^2}} \, dx}{4 \sqrt {x+x^2+x^3}}-\frac {\left (3 i \sqrt {x} \sqrt {1+x+x^2}\right ) \int \frac {1}{\sqrt {x} (i+x) \sqrt {1+x+x^2}} \, dx}{4 \sqrt {x+x^2+x^3}}-\frac {\left (\sqrt {x} \sqrt {1+x+x^2}\right ) \int \frac {1}{(1-x) \sqrt {x} \sqrt {1+x+x^2}} \, dx}{4 \sqrt {x+x^2+x^3}}-\frac {\left (\sqrt {x} \sqrt {1+x+x^2}\right ) \int \frac {1}{\sqrt {x} (1+x) \sqrt {1+x+x^2}} \, dx}{4 \sqrt {x+x^2+x^3}} \\ & = \frac {\sqrt {x} (1+x) \sqrt {\frac {1+x+x^2}{(1+x)^2}} \operatorname {EllipticF}\left (2 \arctan \left (\sqrt {x}\right ),\frac {1}{4}\right )}{\sqrt {x+x^2+x^3}}-\frac {\left (3 i \sqrt {x} \sqrt {1-i \sqrt {3}+2 x} \sqrt {1+i \sqrt {3}+2 x}\right ) \int \frac {1}{(i-x) \sqrt {x} \sqrt {1-i \sqrt {3}+2 x} \sqrt {1+i \sqrt {3}+2 x}} \, dx}{4 \sqrt {x+x^2+x^3}}-\frac {\left (3 i \sqrt {x} \sqrt {1-i \sqrt {3}+2 x} \sqrt {1+i \sqrt {3}+2 x}\right ) \int \frac {1}{\sqrt {x} (i+x) \sqrt {1-i \sqrt {3}+2 x} \sqrt {1+i \sqrt {3}+2 x}} \, dx}{4 \sqrt {x+x^2+x^3}}-\frac {\left (\sqrt {x} \sqrt {1-i \sqrt {3}+2 x} \sqrt {1+i \sqrt {3}+2 x}\right ) \int \frac {1}{(1-x) \sqrt {x} \sqrt {1-i \sqrt {3}+2 x} \sqrt {1+i \sqrt {3}+2 x}} \, dx}{4 \sqrt {x+x^2+x^3}}-\frac {\left (\sqrt {x} \sqrt {1-i \sqrt {3}+2 x} \sqrt {1+i \sqrt {3}+2 x}\right ) \int \frac {1}{\sqrt {x} (1+x) \sqrt {1-i \sqrt {3}+2 x} \sqrt {1+i \sqrt {3}+2 x}} \, dx}{4 \sqrt {x+x^2+x^3}} \\ & = \frac {\sqrt {x} (1+x) \sqrt {\frac {1+x+x^2}{(1+x)^2}} \operatorname {EllipticF}\left (2 \arctan \left (\sqrt {x}\right ),\frac {1}{4}\right )}{\sqrt {x+x^2+x^3}}+\frac {\left (3 i \sqrt {x} \sqrt {1-i \sqrt {3}+2 x} \sqrt {1+i \sqrt {3}+2 x}\right ) \text {Subst}\left (\int \frac {1}{\left (-i-x^2\right ) \sqrt {1-i \sqrt {3}+2 x^2} \sqrt {1+i \sqrt {3}+2 x^2}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {x+x^2+x^3}}+\frac {\left (3 i \sqrt {x} \sqrt {1-i \sqrt {3}+2 x} \sqrt {1+i \sqrt {3}+2 x}\right ) \text {Subst}\left (\int \frac {1}{\left (-i+x^2\right ) \sqrt {1-i \sqrt {3}+2 x^2} \sqrt {1+i \sqrt {3}+2 x^2}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {x+x^2+x^3}}+\frac {\left (\sqrt {x} \sqrt {1-i \sqrt {3}+2 x} \sqrt {1+i \sqrt {3}+2 x}\right ) \text {Subst}\left (\int \frac {1}{\left (-1-x^2\right ) \sqrt {1-i \sqrt {3}+2 x^2} \sqrt {1+i \sqrt {3}+2 x^2}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {x+x^2+x^3}}+\frac {\left (\sqrt {x} \sqrt {1-i \sqrt {3}+2 x} \sqrt {1+i \sqrt {3}+2 x}\right ) \text {Subst}\left (\int \frac {1}{\left (-1+x^2\right ) \sqrt {1-i \sqrt {3}+2 x^2} \sqrt {1+i \sqrt {3}+2 x^2}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {x+x^2+x^3}} \\ & = \frac {\sqrt {x} (1+x) \sqrt {\frac {1+x+x^2}{(1+x)^2}} \operatorname {EllipticF}\left (2 \arctan \left (\sqrt {x}\right ),\frac {1}{4}\right )}{\sqrt {x+x^2+x^3}}+\frac {\left (3 i \sqrt {x} \sqrt {1+i \sqrt {3}+2 x} \sqrt {1+\frac {2 x}{1-i \sqrt {3}}}\right ) \text {Subst}\left (\int \frac {1}{\left (-i-x^2\right ) \sqrt {1+i \sqrt {3}+2 x^2} \sqrt {1+\frac {2 x^2}{1-i \sqrt {3}}}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {x+x^2+x^3}}+\frac {\left (3 i \sqrt {x} \sqrt {1+i \sqrt {3}+2 x} \sqrt {1+\frac {2 x}{1-i \sqrt {3}}}\right ) \text {Subst}\left (\int \frac {1}{\left (-i+x^2\right ) \sqrt {1+i \sqrt {3}+2 x^2} \sqrt {1+\frac {2 x^2}{1-i \sqrt {3}}}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {x+x^2+x^3}}+\frac {\left (\sqrt {x} \sqrt {1+i \sqrt {3}+2 x} \sqrt {1+\frac {2 x}{1-i \sqrt {3}}}\right ) \text {Subst}\left (\int \frac {1}{\left (-1-x^2\right ) \sqrt {1+i \sqrt {3}+2 x^2} \sqrt {1+\frac {2 x^2}{1-i \sqrt {3}}}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {x+x^2+x^3}}+\frac {\left (\sqrt {x} \sqrt {1+i \sqrt {3}+2 x} \sqrt {1+\frac {2 x}{1-i \sqrt {3}}}\right ) \text {Subst}\left (\int \frac {1}{\left (-1+x^2\right ) \sqrt {1+i \sqrt {3}+2 x^2} \sqrt {1+\frac {2 x^2}{1-i \sqrt {3}}}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {x+x^2+x^3}} \\ & = \frac {\sqrt {x} (1+x) \sqrt {\frac {1+x+x^2}{(1+x)^2}} \operatorname {EllipticF}\left (2 \arctan \left (\sqrt {x}\right ),\frac {1}{4}\right )}{\sqrt {x+x^2+x^3}}+\frac {\left (3 i \sqrt {x} \sqrt {1+\frac {2 x}{1-i \sqrt {3}}} \sqrt {1+\frac {2 x}{1+i \sqrt {3}}}\right ) \text {Subst}\left (\int \frac {1}{\left (-i-x^2\right ) \sqrt {1+\frac {2 x^2}{1-i \sqrt {3}}} \sqrt {1+\frac {2 x^2}{1+i \sqrt {3}}}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {x+x^2+x^3}}+\frac {\left (3 i \sqrt {x} \sqrt {1+\frac {2 x}{1-i \sqrt {3}}} \sqrt {1+\frac {2 x}{1+i \sqrt {3}}}\right ) \text {Subst}\left (\int \frac {1}{\left (-i+x^2\right ) \sqrt {1+\frac {2 x^2}{1-i \sqrt {3}}} \sqrt {1+\frac {2 x^2}{1+i \sqrt {3}}}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {x+x^2+x^3}}+\frac {\left (\sqrt {x} \sqrt {1+\frac {2 x}{1-i \sqrt {3}}} \sqrt {1+\frac {2 x}{1+i \sqrt {3}}}\right ) \text {Subst}\left (\int \frac {1}{\left (-1-x^2\right ) \sqrt {1+\frac {2 x^2}{1-i \sqrt {3}}} \sqrt {1+\frac {2 x^2}{1+i \sqrt {3}}}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {x+x^2+x^3}}+\frac {\left (\sqrt {x} \sqrt {1+\frac {2 x}{1-i \sqrt {3}}} \sqrt {1+\frac {2 x}{1+i \sqrt {3}}}\right ) \text {Subst}\left (\int \frac {1}{\left (-1+x^2\right ) \sqrt {1+\frac {2 x^2}{1-i \sqrt {3}}} \sqrt {1+\frac {2 x^2}{1+i \sqrt {3}}}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {x+x^2+x^3}} \\ & = \frac {\sqrt {x} (1+x) \sqrt {\frac {1+x+x^2}{(1+x)^2}} \operatorname {EllipticF}\left (2 \arctan \left (\sqrt {x}\right ),\frac {1}{4}\right )}{\sqrt {x+x^2+x^3}}-\frac {3 \sqrt {x} \sqrt {1+\frac {2 x}{1-i \sqrt {3}}} \sqrt {1+\frac {2 x}{1+i \sqrt {3}}} \operatorname {EllipticPi}\left (\frac {1}{2} \left (-i-\sqrt {3}\right ),\arcsin \left (\frac {1}{2} \left (1-i \sqrt {3}\right ) \sqrt {x}\right ),\frac {i+\sqrt {3}}{i-\sqrt {3}}\right )}{\left (1-i \sqrt {3}\right ) \sqrt {x+x^2+x^3}}-\frac {\sqrt {x} \sqrt {1+\frac {2 x}{1-i \sqrt {3}}} \sqrt {1+\frac {2 x}{1+i \sqrt {3}}} \operatorname {EllipticPi}\left (\frac {1}{2} \left (1-i \sqrt {3}\right ),\arcsin \left (\frac {1}{2} \left (1-i \sqrt {3}\right ) \sqrt {x}\right ),\frac {i+\sqrt {3}}{i-\sqrt {3}}\right )}{\left (1-i \sqrt {3}\right ) \sqrt {x+x^2+x^3}}-\frac {\sqrt {x} \sqrt {1+\frac {2 x}{1-i \sqrt {3}}} \sqrt {1+\frac {2 x}{1+i \sqrt {3}}} \operatorname {EllipticPi}\left (\frac {1}{2} \left (-1+i \sqrt {3}\right ),\arcsin \left (\frac {1}{2} \left (1-i \sqrt {3}\right ) \sqrt {x}\right ),\frac {i+\sqrt {3}}{i-\sqrt {3}}\right )}{\left (1-i \sqrt {3}\right ) \sqrt {x+x^2+x^3}}-\frac {3 \sqrt {x} \sqrt {1+\frac {2 x}{1-i \sqrt {3}}} \sqrt {1+\frac {2 x}{1+i \sqrt {3}}} \operatorname {EllipticPi}\left (\frac {1}{2} \left (i+\sqrt {3}\right ),\arcsin \left (\frac {1}{2} \left (1-i \sqrt {3}\right ) \sqrt {x}\right ),\frac {i+\sqrt {3}}{i-\sqrt {3}}\right )}{\left (1-i \sqrt {3}\right ) \sqrt {x+x^2+x^3}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.42 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.10 \[ \int \frac {1-x^2+x^4}{\sqrt {x+x^2+x^3} \left (-1+x^4\right )} \, dx=-\frac {\sqrt {x} \sqrt {1+x+x^2} \left (3 \arctan \left (\frac {\sqrt {x}}{\sqrt {1+x+x^2}}\right )+18 \text {arctanh}\left (\frac {\sqrt {x}}{\sqrt {1+x+x^2}}\right )+\sqrt {3} \text {arctanh}\left (\frac {\sqrt {3} \sqrt {x}}{\sqrt {1+x+x^2}}\right )\right )}{12 \sqrt {x \left (1+x+x^2\right )}} \]

[In]

Integrate[(1 - x^2 + x^4)/(Sqrt[x + x^2 + x^3]*(-1 + x^4)),x]

[Out]

-1/12*(Sqrt[x]*Sqrt[1 + x + x^2]*(3*ArcTan[Sqrt[x]/Sqrt[1 + x + x^2]] + 18*ArcTanh[Sqrt[x]/Sqrt[1 + x + x^2]]
+ Sqrt[3]*ArcTanh[(Sqrt[3]*Sqrt[x])/Sqrt[1 + x + x^2]]))/Sqrt[x*(1 + x + x^2)]

Maple [A] (verified)

Time = 1.20 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.93

method result size
default \(-\frac {\sqrt {3}\, \operatorname {arctanh}\left (\frac {\sqrt {x \left (x^{2}+x +1\right )}\, \sqrt {3}}{3 x}\right )}{12}+\frac {3 \ln \left (\frac {\sqrt {x \left (x^{2}+x +1\right )}-x}{x}\right )}{4}+\frac {\arctan \left (\frac {\sqrt {x \left (x^{2}+x +1\right )}}{x}\right )}{4}-\frac {3 \ln \left (\frac {\sqrt {x \left (x^{2}+x +1\right )}+x}{x}\right )}{4}\) \(83\)
pseudoelliptic \(-\frac {\sqrt {3}\, \operatorname {arctanh}\left (\frac {\sqrt {x \left (x^{2}+x +1\right )}\, \sqrt {3}}{3 x}\right )}{12}+\frac {3 \ln \left (\frac {\sqrt {x \left (x^{2}+x +1\right )}-x}{x}\right )}{4}+\frac {\arctan \left (\frac {\sqrt {x \left (x^{2}+x +1\right )}}{x}\right )}{4}-\frac {3 \ln \left (\frac {\sqrt {x \left (x^{2}+x +1\right )}+x}{x}\right )}{4}\) \(83\)
trager \(\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}-3\right ) \ln \left (-\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}-3\right ) x^{2}+4 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3\right ) x +\operatorname {RootOf}\left (\textit {\_Z}^{2}-3\right )-6 \sqrt {x^{3}+x^{2}+x}}{\left (x -1\right )^{2}}\right )}{24}-\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) \ln \left (\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) x^{2}+2 \sqrt {x^{3}+x^{2}+x}+\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right )}{\left (1+x \right )^{2}}\right )}{8}+\frac {3 \ln \left (\frac {-x^{2}+2 \sqrt {x^{3}+x^{2}+x}-2 x -1}{x^{2}+1}\right )}{4}\) \(133\)
elliptic \(\text {Expression too large to display}\) \(1764\)

[In]

int((x^4-x^2+1)/(x^3+x^2+x)^(1/2)/(x^4-1),x,method=_RETURNVERBOSE)

[Out]

-1/12*3^(1/2)*arctanh(1/3*(x*(x^2+x+1))^(1/2)/x*3^(1/2))+3/4*ln(((x*(x^2+x+1))^(1/2)-x)/x)+1/4*arctan((x*(x^2+
x+1))^(1/2)/x)-3/4*ln(((x*(x^2+x+1))^(1/2)+x)/x)

Fricas [A] (verification not implemented)

none

Time = 0.34 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.35 \[ \int \frac {1-x^2+x^4}{\sqrt {x+x^2+x^3} \left (-1+x^4\right )} \, dx=\frac {1}{48} \, \sqrt {3} \log \left (\frac {x^{4} + 20 \, x^{3} - 4 \, \sqrt {3} \sqrt {x^{3} + x^{2} + x} {\left (x^{2} + 4 \, x + 1\right )} + 30 \, x^{2} + 20 \, x + 1}{x^{4} - 4 \, x^{3} + 6 \, x^{2} - 4 \, x + 1}\right ) + \frac {1}{8} \, \arctan \left (\frac {x^{2} + 1}{2 \, \sqrt {x^{3} + x^{2} + x}}\right ) + \frac {3}{4} \, \log \left (\frac {x^{2} + 2 \, x - 2 \, \sqrt {x^{3} + x^{2} + x} + 1}{x^{2} + 1}\right ) \]

[In]

integrate((x^4-x^2+1)/(x^3+x^2+x)^(1/2)/(x^4-1),x, algorithm="fricas")

[Out]

1/48*sqrt(3)*log((x^4 + 20*x^3 - 4*sqrt(3)*sqrt(x^3 + x^2 + x)*(x^2 + 4*x + 1) + 30*x^2 + 20*x + 1)/(x^4 - 4*x
^3 + 6*x^2 - 4*x + 1)) + 1/8*arctan(1/2*(x^2 + 1)/sqrt(x^3 + x^2 + x)) + 3/4*log((x^2 + 2*x - 2*sqrt(x^3 + x^2
 + x) + 1)/(x^2 + 1))

Sympy [F]

\[ \int \frac {1-x^2+x^4}{\sqrt {x+x^2+x^3} \left (-1+x^4\right )} \, dx=\int \frac {x^{4} - x^{2} + 1}{\sqrt {x \left (x^{2} + x + 1\right )} \left (x - 1\right ) \left (x + 1\right ) \left (x^{2} + 1\right )}\, dx \]

[In]

integrate((x**4-x**2+1)/(x**3+x**2+x)**(1/2)/(x**4-1),x)

[Out]

Integral((x**4 - x**2 + 1)/(sqrt(x*(x**2 + x + 1))*(x - 1)*(x + 1)*(x**2 + 1)), x)

Maxima [F]

\[ \int \frac {1-x^2+x^4}{\sqrt {x+x^2+x^3} \left (-1+x^4\right )} \, dx=\int { \frac {x^{4} - x^{2} + 1}{{\left (x^{4} - 1\right )} \sqrt {x^{3} + x^{2} + x}} \,d x } \]

[In]

integrate((x^4-x^2+1)/(x^3+x^2+x)^(1/2)/(x^4-1),x, algorithm="maxima")

[Out]

integrate((x^4 - x^2 + 1)/((x^4 - 1)*sqrt(x^3 + x^2 + x)), x)

Giac [F]

\[ \int \frac {1-x^2+x^4}{\sqrt {x+x^2+x^3} \left (-1+x^4\right )} \, dx=\int { \frac {x^{4} - x^{2} + 1}{{\left (x^{4} - 1\right )} \sqrt {x^{3} + x^{2} + x}} \,d x } \]

[In]

integrate((x^4-x^2+1)/(x^3+x^2+x)^(1/2)/(x^4-1),x, algorithm="giac")

[Out]

integrate((x^4 - x^2 + 1)/((x^4 - 1)*sqrt(x^3 + x^2 + x)), x)

Mupad [B] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 698, normalized size of antiderivative = 7.84 \[ \int \frac {1-x^2+x^4}{\sqrt {x+x^2+x^3} \left (-1+x^4\right )} \, dx=\text {Too large to display} \]

[In]

int((x^4 - x^2 + 1)/((x^4 - 1)*(x + x^2 + x^3)^(1/2)),x)

[Out]

(2*((3^(1/2)*1i)/2 - 1/2)*(x/((3^(1/2)*1i)/2 - 1/2))^(1/2)*(-(x - (3^(1/2)*1i)/2 + 1/2)/((3^(1/2)*1i)/2 - 1/2)
)^(1/2)*((x + (3^(1/2)*1i)/2 + 1/2)/((3^(1/2)*1i)/2 + 1/2))^(1/2)*ellipticF(asin((x/((3^(1/2)*1i)/2 - 1/2))^(1
/2)), -((3^(1/2)*1i)/2 - 1/2)/((3^(1/2)*1i)/2 + 1/2)))/(x^2 + x^3 - x*((3^(1/2)*1i)/2 - 1/2)*((3^(1/2)*1i)/2 +
 1/2))^(1/2) - (3*((3^(1/2)*1i)/2 - 1/2)*(x/((3^(1/2)*1i)/2 - 1/2))^(1/2)*(-(x - (3^(1/2)*1i)/2 + 1/2)/((3^(1/
2)*1i)/2 - 1/2))^(1/2)*((x + (3^(1/2)*1i)/2 + 1/2)/((3^(1/2)*1i)/2 + 1/2))^(1/2)*ellipticPi(- 3^(1/2)/2 - 1i/2
, asin((x/((3^(1/2)*1i)/2 - 1/2))^(1/2)), -((3^(1/2)*1i)/2 - 1/2)/((3^(1/2)*1i)/2 + 1/2)))/(2*(x^2 + x^3 - x*(
(3^(1/2)*1i)/2 - 1/2)*((3^(1/2)*1i)/2 + 1/2))^(1/2)) - (3*((3^(1/2)*1i)/2 - 1/2)*(x/((3^(1/2)*1i)/2 - 1/2))^(1
/2)*(-(x - (3^(1/2)*1i)/2 + 1/2)/((3^(1/2)*1i)/2 - 1/2))^(1/2)*((x + (3^(1/2)*1i)/2 + 1/2)/((3^(1/2)*1i)/2 + 1
/2))^(1/2)*ellipticPi(3^(1/2)/2 + 1i/2, asin((x/((3^(1/2)*1i)/2 - 1/2))^(1/2)), -((3^(1/2)*1i)/2 - 1/2)/((3^(1
/2)*1i)/2 + 1/2)))/(2*(x^2 + x^3 - x*((3^(1/2)*1i)/2 - 1/2)*((3^(1/2)*1i)/2 + 1/2))^(1/2)) - (((3^(1/2)*1i)/2
- 1/2)*(x/((3^(1/2)*1i)/2 - 1/2))^(1/2)*(-(x - (3^(1/2)*1i)/2 + 1/2)/((3^(1/2)*1i)/2 - 1/2))^(1/2)*((x + (3^(1
/2)*1i)/2 + 1/2)/((3^(1/2)*1i)/2 + 1/2))^(1/2)*ellipticPi(1/2 - (3^(1/2)*1i)/2, asin((x/((3^(1/2)*1i)/2 - 1/2)
)^(1/2)), -((3^(1/2)*1i)/2 - 1/2)/((3^(1/2)*1i)/2 + 1/2)))/(2*(x^2 + x^3 - x*((3^(1/2)*1i)/2 - 1/2)*((3^(1/2)*
1i)/2 + 1/2))^(1/2)) - (((3^(1/2)*1i)/2 - 1/2)*(x/((3^(1/2)*1i)/2 - 1/2))^(1/2)*(-(x - (3^(1/2)*1i)/2 + 1/2)/(
(3^(1/2)*1i)/2 - 1/2))^(1/2)*((x + (3^(1/2)*1i)/2 + 1/2)/((3^(1/2)*1i)/2 + 1/2))^(1/2)*ellipticPi((3^(1/2)*1i)
/2 - 1/2, asin((x/((3^(1/2)*1i)/2 - 1/2))^(1/2)), -((3^(1/2)*1i)/2 - 1/2)/((3^(1/2)*1i)/2 + 1/2)))/(2*(x^2 + x
^3 - x*((3^(1/2)*1i)/2 - 1/2)*((3^(1/2)*1i)/2 + 1/2))^(1/2))