\(\int \frac {(1+x^4) (-1+3 x^4)}{x (1-a x+x^4) \sqrt {x+x^5}} \, dx\) [581]

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

Optimal result

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

[Out]

2*(x^5+x)^(1/2)/x-2*a^(1/2)*arctanh(a^(1/2)*(x^5+x)^(1/2)/(x^4+1))

Rubi [F]

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

[In]

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

[Out]

(2*(1 + x^4))/Sqrt[x + x^5] - (8*x^4*Sqrt[1 + x^4]*Hypergeometric2F1[1/2, 7/8, 15/8, -x^4])/(7*Sqrt[x + x^5])
+ (2*a*Sqrt[x]*Sqrt[1 + x^4]*Defer[Subst][Defer[Int][Sqrt[1 + x^8]/(-1 + a*x^2 - x^8), x], x, Sqrt[x]])/Sqrt[x
 + x^5] + (8*Sqrt[x]*Sqrt[1 + x^4]*Defer[Subst][Defer[Int][(x^6*Sqrt[1 + x^8])/(1 - a*x^2 + x^8), x], x, Sqrt[
x]])/Sqrt[x + x^5]

Rubi steps \begin{align*} \text {integral}& = \frac {\left (\sqrt {x} \sqrt {1+x^4}\right ) \int \frac {\sqrt {1+x^4} \left (-1+3 x^4\right )}{x^{3/2} \left (1-a x+x^4\right )} \, dx}{\sqrt {x+x^5}} \\ & = \frac {\left (2 \sqrt {x} \sqrt {1+x^4}\right ) \text {Subst}\left (\int \frac {\sqrt {1+x^8} \left (-1+3 x^8\right )}{x^2 \left (1-a x^2+x^8\right )} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^5}} \\ & = \frac {\left (2 \sqrt {x} \sqrt {1+x^4}\right ) \text {Subst}\left (\int \left (-\frac {\sqrt {1+x^8}}{x^2}+\frac {\left (a-4 x^6\right ) \sqrt {1+x^8}}{-1+a x^2-x^8}\right ) \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^5}} \\ & = -\frac {\left (2 \sqrt {x} \sqrt {1+x^4}\right ) \text {Subst}\left (\int \frac {\sqrt {1+x^8}}{x^2} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^5}}+\frac {\left (2 \sqrt {x} \sqrt {1+x^4}\right ) \text {Subst}\left (\int \frac {\left (a-4 x^6\right ) \sqrt {1+x^8}}{-1+a x^2-x^8} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^5}} \\ & = \frac {2 \left (1+x^4\right )}{\sqrt {x+x^5}}+\frac {\left (2 \sqrt {x} \sqrt {1+x^4}\right ) \text {Subst}\left (\int \left (\frac {a \sqrt {1+x^8}}{-1+a x^2-x^8}+\frac {4 x^6 \sqrt {1+x^8}}{1-a x^2+x^8}\right ) \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^5}}-\frac {\left (8 \sqrt {x} \sqrt {1+x^4}\right ) \text {Subst}\left (\int \frac {x^6}{\sqrt {1+x^8}} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^5}} \\ & = \frac {2 \left (1+x^4\right )}{\sqrt {x+x^5}}-\frac {8 x^4 \sqrt {1+x^4} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {7}{8},\frac {15}{8},-x^4\right )}{7 \sqrt {x+x^5}}+\frac {\left (8 \sqrt {x} \sqrt {1+x^4}\right ) \text {Subst}\left (\int \frac {x^6 \sqrt {1+x^8}}{1-a x^2+x^8} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^5}}+\frac {\left (2 a \sqrt {x} \sqrt {1+x^4}\right ) \text {Subst}\left (\int \frac {\sqrt {1+x^8}}{-1+a x^2-x^8} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^5}} \\ \end{align*}

Mathematica [A] (verified)

Time = 10.61 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.00 \[ \int \frac {\left (1+x^4\right ) \left (-1+3 x^4\right )}{x \left (1-a x+x^4\right ) \sqrt {x+x^5}} \, dx=\frac {2 \sqrt {x+x^5}}{x}-2 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \sqrt {x+x^5}}{1+x^4}\right ) \]

[In]

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

[Out]

(2*Sqrt[x + x^5])/x - 2*Sqrt[a]*ArcTanh[(Sqrt[a]*Sqrt[x + x^5])/(1 + x^4)]

Maple [A] (verified)

Time = 1.27 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.89

method result size
pseudoelliptic \(\frac {-2 \sqrt {a}\, \operatorname {arctanh}\left (\frac {\sqrt {x \left (x^{4}+1\right )}}{x \sqrt {a}}\right ) x +2 \sqrt {x \left (x^{4}+1\right )}}{x}\) \(40\)

[In]

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

[Out]

(-2*a^(1/2)*arctanh((x*(x^4+1))^(1/2)/x/a^(1/2))*x+2*(x*(x^4+1))^(1/2))/x

Fricas [A] (verification not implemented)

none

Time = 0.98 (sec) , antiderivative size = 146, normalized size of antiderivative = 3.24 \[ \int \frac {\left (1+x^4\right ) \left (-1+3 x^4\right )}{x \left (1-a x+x^4\right ) \sqrt {x+x^5}} \, dx=\left [\frac {\sqrt {a} x \log \left (-\frac {x^{8} + 6 \, a x^{5} + a^{2} x^{2} + 2 \, x^{4} - 4 \, \sqrt {x^{5} + x} {\left (x^{4} + a x + 1\right )} \sqrt {a} + 6 \, a x + 1}{x^{8} - 2 \, a x^{5} + a^{2} x^{2} + 2 \, x^{4} - 2 \, a x + 1}\right ) + 4 \, \sqrt {x^{5} + x}}{2 \, x}, \frac {\sqrt {-a} x \arctan \left (\frac {2 \, \sqrt {x^{5} + x} \sqrt {-a}}{x^{4} + a x + 1}\right ) + 2 \, \sqrt {x^{5} + x}}{x}\right ] \]

[In]

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

[Out]

[1/2*(sqrt(a)*x*log(-(x^8 + 6*a*x^5 + a^2*x^2 + 2*x^4 - 4*sqrt(x^5 + x)*(x^4 + a*x + 1)*sqrt(a) + 6*a*x + 1)/(
x^8 - 2*a*x^5 + a^2*x^2 + 2*x^4 - 2*a*x + 1)) + 4*sqrt(x^5 + x))/x, (sqrt(-a)*x*arctan(2*sqrt(x^5 + x)*sqrt(-a
)/(x^4 + a*x + 1)) + 2*sqrt(x^5 + x))/x]

Sympy [F(-1)]

Timed out. \[ \int \frac {\left (1+x^4\right ) \left (-1+3 x^4\right )}{x \left (1-a x+x^4\right ) \sqrt {x+x^5}} \, dx=\text {Timed out} \]

[In]

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

[Out]

Timed out

Maxima [F]

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

[In]

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

[Out]

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

Giac [F]

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 5.68 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.11 \[ \int \frac {\left (1+x^4\right ) \left (-1+3 x^4\right )}{x \left (1-a x+x^4\right ) \sqrt {x+x^5}} \, dx=\frac {2\,\sqrt {x^5+x}}{x}+\sqrt {a}\,\ln \left (\frac {a\,x-2\,\sqrt {a}\,\sqrt {x^5+x}+x^4+1}{x^4-a\,x+1}\right ) \]

[In]

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

[Out]

(2*(x + x^5)^(1/2))/x + a^(1/2)*log((a*x - 2*a^(1/2)*(x + x^5)^(1/2) + x^4 + 1)/(x^4 - a*x + 1))