Integrand size = 29, antiderivative size = 97 \[ \int \frac {-1+x^2}{\left (1+x^2\right ) \sqrt {-x-x^2+x^3}} \, dx=-\sqrt {\frac {1}{5}+\frac {2 i}{5}} \arctan \left (\frac {\sqrt {1-2 i} \sqrt {-x-x^2+x^3}}{-1-x+x^2}\right )-\sqrt {\frac {1}{5}-\frac {2 i}{5}} \arctan \left (\frac {\sqrt {1+2 i} \sqrt {-x-x^2+x^3}}{-1-x+x^2}\right ) \] Output:
-1/5*(5+10*I)^(1/2)*arctan((1-2*I)^(1/2)*(x^3-x^2-x)^(1/2)/(x^2-x-1))-1/5* (5-10*I)^(1/2)*arctan((1+2*I)^(1/2)*(x^3-x^2-x)^(1/2)/(x^2-x-1))
Time = 0.46 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.10 \[ \int \frac {-1+x^2}{\left (1+x^2\right ) \sqrt {-x-x^2+x^3}} \, dx=-\frac {\sqrt {x} \sqrt {-1-x+x^2} \left (\sqrt {1+2 i} \arctan \left (\frac {\sqrt {1-2 i} \sqrt {x}}{\sqrt {-1-x+x^2}}\right )+\sqrt {1-2 i} \arctan \left (\frac {\sqrt {1+2 i} \sqrt {x}}{\sqrt {-1-x+x^2}}\right )\right )}{\sqrt {5} \sqrt {x \left (-1-x+x^2\right )}} \] Input:
Integrate[(-1 + x^2)/((1 + x^2)*Sqrt[-x - x^2 + x^3]),x]
Output:
-((Sqrt[x]*Sqrt[-1 - x + x^2]*(Sqrt[1 + 2*I]*ArcTan[(Sqrt[1 - 2*I]*Sqrt[x] )/Sqrt[-1 - x + x^2]] + Sqrt[1 - 2*I]*ArcTan[(Sqrt[1 + 2*I]*Sqrt[x])/Sqrt[ -1 - x + x^2]]))/(Sqrt[5]*Sqrt[x*(-1 - x + x^2)]))
Time = 0.83 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.13, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, 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 {x^2-1}{\left (x^2+1\right ) \sqrt {x^3-x^2-x}} \, dx\) |
\(\Big \downarrow \) 2467 |
\(\displaystyle \frac {\sqrt {x} \sqrt {x^2-x-1} \int -\frac {1-x^2}{\sqrt {x} \left (x^2+1\right ) \sqrt {x^2-x-1}}dx}{\sqrt {x^3-x^2-x}}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\sqrt {x} \sqrt {x^2-x-1} \int \frac {1-x^2}{\sqrt {x} \left (x^2+1\right ) \sqrt {x^2-x-1}}dx}{\sqrt {x^3-x^2-x}}\) |
\(\Big \downarrow \) 2035 |
\(\displaystyle -\frac {2 \sqrt {x} \sqrt {x^2-x-1} \int \frac {1-x^2}{\left (x^2+1\right ) \sqrt {x^2-x-1}}d\sqrt {x}}{\sqrt {x^3-x^2-x}}\) |
\(\Big \downarrow \) 7276 |
\(\displaystyle -\frac {2 \sqrt {x} \sqrt {x^2-x-1} \int \left (\frac {2}{\left (x^2+1\right ) \sqrt {x^2-x-1}}-\frac {1}{\sqrt {x^2-x-1}}\right )d\sqrt {x}}{\sqrt {x^3-x^2-x}}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {2 \sqrt {x} \sqrt {x^2-x-1} \left (\frac {\arctan \left (\frac {\sqrt {1-2 i} \sqrt {x}}{\sqrt {x^2-x-1}}\right )}{2 \sqrt {1-2 i}}+\frac {\arctan \left (\frac {\sqrt {1+2 i} \sqrt {x}}{\sqrt {x^2-x-1}}\right )}{2 \sqrt {1+2 i}}\right )}{\sqrt {x^3-x^2-x}}\) |
Input:
Int[(-1 + x^2)/((1 + x^2)*Sqrt[-x - x^2 + x^3]),x]
Output:
(-2*Sqrt[x]*Sqrt[-1 - x + x^2]*(ArcTan[(Sqrt[1 - 2*I]*Sqrt[x])/Sqrt[-1 - x + x^2]]/(2*Sqrt[1 - 2*I]) + ArcTan[(Sqrt[1 + 2*I]*Sqrt[x])/Sqrt[-1 - x + x^2]]/(2*Sqrt[1 + 2*I])))/Sqrt[-x - x^2 + x^3]
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]
Leaf count of result is larger than twice the leaf count of optimal. \(192\) vs. \(2(77)=154\).
Time = 4.32 (sec) , antiderivative size = 193, normalized size of antiderivative = 1.99
method | result | size |
default | \(\frac {\sqrt {5}\, \ln \left (\frac {x \sqrt {5}-\sqrt {x \left (x^{2}-x -1\right )}\, \sqrt {-2+2 \sqrt {5}}+x^{2}-x -1}{x}\right )-\sqrt {5}\, \ln \left (\frac {x \sqrt {5}+\sqrt {x \left (x^{2}-x -1\right )}\, \sqrt {-2+2 \sqrt {5}}+x^{2}-x -1}{x}\right )-\left (\arctan \left (\frac {\sqrt {-2+2 \sqrt {5}}\, x -2 \sqrt {x \left (x^{2}-x -1\right )}}{x \sqrt {2+2 \sqrt {5}}}\right )-\arctan \left (\frac {\sqrt {-2+2 \sqrt {5}}\, x +2 \sqrt {x \left (x^{2}-x -1\right )}}{x \sqrt {2+2 \sqrt {5}}}\right )\right ) \left (5+\sqrt {5}\right )}{5 \sqrt {2+2 \sqrt {5}}}\) | \(193\) |
pseudoelliptic | \(\frac {\sqrt {5}\, \ln \left (\frac {x \sqrt {5}-\sqrt {x \left (x^{2}-x -1\right )}\, \sqrt {-2+2 \sqrt {5}}+x^{2}-x -1}{x}\right )-\sqrt {5}\, \ln \left (\frac {x \sqrt {5}+\sqrt {x \left (x^{2}-x -1\right )}\, \sqrt {-2+2 \sqrt {5}}+x^{2}-x -1}{x}\right )-\left (\arctan \left (\frac {\sqrt {-2+2 \sqrt {5}}\, x -2 \sqrt {x \left (x^{2}-x -1\right )}}{x \sqrt {2+2 \sqrt {5}}}\right )-\arctan \left (\frac {\sqrt {-2+2 \sqrt {5}}\, x +2 \sqrt {x \left (x^{2}-x -1\right )}}{x \sqrt {2+2 \sqrt {5}}}\right )\right ) \left (5+\sqrt {5}\right )}{5 \sqrt {2+2 \sqrt {5}}}\) | \(193\) |
trager | \(-\frac {\operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right ) \ln \left (-\frac {-325 \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{5} x^{2}+325 \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{5}-90 \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{3} x^{2}-520 x \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{3}+80 \sqrt {x^{3}-x^{2}-x}\, \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{2}+90 \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{3}+31 \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right ) x^{2}-248 \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right ) x +192 \sqrt {x^{3}-x^{2}-x}-31 \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )}{{\left (5 \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{2} x -5 \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{2}-x -3\right )}^{2}}\right )}{2}+\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+25 \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{2}+10\right ) \ln \left (\frac {-65 \operatorname {RootOf}\left (\textit {\_Z}^{2}+25 \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{2}+10\right ) \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{4} x^{2}+65 \operatorname {RootOf}\left (\textit {\_Z}^{2}+25 \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{2}+10\right ) \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{4}-34 \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{2} \operatorname {RootOf}\left (\textit {\_Z}^{2}+25 \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{2}+10\right ) x^{2}+104 \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{2} \operatorname {RootOf}\left (\textit {\_Z}^{2}+25 \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{2}+10\right ) x +80 \sqrt {x^{3}-x^{2}-x}\, \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{2}+34 \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{2} \operatorname {RootOf}\left (\textit {\_Z}^{2}+25 \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{2}+10\right )+3 \operatorname {RootOf}\left (\textit {\_Z}^{2}+25 \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{2}+10\right ) x^{2}-8 \operatorname {RootOf}\left (\textit {\_Z}^{2}+25 \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{2}+10\right ) x -160 \sqrt {x^{3}-x^{2}-x}-3 \operatorname {RootOf}\left (\textit {\_Z}^{2}+25 \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{2}+10\right )}{{\left (5 \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{2} x -5 \operatorname {RootOf}\left (5 \textit {\_Z}^{4}+2 \textit {\_Z}^{2}+1\right )^{2}+3 x +1\right )}^{2}}\right )}{10}\) | \(654\) |
elliptic | \(\text {Expression too large to display}\) | \(873\) |
Input:
int((x^2-1)/(x^2+1)/(x^3-x^2-x)^(1/2),x,method=_RETURNVERBOSE)
Output:
1/5/(2+2*5^(1/2))^(1/2)*(5^(1/2)*ln((x*5^(1/2)-(x*(x^2-x-1))^(1/2)*(-2+2*5 ^(1/2))^(1/2)+x^2-x-1)/x)-5^(1/2)*ln((x*5^(1/2)+(x*(x^2-x-1))^(1/2)*(-2+2* 5^(1/2))^(1/2)+x^2-x-1)/x)-(arctan(((-2+2*5^(1/2))^(1/2)*x-2*(x*(x^2-x-1)) ^(1/2))/x/(2+2*5^(1/2))^(1/2))-arctan(((-2+2*5^(1/2))^(1/2)*x+2*(x*(x^2-x- 1))^(1/2))/x/(2+2*5^(1/2))^(1/2)))*(5+5^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 260 vs. \(2 (69) = 138\).
Time = 0.13 (sec) , antiderivative size = 260, normalized size of antiderivative = 2.68 \[ \int \frac {-1+x^2}{\left (1+x^2\right ) \sqrt {-x-x^2+x^3}} \, dx=-\sqrt {\frac {1}{10} \, \sqrt {5} + \frac {1}{10}} \arctan \left (-\frac {{\left (5 \, x^{2} - \sqrt {5} {\left (x^{2} + 4 \, x - 1\right )} - 5\right )} \sqrt {\frac {1}{10} \, \sqrt {5} + \frac {1}{10}}}{4 \, \sqrt {x^{3} - x^{2} - x}}\right ) - \frac {1}{4} \, \sqrt {\frac {1}{10} \, \sqrt {5} - \frac {1}{10}} \log \left (\frac {x^{4} - 4 \, x^{3} + 6 \, x^{2} + 4 \, \sqrt {x^{3} - x^{2} - x} {\left (\sqrt {5} {\left (x^{2} - x - 1\right )} + 5 \, x\right )} \sqrt {\frac {1}{10} \, \sqrt {5} - \frac {1}{10}} + 4 \, \sqrt {5} {\left (x^{3} - x^{2} - x\right )} + 4 \, x + 1}{x^{4} + 2 \, x^{2} + 1}\right ) + \frac {1}{4} \, \sqrt {\frac {1}{10} \, \sqrt {5} - \frac {1}{10}} \log \left (\frac {x^{4} - 4 \, x^{3} + 6 \, x^{2} - 4 \, \sqrt {x^{3} - x^{2} - x} {\left (\sqrt {5} {\left (x^{2} - x - 1\right )} + 5 \, x\right )} \sqrt {\frac {1}{10} \, \sqrt {5} - \frac {1}{10}} + 4 \, \sqrt {5} {\left (x^{3} - x^{2} - x\right )} + 4 \, x + 1}{x^{4} + 2 \, x^{2} + 1}\right ) \] Input:
integrate((x^2-1)/(x^2+1)/(x^3-x^2-x)^(1/2),x, algorithm="fricas")
Output:
-sqrt(1/10*sqrt(5) + 1/10)*arctan(-1/4*(5*x^2 - sqrt(5)*(x^2 + 4*x - 1) - 5)*sqrt(1/10*sqrt(5) + 1/10)/sqrt(x^3 - x^2 - x)) - 1/4*sqrt(1/10*sqrt(5) - 1/10)*log((x^4 - 4*x^3 + 6*x^2 + 4*sqrt(x^3 - x^2 - x)*(sqrt(5)*(x^2 - x - 1) + 5*x)*sqrt(1/10*sqrt(5) - 1/10) + 4*sqrt(5)*(x^3 - x^2 - x) + 4*x + 1)/(x^4 + 2*x^2 + 1)) + 1/4*sqrt(1/10*sqrt(5) - 1/10)*log((x^4 - 4*x^3 + 6*x^2 - 4*sqrt(x^3 - x^2 - x)*(sqrt(5)*(x^2 - x - 1) + 5*x)*sqrt(1/10*sqrt (5) - 1/10) + 4*sqrt(5)*(x^3 - x^2 - x) + 4*x + 1)/(x^4 + 2*x^2 + 1))
\[ \int \frac {-1+x^2}{\left (1+x^2\right ) \sqrt {-x-x^2+x^3}} \, dx=\int \frac {\left (x - 1\right ) \left (x + 1\right )}{\sqrt {x \left (x^{2} - x - 1\right )} \left (x^{2} + 1\right )}\, dx \] Input:
integrate((x**2-1)/(x**2+1)/(x**3-x**2-x)**(1/2),x)
Output:
Integral((x - 1)*(x + 1)/(sqrt(x*(x**2 - x - 1))*(x**2 + 1)), x)
\[ \int \frac {-1+x^2}{\left (1+x^2\right ) \sqrt {-x-x^2+x^3}} \, dx=\int { \frac {x^{2} - 1}{\sqrt {x^{3} - x^{2} - x} {\left (x^{2} + 1\right )}} \,d x } \] Input:
integrate((x^2-1)/(x^2+1)/(x^3-x^2-x)^(1/2),x, algorithm="maxima")
Output:
integrate((x^2 - 1)/(sqrt(x^3 - x^2 - x)*(x^2 + 1)), x)
\[ \int \frac {-1+x^2}{\left (1+x^2\right ) \sqrt {-x-x^2+x^3}} \, dx=\int { \frac {x^{2} - 1}{\sqrt {x^{3} - x^{2} - x} {\left (x^{2} + 1\right )}} \,d x } \] Input:
integrate((x^2-1)/(x^2+1)/(x^3-x^2-x)^(1/2),x, algorithm="giac")
Output:
integrate((x^2 - 1)/(sqrt(x^3 - x^2 - x)*(x^2 + 1)), x)
Time = 8.64 (sec) , antiderivative size = 210, normalized size of antiderivative = 2.16 \[ \int \frac {-1+x^2}{\left (1+x^2\right ) \sqrt {-x-x^2+x^3}} \, dx=-\frac {\sqrt {\frac {x}{\frac {\sqrt {5}}{2}+\frac {1}{2}}}\,\sqrt {\frac {x+\frac {\sqrt {5}}{2}-\frac {1}{2}}{\frac {\sqrt {5}}{2}-\frac {1}{2}}}\,\left (\sqrt {5}+1\right )\,\sqrt {\frac {\frac {\sqrt {5}}{2}-x+\frac {1}{2}}{\frac {\sqrt {5}}{2}+\frac {1}{2}}}\,\left (-\mathrm {F}\left (\mathrm {asin}\left (\sqrt {\frac {x}{\frac {\sqrt {5}}{2}+\frac {1}{2}}}\right )\middle |-\frac {\frac {\sqrt {5}}{2}+\frac {1}{2}}{\frac {\sqrt {5}}{2}-\frac {1}{2}}\right )+\Pi \left (-\frac {\sqrt {5}\,1{}\mathrm {i}}{2}-\frac {1}{2}{}\mathrm {i};\mathrm {asin}\left (\sqrt {\frac {x}{\frac {\sqrt {5}}{2}+\frac {1}{2}}}\right )\middle |-\frac {\frac {\sqrt {5}}{2}+\frac {1}{2}}{\frac {\sqrt {5}}{2}-\frac {1}{2}}\right )+\Pi \left (\frac {\sqrt {5}\,1{}\mathrm {i}}{2}+\frac {1}{2}{}\mathrm {i};\mathrm {asin}\left (\sqrt {\frac {x}{\frac {\sqrt {5}}{2}+\frac {1}{2}}}\right )\middle |-\frac {\frac {\sqrt {5}}{2}+\frac {1}{2}}{\frac {\sqrt {5}}{2}-\frac {1}{2}}\right )\right )}{\sqrt {x^3-x^2-\left (\frac {\sqrt {5}}{2}-\frac {1}{2}\right )\,\left (\frac {\sqrt {5}}{2}+\frac {1}{2}\right )\,x}} \] Input:
int((x^2 - 1)/((x^2 + 1)*(x^3 - x^2 - x)^(1/2)),x)
Output:
-((x/(5^(1/2)/2 + 1/2))^(1/2)*((x + 5^(1/2)/2 - 1/2)/(5^(1/2)/2 - 1/2))^(1 /2)*(5^(1/2) + 1)*((5^(1/2)/2 - x + 1/2)/(5^(1/2)/2 + 1/2))^(1/2)*(ellipti cPi(- (5^(1/2)*1i)/2 - 1i/2, asin((x/(5^(1/2)/2 + 1/2))^(1/2)), -(5^(1/2)/ 2 + 1/2)/(5^(1/2)/2 - 1/2)) - ellipticF(asin((x/(5^(1/2)/2 + 1/2))^(1/2)), -(5^(1/2)/2 + 1/2)/(5^(1/2)/2 - 1/2)) + ellipticPi((5^(1/2)*1i)/2 + 1i/2, asin((x/(5^(1/2)/2 + 1/2))^(1/2)), -(5^(1/2)/2 + 1/2)/(5^(1/2)/2 - 1/2))) )/(x^3 - x^2 - x*(5^(1/2)/2 - 1/2)*(5^(1/2)/2 + 1/2))^(1/2)
\[ \int \frac {-1+x^2}{\left (1+x^2\right ) \sqrt {-x-x^2+x^3}} \, dx=\int \frac {\sqrt {x}\, \sqrt {x^{2}-x -1}\, x}{x^{4}-x^{3}-x -1}d x -\left (\int \frac {\sqrt {x}\, \sqrt {x^{2}-x -1}}{x^{5}-x^{4}-x^{2}-x}d x \right ) \] Input:
int((x^2-1)/(x^2+1)/(x^3-x^2-x)^(1/2),x)
Output:
int((sqrt(x)*sqrt(x**2 - x - 1)*x)/(x**4 - x**3 - x - 1),x) - int((sqrt(x) *sqrt(x**2 - x - 1))/(x**5 - x**4 - x**2 - x),x)