3.2.61 \(\int \frac {-1-2 x+2 x^2}{(1+2 x^2) \sqrt {x+x^4}} \, dx\) [161]

Optimal. Leaf size=19 \[ \text {ArcTan}\left (\frac {2 \sqrt {x+x^4}}{-1+2 x}\right ) \]

[Out]

arctan(2*(x^4+x)^(1/2)/(-1+2*x))

________________________________________________________________________________________

Rubi [F]
time = 1.36, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \begin {gather*} \int \frac {-1-2 x+2 x^2}{\left (1+2 x^2\right ) \sqrt {x+x^4}} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

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

[Out]

(x*(1 + x)*Sqrt[(1 - x + x^2)/(1 + (1 + Sqrt[3])*x)^2]*EllipticF[ArcCos[(1 + (1 - Sqrt[3])*x)/(1 + (1 + Sqrt[3
])*x)], (2 + Sqrt[3])/4])/(3^(1/4)*Sqrt[(x*(1 + x))/(1 + (1 + Sqrt[3])*x)^2]*Sqrt[x + x^4]) - ((1/2 + I/2)*(I
+ Sqrt[2])*Sqrt[x]*Sqrt[1 + x^3]*Defer[Subst][Defer[Int][1/(((-1)^(1/4) - 2^(1/4)*x)*Sqrt[1 + x^6]), x], x, Sq
rt[x]])/Sqrt[x + x^4] + ((1/2 + I/2)*(1 + I*Sqrt[2])*Sqrt[x]*Sqrt[1 + x^3]*Defer[Subst][Defer[Int][1/((-(-1)^(
3/4) - 2^(1/4)*x)*Sqrt[1 + x^6]), x], x, Sqrt[x]])/Sqrt[x + x^4] - ((1/2 + I/2)*(I + Sqrt[2])*Sqrt[x]*Sqrt[1 +
 x^3]*Defer[Subst][Defer[Int][1/(((-1)^(1/4) + 2^(1/4)*x)*Sqrt[1 + x^6]), x], x, Sqrt[x]])/Sqrt[x + x^4] + ((1
/2 + I/2)*(1 + I*Sqrt[2])*Sqrt[x]*Sqrt[1 + x^3]*Defer[Subst][Defer[Int][1/((-(-1)^(3/4) + 2^(1/4)*x)*Sqrt[1 +
x^6]), x], x, Sqrt[x]])/Sqrt[x + x^4]

Rubi steps

