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

3.4.88.1 Optimal result
3.4.88.2 Mathematica [A] (verified)
3.4.88.3 Rubi [F]
3.4.88.4 Maple [C] (verified)
3.4.88.5 Fricas [A] (verification not implemented)
3.4.88.6 Sympy [F]
3.4.88.7 Maxima [F]
3.4.88.8 Giac [F]
3.4.88.9 Mupad [F(-1)]

3.4.88.1 Optimal result

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

output
2^(1/2)*arctan(2^(1/2)*(x^4-x)^(1/2)/(x^2+x+1))
 
3.4.88.2 Mathematica [A] (verified)

Time = 24.43 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.75 \[ \int \frac {-1+2 x+2 x^2}{\left (1-x+3 x^2\right ) \sqrt {-x+x^4}} \, dx=-\frac {\sqrt {2} \sqrt {-1+\frac {1}{x^3}} x^2 \text {arctanh}\left (\frac {\sqrt {2} \sqrt {-1+\frac {1}{x^3}}}{1+\frac {1}{x^2}+\frac {1}{x}}\right )}{\sqrt {x \left (-1+x^3\right )}} \]

input
Integrate[(-1 + 2*x + 2*x^2)/((1 - x + 3*x^2)*Sqrt[-x + x^4]),x]
 
output
-((Sqrt[2]*Sqrt[-1 + x^(-3)]*x^2*ArcTanh[(Sqrt[2]*Sqrt[-1 + x^(-3)])/(1 + 
x^(-2) + x^(-1))])/Sqrt[x*(-1 + x^3)])
 
3.4.88.3 Rubi [F]

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 {2 x^2+2 x-1}{\left (3 x^2-x+1\right ) \sqrt {x^4-x}} \, dx\)

\(\Big \downarrow \) 2467

\(\displaystyle \frac {\sqrt {x} \sqrt {x^3-1} \int -\frac {-2 x^2-2 x+1}{\sqrt {x} \left (3 x^2-x+1\right ) \sqrt {x^3-1}}dx}{\sqrt {x^4-x}}\)

\(\Big \downarrow \) 25

\(\displaystyle -\frac {\sqrt {x} \sqrt {x^3-1} \int \frac {-2 x^2-2 x+1}{\sqrt {x} \left (3 x^2-x+1\right ) \sqrt {x^3-1}}dx}{\sqrt {x^4-x}}\)

\(\Big \downarrow \) 2035

\(\displaystyle -\frac {2 \sqrt {x} \sqrt {x^3-1} \int \frac {-2 x^2-2 x+1}{\left (3 x^2-x+1\right ) \sqrt {x^3-1}}d\sqrt {x}}{\sqrt {x^4-x}}\)

\(\Big \downarrow \) 7279

\(\displaystyle -\frac {2 \sqrt {x} \sqrt {x^3-1} \int \left (\frac {5-8 x}{3 \left (3 x^2-x+1\right ) \sqrt {x^3-1}}-\frac {2}{3 \sqrt {x^3-1}}\right )d\sqrt {x}}{\sqrt {x^4-x}}\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {2 \sqrt {x} \sqrt {x^3-1} \left (\frac {\left (4-i \sqrt {11}\right ) \int \frac {1}{\left (\sqrt {1-i \sqrt {11}}-\sqrt {6} \sqrt {x}\right ) \sqrt {x^3-1}}d\sqrt {x}}{3 \sqrt {1-i \sqrt {11}}}+\frac {\left (4+i \sqrt {11}\right ) \int \frac {1}{\left (\sqrt {1+i \sqrt {11}}-\sqrt {6} \sqrt {x}\right ) \sqrt {x^3-1}}d\sqrt {x}}{3 \sqrt {1+i \sqrt {11}}}+\frac {\left (4-i \sqrt {11}\right ) \int \frac {1}{\left (\sqrt {6} \sqrt {x}+\sqrt {1-i \sqrt {11}}\right ) \sqrt {x^3-1}}d\sqrt {x}}{3 \sqrt {1-i \sqrt {11}}}+\frac {\left (4+i \sqrt {11}\right ) \int \frac {1}{\left (\sqrt {6} \sqrt {x}+\sqrt {1+i \sqrt {11}}\right ) \sqrt {x^3-1}}d\sqrt {x}}{3 \sqrt {1+i \sqrt {11}}}-\frac {(1-x) \sqrt {x} \sqrt {\frac {x^2+x+1}{\left (1-\left (1+\sqrt {3}\right ) x\right )^2}} \operatorname {EllipticF}\left (\arccos \left (\frac {1-\left (1-\sqrt {3}\right ) x}{1-\left (1+\sqrt {3}\right ) x}\right ),\frac {1}{4} \left (2+\sqrt {3}\right )\right )}{3 \sqrt [4]{3} \sqrt {-\frac {(1-x) x}{\left (1-\left (1+\sqrt {3}\right ) x\right )^2}} \sqrt {x^3-1}}\right )}{\sqrt {x^4-x}}\)

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

