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

   Optimal result
   Rubi [F]
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F(-1)]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

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

[Out]

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

Rubi [F]

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

[In]

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

[Out]

((4*I)*Sqrt[x + 2*x^2 - 2*x^4]*Defer[Subst][Defer[Int][Sqrt[1 + 2*x^2 - 2*x^6]/(I - Sqrt[2]*x), x], x, Sqrt[x]
])/(Sqrt[x]*Sqrt[1 + 2*x - 2*x^3]) + ((4*I)*Sqrt[x + 2*x^2 - 2*x^4]*Defer[Subst][Defer[Int][Sqrt[1 + 2*x^2 - 2
*x^6]/(I + Sqrt[2]*x), x], x, Sqrt[x]])/(Sqrt[x]*Sqrt[1 + 2*x - 2*x^3]) - (8*Sqrt[x + 2*x^2 - 2*x^4]*Defer[Sub
st][Defer[Int][Sqrt[1 + 2*x^2 - 2*x^6]/(1 + 2*x^2 + x^6), x], x, Sqrt[x]])/(Sqrt[x]*Sqrt[1 + 2*x - 2*x^3]) + (
6*Sqrt[x + 2*x^2 - 2*x^4]*Defer[Subst][Defer[Int][(x^2*Sqrt[1 + 2*x^2 - 2*x^6])/(1 + 2*x^2 + x^6), x], x, Sqrt
[x]])/(Sqrt[x]*Sqrt[1 + 2*x - 2*x^3]) - (4*Sqrt[x + 2*x^2 - 2*x^4]*Defer[Subst][Defer[Int][(x^4*Sqrt[1 + 2*x^2
 - 2*x^6])/(1 + 2*x^2 + x^6), x], x, Sqrt[x]])/(Sqrt[x]*Sqrt[1 + 2*x - 2*x^3])

Rubi steps \begin{align*} \text {integral}& = \frac {\sqrt {x+2 x^2-2 x^4} \int \frac {\sqrt {x} (3+4 x) \sqrt {1+2 x-2 x^3}}{(1+2 x) \left (1+2 x+x^3\right )} \, dx}{\sqrt {x} \sqrt {1+2 x-2 x^3}} \\ & = \frac {\left (2 \sqrt {x+2 x^2-2 x^4}\right ) \text {Subst}\left (\int \frac {x^2 \left (3+4 x^2\right ) \sqrt {1+2 x^2-2 x^6}}{\left (1+2 x^2\right ) \left (1+2 x^2+x^6\right )} \, dx,x,\sqrt {x}\right )}{\sqrt {x} \sqrt {1+2 x-2 x^3}} \\ & = \frac {\left (2 \sqrt {x+2 x^2-2 x^4}\right ) \text {Subst}\left (\int \left (\frac {4 \sqrt {1+2 x^2-2 x^6}}{1+2 x^2}+\frac {\left (-4+3 x^2-2 x^4\right ) \sqrt {1+2 x^2-2 x^6}}{1+2 x^2+x^6}\right ) \, dx,x,\sqrt {x}\right )}{\sqrt {x} \sqrt {1+2 x-2 x^3}} \\ & = \frac {\left (2 \sqrt {x+2 x^2-2 x^4}\right ) \text {Subst}\left (\int \frac {\left (-4+3 x^2-2 x^4\right ) \sqrt {1+2 x^2-2 x^6}}{1+2 x^2+x^6} \, dx,x,\sqrt {x}\right )}{\sqrt {x} \sqrt {1+2 x-2 x^3}}+\frac {\left (8 \sqrt {x+2 x^2-2 x^4}\right ) \text {Subst}\left (\int \frac {\sqrt {1+2 x^2-2 x^6}}{1+2 x^2} \, dx,x,\sqrt {x}\right )}{\sqrt {x} \sqrt {1+2 x-2 x^3}} \\ & = \frac {\left (2 \sqrt {x+2 x^2-2 x^4}\right ) \text {Subst}\left (\int \left (-\frac {4 \sqrt {1+2 x^2-2 x^6}}{1+2 x^2+x^6}+\frac {3 x^2 \sqrt {1+2 x^2-2 x^6}}{1+2 x^2+x^6}-\frac {2 x^4 \sqrt {1+2 x^2-2 x^6}}{1+2 x^2+x^6}\right ) \, dx,x,\sqrt {x}\right )}{\sqrt {x} \sqrt {1+2 x-2 x^3}}+\frac {\left (8 \sqrt {x+2 x^2-2 x^4}\right ) \text {Subst}\left (\int \left (\frac {i \sqrt {1+2 x^2-2 x^6}}{2 \left (i-\sqrt {2} x\right )}+\frac {i \sqrt {1+2 x^2-2 x^6}}{2 \left (i+\sqrt {2} x\right )}\right ) \, dx,x,\sqrt {x}\right )}{\sqrt {x} \sqrt {1+2 x-2 x^3}} \\ & = \frac {\left (4 i \sqrt {x+2 x^2-2 x^4}\right ) \text {Subst}\left (\int \frac {\sqrt {1+2 x^2-2 x^6}}{i-\sqrt {2} x} \, dx,x,\sqrt {x}\right )}{\sqrt {x} \sqrt {1+2 x-2 x^3}}+\frac {\left (4 i \sqrt {x+2 x^2-2 x^4}\right ) \text {Subst}\left (\int \frac {\sqrt {1+2 x^2-2 x^6}}{i+\sqrt {2} x} \, dx,x,\sqrt {x}\right )}{\sqrt {x} \sqrt {1+2 x-2 x^3}}-\frac {\left (4 \sqrt {x+2 x^2-2 x^4}\right ) \text {Subst}\left (\int \frac {x^4 \sqrt {1+2 x^2-2 x^6}}{1+2 x^2+x^6} \, dx,x,\sqrt {x}\right )}{\sqrt {x} \sqrt {1+2 x-2 x^3}}+\frac {\left (6 \sqrt {x+2 x^2-2 x^4}\right ) \text {Subst}\left (\int \frac {x^2 \sqrt {1+2 x^2-2 x^6}}{1+2 x^2+x^6} \, dx,x,\sqrt {x}\right )}{\sqrt {x} \sqrt {1+2 x-2 x^3}}-\frac {\left (8 \sqrt {x+2 x^2-2 x^4}\right ) \text {Subst}\left (\int \frac {\sqrt {1+2 x^2-2 x^6}}{1+2 x^2+x^6} \, dx,x,\sqrt {x}\right )}{\sqrt {x} \sqrt {1+2 x-2 x^3}} \\ \end{align*}

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 19.15 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.67

