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 ) \] Output:
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 = 11.04 (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 ) \] Input:
Integrate[(1 + x)/((-1 + 2*x + x^2)*Sqrt[-x + x^3]),x]
Output:
((-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.83 (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}}\) |
Input:
Int[(1 + x)/((-1 + 2*x + x^2)*Sqrt[-x + x^3]),x]
Output:
(-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]
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 = 1.33 (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\) |
Input:
int((1+x)/(x^2+2*x-1)/(x^3-x)^(1/2),x,method=_RETURNVERBOSE)
Output:
-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) )
Time = 0.13 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.87 \[ \int \frac {1+x}{\left (-1+2 x+x^2\right ) \sqrt {-x+x^3}} \, dx=\frac {1}{8} \, {\left (\sqrt {2} + 2\right )} \arctan \left (\frac {x^{2} + \sqrt {2} {\left (x^{2} - 2 \, x - 1\right )} + 1}{2 \, \sqrt {x^{3} - x}}\right ) + \frac {1}{8} \, {\left (\sqrt {2} - 2\right )} \arctan \left (-\frac {x^{2} - \sqrt {2} {\left (x^{2} - 2 \, x - 1\right )} + 1}{2 \, \sqrt {x^{3} - x}}\right ) \] Input:
integrate((1+x)/(x^2+2*x-1)/(x^3-x)^(1/2),x, algorithm="fricas")
Output:
1/8*(sqrt(2) + 2)*arctan(1/2*(x^2 + sqrt(2)*(x^2 - 2*x - 1) + 1)/sqrt(x^3 - x)) + 1/8*(sqrt(2) - 2)*arctan(-1/2*(x^2 - sqrt(2)*(x^2 - 2*x - 1) + 1)/ sqrt(x^3 - x))
\[ \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 \] Input:
integrate((1+x)/(x**2+2*x-1)/(x**3-x)**(1/2),x)
Output:
Integral((x + 1)/(sqrt(x*(x - 1)*(x + 1))*(x**2 + 2*x - 1)), 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 } \] Input:
integrate((1+x)/(x^2+2*x-1)/(x^3-x)^(1/2),x, algorithm="maxima")
Output:
integrate((x + 1)/(sqrt(x^3 - x)*(x^2 + 2*x - 1)), 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 } \] Input:
integrate((1+x)/(x^2+2*x-1)/(x^3-x)^(1/2),x, algorithm="giac")
Output:
integrate((x + 1)/(sqrt(x^3 - x)*(x^2 + 2*x - 1)), x)
Time = 0.11 (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 )} \] Input:
int((x + 1)/((x^3 - x)^(1/2)*(2*x + x^2 - 1)),x)
Output:
((-x)^(1/2)*(1 - x)^(1/2)*(x + 1)^(1/2)*ellipticPi(-1/(2^(1/2) - 1), asin( (-x)^(1/2)), -1))/((x^3 - x)^(1/2)*(2^(1/2) - 1)) - ((-x)^(1/2)*(1 - x)^(1 /2)*(x + 1)^(1/2)*ellipticPi(1/(2^(1/2) + 1), asin((-x)^(1/2)), -1))/((x^3 - x)^(1/2)*(2^(1/2) + 1))
\[ \int \frac {1+x}{\left (-1+2 x+x^2\right ) \sqrt {-x+x^3}} \, dx=\int \frac {\sqrt {x^{2}-1}}{\sqrt {x}\, x^{3}+\sqrt {x}\, x^{2}-3 \sqrt {x}\, x +\sqrt {x}}d x \] Input:
int((1+x)/(x^2+2*x-1)/(x^3-x)^(1/2),x)
Output:
int(sqrt(x**2 - 1)/(sqrt(x)*x**3 + sqrt(x)*x**2 - 3*sqrt(x)*x + sqrt(x)),x )