Integrand size = 25, antiderivative size = 85 \[ \int \frac {1+x}{\left (-1+2 x+x^2\right ) \sqrt {-x+x^3}} \, dx=\frac {1}{4} \left (-2+\sqrt {2}\right ) \arctan \left (\frac {\sqrt {3-2 \sqrt {2}} \sqrt {-x+x^3}}{1+x}\right )+\frac {1}{4} \left (2+\sqrt {2}\right ) \arctan \left (\frac {\sqrt {3+2 \sqrt {2}} \sqrt {-x+x^3}}{1+x}\right ) \]
1/4*(-2+2^(1/2))*arctan((2^(1/2)-1)*(x^3-x)^(1/2)/(1+x))+1/4*(2+2^(1/2))*a rctan((1+2^(1/2))*(x^3-x)^(1/2)/(1+x))
Time = 10.94 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.86 \[ \int \frac {1+x}{\left (-1+2 x+x^2\right ) \sqrt {-x+x^3}} \, dx=\frac {1}{4} \left (-2+\sqrt {2}\right ) \arctan \left (\frac {\left (-1+\sqrt {2}\right ) \sqrt {-x+x^3}}{1+x}\right )+\frac {1}{4} \left (2+\sqrt {2}\right ) \arctan \left (\frac {\left (1+\sqrt {2}\right ) \sqrt {-x+x^3}}{1+x}\right ) \]
((-2 + Sqrt[2])*ArcTan[((-1 + Sqrt[2])*Sqrt[-x + x^3])/(1 + x)])/4 + ((2 + Sqrt[2])*ArcTan[((1 + Sqrt[2])*Sqrt[-x + x^3])/(1 + x)])/4
Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.
Time = 0.84 (sec) , antiderivative size = 344, normalized size of antiderivative = 4.05, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {2467, 25, 2035, 7279, 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+1}{\left (x^2+2 x-1\right ) \sqrt {x^3-x}} \, dx\) |
\(\Big \downarrow \) 2467 |
\(\displaystyle \frac {\sqrt {x} \sqrt {x^2-1} \int -\frac {x+1}{\sqrt {x} \left (-x^2-2 x+1\right ) \sqrt {x^2-1}}dx}{\sqrt {x^3-x}}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\sqrt {x} \sqrt {x^2-1} \int \frac {x+1}{\sqrt {x} \left (-x^2-2 x+1\right ) \sqrt {x^2-1}}dx}{\sqrt {x^3-x}}\) |
\(\Big \downarrow \) 2035 |
\(\displaystyle -\frac {2 \sqrt {x} \sqrt {x^2-1} \int \frac {x+1}{\left (-x^2-2 x+1\right ) \sqrt {x^2-1}}d\sqrt {x}}{\sqrt {x^3-x}}\) |
\(\Big \downarrow \) 7279 |
\(\displaystyle -\frac {2 \sqrt {x} \sqrt {x^2-1} \int \left (\frac {1}{\left (-2 x-2 \sqrt {2}-2\right ) \sqrt {x^2-1}}+\frac {1}{\left (-2 x+2 \sqrt {2}-2\right ) \sqrt {x^2-1}}\right )d\sqrt {x}}{\sqrt {x^3-x}}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {2 \sqrt {x} \sqrt {x^2-1} \left (\frac {\sqrt {1-x} \sqrt {x+1} \operatorname {EllipticF}\left (\arcsin \left (\sqrt {x}\right ),-1\right )}{2 \left (2+\sqrt {2}\right ) \sqrt {x^2-1}}+\frac {\sqrt {1-x} \sqrt {x+1} \operatorname {EllipticF}\left (\arcsin \left (\sqrt {x}\right ),-1\right )}{2 \left (2-\sqrt {2}\right ) \sqrt {x^2-1}}-\frac {\left (1+\sqrt {2}\right ) \sqrt {x-1} \sqrt {x+1} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {2} \sqrt {x}}{\sqrt {x-1}}\right ),\frac {1}{2}\right )}{4 \sqrt {x^2-1}}+\frac {\left (1-\sqrt {2}\right ) \sqrt {x-1} \sqrt {x+1} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {2} \sqrt {x}}{\sqrt {x-1}}\right ),\frac {1}{2}\right )}{4 \sqrt {x^2-1}}+\frac {\left (1-\sqrt {2}\right ) \sqrt {1-x} \sqrt {x+1} \operatorname {EllipticPi}\left (1-\sqrt {2},\arcsin \left (\sqrt {x}\right ),-1\right )}{2 \sqrt {x^2-1}}+\frac {\left (1+\sqrt {2}\right ) \sqrt {1-x} \sqrt {x+1} \operatorname {EllipticPi}\left (1+\sqrt {2},\arcsin \left (\sqrt {x}\right ),-1\right )}{2 \sqrt {x^2-1}}\right )}{\sqrt {x^3-x}}\) |
(-2*Sqrt[x]*Sqrt[-1 + x^2]*((Sqrt[1 - x]*Sqrt[1 + x]*EllipticF[ArcSin[Sqrt [x]], -1])/(2*(2 - Sqrt[2])*Sqrt[-1 + x^2]) + (Sqrt[1 - x]*Sqrt[1 + x]*Ell ipticF[ArcSin[Sqrt[x]], -1])/(2*(2 + Sqrt[2])*Sqrt[-1 + x^2]) + ((1 - Sqrt [2])*Sqrt[-1 + x]*Sqrt[1 + x]*EllipticF[ArcSin[(Sqrt[2]*Sqrt[x])/Sqrt[-1 + x]], 1/2])/(4*Sqrt[-1 + x^2]) - ((1 + Sqrt[2])*Sqrt[-1 + x]*Sqrt[1 + x]*E llipticF[ArcSin[(Sqrt[2]*Sqrt[x])/Sqrt[-1 + x]], 1/2])/(4*Sqrt[-1 + x^2]) + ((1 - Sqrt[2])*Sqrt[1 - x]*Sqrt[1 + x]*EllipticPi[1 - Sqrt[2], ArcSin[Sq rt[x]], -1])/(2*Sqrt[-1 + x^2]) + ((1 + Sqrt[2])*Sqrt[1 - x]*Sqrt[1 + x]*E llipticPi[1 + Sqrt[2], ArcSin[Sqrt[x]], -1])/(2*Sqrt[-1 + x^2])))/Sqrt[-x + x^3]
3.12.33.3.1 Defintions of rubi rules used
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_.) + (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]
Result contains higher order function than in optimal. Order 4 vs. order 3.
Time = 2.87 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.13
method | result | size |
elliptic | \(-\frac {\sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \sqrt {2}\, \operatorname {EllipticPi}\left (\sqrt {1+x}, \frac {\sqrt {2}}{2}, \frac {\sqrt {2}}{2}\right )}{4 \sqrt {x^{3}-x}}+\frac {\sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \sqrt {2}\, \operatorname {EllipticPi}\left (\sqrt {1+x}, -\frac {\sqrt {2}}{2}, \frac {\sqrt {2}}{2}\right )}{4 \sqrt {x^{3}-x}}\) | \(96\) |
default | \(\text {Expression too large to display}\) | \(774\) |
trager | \(\text {Expression too large to display}\) | \(774\) |
-1/4*(1+x)^(1/2)*(2-2*x)^(1/2)*(-x)^(1/2)/(x^3-x)^(1/2)*2^(1/2)*EllipticPi ((1+x)^(1/2),1/2*2^(1/2),1/2*2^(1/2))+1/4*(1+x)^(1/2)*(2-2*x)^(1/2)*(-x)^( 1/2)/(x^3-x)^(1/2)*2^(1/2)*EllipticPi((1+x)^(1/2),-1/2*2^(1/2),1/2*2^(1/2) )
Leaf count of result is larger than twice the leaf count of optimal. 413 vs. \(2 (57) = 114\).
Time = 0.32 (sec) , antiderivative size = 413, normalized size of antiderivative = 4.86 \[ \int \frac {1+x}{\left (-1+2 x+x^2\right ) \sqrt {-x+x^3}} \, dx=-\frac {1}{16} \, \sqrt {2} \sqrt {2 \, \sqrt {2} - 3} \log \left (\frac {x^{4} - 2 \, x^{3} + 2 \, \sqrt {x^{3} - x} {\left (3 \, x^{2} + 2 \, \sqrt {2} {\left (x^{2} - x\right )} - 2 \, x + 1\right )} \sqrt {2 \, \sqrt {2} - 3} - 4 \, \sqrt {2} {\left (x^{3} - x\right )} - 2 \, x - 1}{x^{4} + 4 \, x^{3} + 2 \, x^{2} - 4 \, x + 1}\right ) + \frac {1}{16} \, \sqrt {2} \sqrt {2 \, \sqrt {2} - 3} \log \left (\frac {x^{4} - 2 \, x^{3} - 2 \, \sqrt {x^{3} - x} {\left (3 \, x^{2} + 2 \, \sqrt {2} {\left (x^{2} - x\right )} - 2 \, x + 1\right )} \sqrt {2 \, \sqrt {2} - 3} - 4 \, \sqrt {2} {\left (x^{3} - x\right )} - 2 \, x - 1}{x^{4} + 4 \, x^{3} + 2 \, x^{2} - 4 \, x + 1}\right ) + \frac {1}{16} \, \sqrt {2} \sqrt {-2 \, \sqrt {2} - 3} \log \left (\frac {x^{4} - 2 \, x^{3} + 2 \, \sqrt {x^{3} - x} {\left (3 \, x^{2} - 2 \, \sqrt {2} {\left (x^{2} - x\right )} - 2 \, x + 1\right )} \sqrt {-2 \, \sqrt {2} - 3} + 4 \, \sqrt {2} {\left (x^{3} - x\right )} - 2 \, x - 1}{x^{4} + 4 \, x^{3} + 2 \, x^{2} - 4 \, x + 1}\right ) - \frac {1}{16} \, \sqrt {2} \sqrt {-2 \, \sqrt {2} - 3} \log \left (\frac {x^{4} - 2 \, x^{3} - 2 \, \sqrt {x^{3} - x} {\left (3 \, x^{2} - 2 \, \sqrt {2} {\left (x^{2} - x\right )} - 2 \, x + 1\right )} \sqrt {-2 \, \sqrt {2} - 3} + 4 \, \sqrt {2} {\left (x^{3} - x\right )} - 2 \, x - 1}{x^{4} + 4 \, x^{3} + 2 \, x^{2} - 4 \, x + 1}\right ) \]
-1/16*sqrt(2)*sqrt(2*sqrt(2) - 3)*log((x^4 - 2*x^3 + 2*sqrt(x^3 - x)*(3*x^ 2 + 2*sqrt(2)*(x^2 - x) - 2*x + 1)*sqrt(2*sqrt(2) - 3) - 4*sqrt(2)*(x^3 - x) - 2*x - 1)/(x^4 + 4*x^3 + 2*x^2 - 4*x + 1)) + 1/16*sqrt(2)*sqrt(2*sqrt( 2) - 3)*log((x^4 - 2*x^3 - 2*sqrt(x^3 - x)*(3*x^2 + 2*sqrt(2)*(x^2 - x) - 2*x + 1)*sqrt(2*sqrt(2) - 3) - 4*sqrt(2)*(x^3 - x) - 2*x - 1)/(x^4 + 4*x^3 + 2*x^2 - 4*x + 1)) + 1/16*sqrt(2)*sqrt(-2*sqrt(2) - 3)*log((x^4 - 2*x^3 + 2*sqrt(x^3 - x)*(3*x^2 - 2*sqrt(2)*(x^2 - x) - 2*x + 1)*sqrt(-2*sqrt(2) - 3) + 4*sqrt(2)*(x^3 - x) - 2*x - 1)/(x^4 + 4*x^3 + 2*x^2 - 4*x + 1)) - 1 /16*sqrt(2)*sqrt(-2*sqrt(2) - 3)*log((x^4 - 2*x^3 - 2*sqrt(x^3 - x)*(3*x^2 - 2*sqrt(2)*(x^2 - x) - 2*x + 1)*sqrt(-2*sqrt(2) - 3) + 4*sqrt(2)*(x^3 - x) - 2*x - 1)/(x^4 + 4*x^3 + 2*x^2 - 4*x + 1))
\[ \int \frac {1+x}{\left (-1+2 x+x^2\right ) \sqrt {-x+x^3}} \, dx=\int \frac {x + 1}{\sqrt {x \left (x - 1\right ) \left (x + 1\right )} \left (x^{2} + 2 x - 1\right )}\, dx \]
\[ \int \frac {1+x}{\left (-1+2 x+x^2\right ) \sqrt {-x+x^3}} \, dx=\int { \frac {x + 1}{\sqrt {x^{3} - x} {\left (x^{2} + 2 \, x - 1\right )}} \,d x } \]
\[ \int \frac {1+x}{\left (-1+2 x+x^2\right ) \sqrt {-x+x^3}} \, dx=\int { \frac {x + 1}{\sqrt {x^{3} - x} {\left (x^{2} + 2 \, x - 1\right )}} \,d x } \]
Time = 0.12 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.20 \[ \int \frac {1+x}{\left (-1+2 x+x^2\right ) \sqrt {-x+x^3}} \, dx=\frac {\sqrt {-x}\,\sqrt {1-x}\,\sqrt {x+1}\,\Pi \left (-\frac {1}{\sqrt {2}-1};\mathrm {asin}\left (\sqrt {-x}\right )\middle |-1\right )}{\sqrt {x^3-x}\,\left (\sqrt {2}-1\right )}-\frac {\sqrt {-x}\,\sqrt {1-x}\,\sqrt {x+1}\,\Pi \left (\frac {1}{\sqrt {2}+1};\mathrm {asin}\left (\sqrt {-x}\right )\middle |-1\right )}{\sqrt {x^3-x}\,\left (\sqrt {2}+1\right )} \]