\begin {align*} \int \frac {-1-2 x+2 x^2}{\left (1+2 x^2\right ) \sqrt {x+x^4}} \, dx &=\frac {\left (\sqrt {x} \sqrt {1+x^3}\right ) \int \frac {-1-2 x+2 x^2}{\sqrt {x} \left (1+2 x^2\right ) \sqrt {1+x^3}} \, dx}{\sqrt {x+x^4}}\\ &=\frac {\left (\sqrt {x} \sqrt {1+x^3}\right ) \int \left (\frac {1}{\sqrt {x} \sqrt {1+x^3}}-\frac {2 (1+x)}{\sqrt {x} \left (1+2 x^2\right ) \sqrt {1+x^3}}\right ) \, dx}{\sqrt {x+x^4}}\\ &=\frac {\left (\sqrt {x} \sqrt {1+x^3}\right ) \int \frac {1}{\sqrt {x} \sqrt {1+x^3}} \, dx}{\sqrt {x+x^4}}-\frac {\left (2 \sqrt {x} \sqrt {1+x^3}\right ) \int \frac {1+x}{\sqrt {x} \left (1+2 x^2\right ) \sqrt {1+x^3}} \, dx}{\sqrt {x+x^4}}\\ &=-\frac {\left (2 \sqrt {x} \sqrt {1+x^3}\right ) \int \left (\frac {i-\frac {1}{\sqrt {2}}}{2 \sqrt {x} \left (i-\sqrt {2} x\right ) \sqrt {1+x^3}}+\frac {i+\frac {1}{\sqrt {2}}}{2 \sqrt {x} \left (i+\sqrt {2} x\right ) \sqrt {1+x^3}}\right ) \, dx}{\sqrt {x+x^4}}+\frac {\left (2 \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^4}}\\ &=\frac {x (1+x) \sqrt {\frac {1-x+x^2}{\left (1+\left (1+\sqrt {3}\right ) x\right )^2}} F\left (\cos ^{-1}\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 )}{\sqrt [4]{3} \sqrt {\frac {x (1+x)}{\left (1+\left (1+\sqrt {3}\right ) x\right )^2}} \sqrt {x+x^4}}-\frac {\left (\left (2 i-\sqrt {2}\right ) \sqrt {x} \sqrt {1+x^3}\right ) \int \frac {1}{\sqrt {x} \left (i-\sqrt {2} x\right ) \sqrt {1+x^3}} \, dx}{2 \sqrt {x+x^4}}-\frac {\left (\left (2 i+\sqrt {2}\right ) \sqrt {x} \sqrt {1+x^3}\right ) \int \frac {1}{\sqrt {x} \left (i+\sqrt {2} x\right ) \sqrt {1+x^3}} \, dx}{2 \sqrt {x+x^4}}\\ &=\frac {x (1+x) \sqrt {\frac {1-x+x^2}{\left (1+\left (1+\sqrt {3}\right ) x\right )^2}} F\left (\cos ^{-1}\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 )}{\sqrt [4]{3} \sqrt {\frac {x (1+x)}{\left (1+\left (1+\sqrt {3}\right ) x\right )^2}} \sqrt {x+x^4}}-\frac {\left (\left (2 i-\sqrt {2}\right ) \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\left (i-\sqrt {2} x^2\right ) \sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^4}}-\frac {\left (\left (2 i+\sqrt {2}\right ) \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\left (i+\sqrt {2} x^2\right ) \sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^4}}\\ &=\frac {x (1+x) \sqrt {\frac {1-x+x^2}{\left (1+\left (1+\sqrt {3}\right ) x\right )^2}} F\left (\cos ^{-1}\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 )}{\sqrt [4]{3} \sqrt {\frac {x (1+x)}{\left (1+\left (1+\sqrt {3}\right ) x\right )^2}} \sqrt {x+x^4}}-\frac {\left (\left (2 i-\sqrt {2}\right ) \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \left (-\frac {(-1)^{3/4}}{2 \left (\sqrt [4]{-1}-\sqrt [4]{2} x\right ) \sqrt {1+x^6}}-\frac {(-1)^{3/4}}{2 \left (\sqrt [4]{-1}+\sqrt [4]{2} x\right ) \sqrt {1+x^6}}\right ) \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^4}}-\frac {\left (\left (2 i+\sqrt {2}\right ) \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \left (-\frac {\sqrt [4]{-1}}{2 \left (-(-1)^{3/4}-\sqrt [4]{2} x\right ) \sqrt {1+x^6}}-\frac {\sqrt [4]{-1}}{2 \left (-(-1)^{3/4}+\sqrt [4]{2} x\right ) \sqrt {1+x^6}}\right ) \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^4}}\\ &=\frac {x (1+x) \sqrt {\frac {1-x+x^2}{\left (1+\left (1+\sqrt {3}\right ) x\right )^2}} F\left (\cos ^{-1}\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 )}{\sqrt [4]{3} \sqrt {\frac {x (1+x)}{\left (1+\left (1+\sqrt {3}\right ) x\right )^2}} \sqrt {x+x^4}}+\frac {\left ((-1)^{3/4} \left (2 i-\sqrt {2}\right ) \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\left (\sqrt [4]{-1}-\sqrt [4]{2} x\right ) \sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {x+x^4}}+\frac {\left ((-1)^{3/4} \left (2 i-\sqrt {2}\right ) \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\left (\sqrt [4]{-1}+\sqrt [4]{2} x\right ) \sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {x+x^4}}+\frac {\left (\sqrt [4]{-1} \left (2 i+\sqrt {2}\right ) \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\left (-(-1)^{3/4}-\sqrt [4]{2} x\right ) \sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {x+x^4}}+\frac {\left (\sqrt [4]{-1} \left (2 i+\sqrt {2}\right ) \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\left (-(-1)^{3/4}+\sqrt [4]{2} x\right ) \sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {x+x^4}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(51\) vs. \(2(19)=38\).
time = 9.27, size = 51, normalized size = 2.68 \begin {gather*} -\frac {2 \sqrt {x} \sqrt {1+x^3} \text {ArcTan}\left (\frac {\sqrt {x} \sqrt {1+x^3}}{1-x+x^2}\right )}{\sqrt {x+x^4}} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-2*Sqrt[x]*Sqrt[1 + x^3]*ArcTan[(Sqrt[x]*Sqrt[1 + x^3])/(1 - x + x^2)])/Sqrt[x + x^4]

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 4 vs. order 3.
time = 1.84, size = 13532, normalized size = 712.21

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

result too large to display

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.40, size = 17, normalized size = 0.89 \begin {gather*} -\arctan \left (\frac {2 \, x - 1}{2 \, \sqrt {x^{4} + x}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-arctan(1/2*(2*x - 1)/sqrt(x^4 + x))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {2 x^{2} - 2 x - 1}{\sqrt {x \left (x + 1\right ) \left (x^{2} - x + 1\right )} \left (2 x^{2} + 1\right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x**2-2*x-1)/(2*x**2+1)/(x**4+x)**(1/2),x)

[Out]

Integral((2*x**2 - 2*x - 1)/(sqrt(x*(x + 1)*(x**2 - x + 1))*(2*x**2 + 1)), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.05 \begin {gather*} \int -\frac {-2\,x^2+2\,x+1}{\left (2\,x^2+1\right )\,\sqrt {x^4+x}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________