method result size
default \(2 \sqrt {2}\, \arctan \left (\frac {\sqrt {-2 x^{4}+2 x^{2}+x}\, \sqrt {2}}{2 x^{2}}\right )-2 \sqrt {3}\, \arctan \left (\frac {\sqrt {-2 x^{4}+2 x^{2}+x}\, \sqrt {3}}{3 x^{2}}\right )\) \(58\)
pseudoelliptic \(2 \sqrt {2}\, \arctan \left (\frac {\sqrt {-2 x^{4}+2 x^{2}+x}\, \sqrt {2}}{2 x^{2}}\right )-2 \sqrt {3}\, \arctan \left (\frac {\sqrt {-2 x^{4}+2 x^{2}+x}\, \sqrt {3}}{3 x^{2}}\right )\) \(58\)
trager \(\operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right ) \ln \left (-\frac {4 \operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right ) x^{3}+4 \sqrt {-2 x^{4}+2 x^{2}+x}\, x -2 \operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right ) x -\operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right )}{2 x +1}\right )+\operatorname {RootOf}\left (\textit {\_Z}^{2}+3\right ) \ln \left (-\frac {-5 \operatorname {RootOf}\left (\textit {\_Z}^{2}+3\right ) x^{3}+6 \sqrt {-2 x^{4}+2 x^{2}+x}\, x +2 \operatorname {RootOf}\left (\textit {\_Z}^{2}+3\right ) x +\operatorname {RootOf}\left (\textit {\_Z}^{2}+3\right )}{x^{3}+2 x +1}\right )\) \(129\)
elliptic \(\text {Expression too large to display}\) \(413672\)

[In]

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

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 168 vs. \(2 (75) = 150\).

Time = 0.35 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.93 \[ \int \frac {(3+4 x) \sqrt {x+2 x^2-2 x^4}}{(1+2 x) \left (1+2 x+x^3\right )} \, dx=\frac {2}{5} \, \sqrt {2} \arctan \left (\frac {2 \, \sqrt {2} \sqrt {-2 \, x^{4} + 2 \, x^{2} + x} {\left (4 \, x^{3} - 4 \, x^{2} - x + 1\right )}}{16 \, x^{5} - 16 \, x^{4} - 12 \, x^{3} + 8 \, x^{2} + 4 \, x - 1}\right ) - \frac {1}{5} \, \sqrt {2} \arctan \left (\frac {2 \, \sqrt {2} \sqrt {-2 \, x^{4} + 2 \, x^{2} + x} {\left (4 \, x^{2} + 5 \, x + 2\right )}}{32 \, x^{5} + 80 \, x^{4} + 84 \, x^{3} + 40 \, x^{2} + 6 \, x - 1}\right ) - \sqrt {3} \arctan \left (\frac {2 \, \sqrt {3} \sqrt {-2 \, x^{4} + 2 \, x^{2} + x} x}{5 \, x^{3} - 2 \, x - 1}\right ) \]

[In]

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

[Out]

2/5*sqrt(2)*arctan(2*sqrt(2)*sqrt(-2*x^4 + 2*x^2 + x)*(4*x^3 - 4*x^2 - x + 1)/(16*x^5 - 16*x^4 - 12*x^3 + 8*x^
2 + 4*x - 1)) - 1/5*sqrt(2)*arctan(2*sqrt(2)*sqrt(-2*x^4 + 2*x^2 + x)*(4*x^2 + 5*x + 2)/(32*x^5 + 80*x^4 + 84*
x^3 + 40*x^2 + 6*x - 1)) - sqrt(3)*arctan(2*sqrt(3)*sqrt(-2*x^4 + 2*x^2 + x)*x/(5*x^3 - 2*x - 1))

Sympy [F(-1)]

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

[In]

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

[Out]

Timed out

Maxima [F]

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

[In]

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

[Out]

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

Giac [F]

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

[In]

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

[Out]

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

Mupad [F(-1)]

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

[In]

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

[Out]

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