3.4.88.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2035
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]
 

rule 2467
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]
 

rule 7279
Int[(u_)/((a_.) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.)), x_Symbol] :> With[ 
{v = RationalFunctionExpand[u/(a + b*x^n + c*x^(2*n)), x]}, Int[v, x] /; Su 
mQ[v]] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] && IGtQ[n, 0]
 
3.4.88.4 Maple [C] (verified)

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

Time = 5.26 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.97

method result size
trager \(\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right ) \ln \left (-\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right ) x^{2}-3 \operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right ) x -\operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right )-4 \sqrt {x^{4}-x}}{3 x^{2}-x +1}\right )}{2}\) \(63\)
default \(\text {Expression too large to display}\) \(828\)
elliptic \(\text {Expression too large to display}\) \(828\)

input
int((2*x^2+2*x-1)/(3*x^2-x+1)/(x^4-x)^(1/2),x,method=_RETURNVERBOSE)
 
output
1/2*RootOf(_Z^2+2)*ln(-(RootOf(_Z^2+2)*x^2-3*RootOf(_Z^2+2)*x-RootOf(_Z^2+ 
2)-4*(x^4-x)^(1/2))/(3*x^2-x+1))
 
3.4.88.5 Fricas [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.88 \[ \int \frac {-1+2 x+2 x^2}{\left (1-x+3 x^2\right ) \sqrt {-x+x^4}} \, dx=\frac {1}{2} \, \sqrt {2} \arctan \left (\frac {\sqrt {2} {\left (x^{2} - 3 \, x - 1\right )}}{4 \, \sqrt {x^{4} - x}}\right ) \]

input
integrate((2*x^2+2*x-1)/(3*x^2-x+1)/(x^4-x)^(1/2),x, algorithm="fricas")
 
output
1/2*sqrt(2)*arctan(1/4*sqrt(2)*(x^2 - 3*x - 1)/sqrt(x^4 - x))
 
3.4.88.6 Sympy [F]

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

input
integrate((2*x**2+2*x-1)/(3*x**2-x+1)/(x**4-x)**(1/2),x)
 
output
Integral((2*x**2 + 2*x - 1)/(sqrt(x*(x - 1)*(x**2 + x + 1))*(3*x**2 - x + 
1)), x)
 
3.4.88.7 Maxima [F]

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

input
integrate((2*x^2+2*x-1)/(3*x^2-x+1)/(x^4-x)^(1/2),x, algorithm="maxima")
 
output
integrate((2*x^2 + 2*x - 1)/(sqrt(x^4 - x)*(3*x^2 - x + 1)), x)
 
3.4.88.8 Giac [F]

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

input
integrate((2*x^2+2*x-1)/(3*x^2-x+1)/(x^4-x)^(1/2),x, algorithm="giac")
 
output
integrate((2*x^2 + 2*x - 1)/(sqrt(x^4 - x)*(3*x^2 - x + 1)), x)
 
3.4.88.9 Mupad [F(-1)]

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

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