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

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

Optimal result

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

[Out]

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

Rubi [F]

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

[In]

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

[Out]

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

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {\sqrt {1+x^2+x^5}}{1+x}+\frac {\left (-1+2 x-3 x^2-x^3\right ) \sqrt {1+x^2+x^5}}{1-x+x^2-x^3+x^4}+\frac {\left (-2+5 x^3\right ) \sqrt {1+x^2+x^5}}{1-x^2+x^5}\right ) \, dx \\ & = \int \frac {\sqrt {1+x^2+x^5}}{1+x} \, dx+\int \frac {\left (-1+2 x-3 x^2-x^3\right ) \sqrt {1+x^2+x^5}}{1-x+x^2-x^3+x^4} \, dx+\int \frac {\left (-2+5 x^3\right ) \sqrt {1+x^2+x^5}}{1-x^2+x^5} \, dx \\ & = \int \frac {\sqrt {1+x^2+x^5}}{1+x} \, dx+\int \left (\frac {\sqrt {1+x^2+x^5}}{-1+x-x^2+x^3-x^4}+\frac {2 x \sqrt {1+x^2+x^5}}{1-x+x^2-x^3+x^4}-\frac {3 x^2 \sqrt {1+x^2+x^5}}{1-x+x^2-x^3+x^4}-\frac {x^3 \sqrt {1+x^2+x^5}}{1-x+x^2-x^3+x^4}\right ) \, dx+\int \left (-\frac {2 \sqrt {1+x^2+x^5}}{1-x^2+x^5}+\frac {5 x^3 \sqrt {1+x^2+x^5}}{1-x^2+x^5}\right ) \, dx \\ & = 2 \int \frac {x \sqrt {1+x^2+x^5}}{1-x+x^2-x^3+x^4} \, dx-2 \int \frac {\sqrt {1+x^2+x^5}}{1-x^2+x^5} \, dx-3 \int \frac {x^2 \sqrt {1+x^2+x^5}}{1-x+x^2-x^3+x^4} \, dx+5 \int \frac {x^3 \sqrt {1+x^2+x^5}}{1-x^2+x^5} \, dx+\int \frac {\sqrt {1+x^2+x^5}}{1+x} \, dx+\int \frac {\sqrt {1+x^2+x^5}}{-1+x-x^2+x^3-x^4} \, dx-\int \frac {x^3 \sqrt {1+x^2+x^5}}{1-x+x^2-x^3+x^4} \, dx \\ \end{align*}

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.89 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.42

method result size
pseudoelliptic \(-\ln \left (\frac {\sqrt {x^{5}+x^{2}+1}-x}{x}\right )-2 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {x^{5}+x^{2}+1}\, \sqrt {2}}{2 x}\right )+\ln \left (\frac {\sqrt {x^{5}+x^{2}+1}+x}{x}\right )\) \(64\)
trager \(-\ln \left (-\frac {-x^{5}+2 \sqrt {x^{5}+x^{2}+1}\, x -2 x^{2}-1}{\left (1+x \right ) \left (x^{4}-x^{3}+x^{2}-x +1\right )}\right )+\operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) \ln \left (-\frac {-\operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) x^{5}-3 \operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) x^{2}+4 \sqrt {x^{5}+x^{2}+1}\, x -\operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right )}{x^{5}-x^{2}+1}\right )\) \(121\)

[In]

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

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 115 vs. \(2 (37) = 74\).

Time = 0.28 (sec) , antiderivative size = 115, normalized size of antiderivative = 2.56 \[ \int \frac {\sqrt {1+x^2+x^5} \left (-2+3 x^5\right )}{\left (1+x^5\right ) \left (1-x^2+x^5\right )} \, dx=\frac {1}{2} \, \sqrt {2} \log \left (\frac {x^{10} + 14 \, x^{7} + 2 \, x^{5} + 17 \, x^{4} - 4 \, \sqrt {2} {\left (x^{6} + 3 \, x^{3} + x\right )} \sqrt {x^{5} + x^{2} + 1} + 14 \, x^{2} + 1}{x^{10} - 2 \, x^{7} + 2 \, x^{5} + x^{4} - 2 \, x^{2} + 1}\right ) + \log \left (\frac {x^{5} + 2 \, x^{2} + 2 \, \sqrt {x^{5} + x^{2} + 1} x + 1}{x^{5} + 1}\right ) \]

[In]

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

[Out]

1/2*sqrt(2)*log((x^10 + 14*x^7 + 2*x^5 + 17*x^4 - 4*sqrt(2)*(x^6 + 3*x^3 + x)*sqrt(x^5 + x^2 + 1) + 14*x^2 + 1
)/(x^10 - 2*x^7 + 2*x^5 + x^4 - 2*x^2 + 1)) + log((x^5 + 2*x^2 + 2*sqrt(x^5 + x^2 + 1)*x + 1)/(x^5 + 1))

Sympy [F(-1)]

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

[In]

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

[Out]

Timed out

Maxima [F]

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

[In]

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

[Out]

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

Giac [F]

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 8.87 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.71 \[ \int \frac {\sqrt {1+x^2+x^5} \left (-2+3 x^5\right )}{\left (1+x^5\right ) \left (1-x^2+x^5\right )} \, dx=\ln \left (\frac {2\,x\,\sqrt {x^5+x^2+1}+2\,x^2+x^5+1}{x^5+1}\right )+\sqrt {2}\,\ln \left (\frac {3\,x^2+x^5-2\,\sqrt {2}\,x\,\sqrt {x^5+x^2+1}+1}{x^5-x^2+1}\right ) \]

[In]

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

[Out]

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