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

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

Optimal result

Integrand size = 33, antiderivative size = 94 \[ \int \frac {-1+x}{(1+x) \sqrt {a+b x+c x^2+b x^3+a x^4}} \, dx=-\frac {2 \sqrt {-2 a+2 b-c} \arctan \left (\frac {\sqrt {-2 a+2 b-c} x}{\sqrt {a}+2 \sqrt {a} x+\sqrt {a} x^2-\sqrt {a+b x+c x^2+b x^3+a x^4}}\right )}{2 a-2 b+c} \]

[Out]

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

Rubi [F]

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

[In]

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

[Out]

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

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

Mathematica [A] (verified)

Time = 0.68 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.78 \[ \int \frac {-1+x}{(1+x) \sqrt {a+b x+c x^2+b x^3+a x^4}} \, dx=\frac {2 \arctan \left (\frac {\sqrt {-2 a+2 b-c} x}{\sqrt {a} (1+x)^2-\sqrt {x \left (b+c x+b x^2\right )+a \left (1+x^4\right )}}\right )}{\sqrt {-2 a+2 b-c}} \]

[In]

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

[Out]

(2*ArcTan[(Sqrt[-2*a + 2*b - c]*x)/(Sqrt[a]*(1 + x)^2 - Sqrt[x*(b + c*x + b*x^2) + a*(1 + x^4)])])/Sqrt[-2*a +
 2*b - c]

Maple [A] (verified)

Time = 2.15 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.85

method result size
default \(-\frac {\ln \left (\frac {2 \sqrt {2 a -2 b +c}\, \sqrt {a \,x^{4}+b \,x^{3}+c \,x^{2}+b x +a}+\left (b -4 a \right ) x^{2}+\left (-4 a -2 b +2 c \right ) x -4 a +b}{\left (1+x \right )^{2}}\right )}{\sqrt {2 a -2 b +c}}\) \(80\)
pseudoelliptic \(-\frac {\ln \left (\frac {2 \sqrt {2 a -2 b +c}\, \sqrt {a \,x^{4}+b \,x^{3}+c \,x^{2}+b x +a}+\left (b -4 a \right ) x^{2}+\left (-4 a -2 b +2 c \right ) x -4 a +b}{\left (1+x \right )^{2}}\right )}{\sqrt {2 a -2 b +c}}\) \(80\)
elliptic \(\text {Expression too large to display}\) \(2813\)

[In]

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

[Out]

-1/(2*a-2*b+c)^(1/2)*ln((2*(2*a-2*b+c)^(1/2)*(a*x^4+b*x^3+c*x^2+b*x+a)^(1/2)+(b-4*a)*x^2+(-4*a-2*b+2*c)*x-4*a+
b)/(1+x)^2)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 169 vs. \(2 (82) = 164\).

Time = 0.45 (sec) , antiderivative size = 392, normalized size of antiderivative = 4.17 \[ \int \frac {-1+x}{(1+x) \sqrt {a+b x+c x^2+b x^3+a x^4}} \, dx=\left [\frac {\log \left (\frac {{\left (24 \, a^{2} - 16 \, a b + b^{2} + 4 \, a c\right )} x^{4} + 4 \, {\left (8 \, a^{2} + 4 \, a b - 3 \, b^{2} - 2 \, {\left (2 \, a - b\right )} c\right )} x^{3} + 2 \, {\left (24 \, a^{2} + 3 \, b^{2} - 4 \, {\left (a + 2 \, b\right )} c + 4 \, c^{2}\right )} x^{2} + 4 \, \sqrt {a x^{4} + b x^{3} + c x^{2} + b x + a} {\left ({\left (4 \, a - b\right )} x^{2} + 2 \, {\left (2 \, a + b - c\right )} x + 4 \, a - b\right )} \sqrt {2 \, a - 2 \, b + c} + 24 \, a^{2} - 16 \, a b + b^{2} + 4 \, a c + 4 \, {\left (8 \, a^{2} + 4 \, a b - 3 \, b^{2} - 2 \, {\left (2 \, a - b\right )} c\right )} x}{x^{4} + 4 \, x^{3} + 6 \, x^{2} + 4 \, x + 1}\right )}{2 \, \sqrt {2 \, a - 2 \, b + c}}, \frac {\sqrt {-2 \, a + 2 \, b - c} \arctan \left (-\frac {\sqrt {a x^{4} + b x^{3} + c x^{2} + b x + a} {\left ({\left (4 \, a - b\right )} x^{2} + 2 \, {\left (2 \, a + b - c\right )} x + 4 \, a - b\right )} \sqrt {-2 \, a + 2 \, b - c}}{2 \, {\left ({\left (2 \, a^{2} - 2 \, a b + a c\right )} x^{4} + {\left (2 \, a b - 2 \, b^{2} + b c\right )} x^{3} + {\left (2 \, {\left (a - b\right )} c + c^{2}\right )} x^{2} + 2 \, a^{2} - 2 \, a b + a c + {\left (2 \, a b - 2 \, b^{2} + b c\right )} x\right )}}\right )}{2 \, a - 2 \, b + c}\right ] \]

[In]

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

[Out]

[1/2*log(((24*a^2 - 16*a*b + b^2 + 4*a*c)*x^4 + 4*(8*a^2 + 4*a*b - 3*b^2 - 2*(2*a - b)*c)*x^3 + 2*(24*a^2 + 3*
b^2 - 4*(a + 2*b)*c + 4*c^2)*x^2 + 4*sqrt(a*x^4 + b*x^3 + c*x^2 + b*x + a)*((4*a - b)*x^2 + 2*(2*a + b - c)*x
+ 4*a - b)*sqrt(2*a - 2*b + c) + 24*a^2 - 16*a*b + b^2 + 4*a*c + 4*(8*a^2 + 4*a*b - 3*b^2 - 2*(2*a - b)*c)*x)/
(x^4 + 4*x^3 + 6*x^2 + 4*x + 1))/sqrt(2*a - 2*b + c), sqrt(-2*a + 2*b - c)*arctan(-1/2*sqrt(a*x^4 + b*x^3 + c*
x^2 + b*x + a)*((4*a - b)*x^2 + 2*(2*a + b - c)*x + 4*a - b)*sqrt(-2*a + 2*b - c)/((2*a^2 - 2*a*b + a*c)*x^4 +
 (2*a*b - 2*b^2 + b*c)*x^3 + (2*(a - b)*c + c^2)*x^2 + 2*a^2 - 2*a*b + a*c + (2*a*b - 2*b^2 + b*c)*x))/(2*a -
2*b + c)]

Sympy [F]

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

[In]

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

[Out]

Integral((x - 1)/((x + 1)*sqrt(a*x**4 + a + b*x**3 + b*x + c*x**2)), x)

Maxima [F]

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

[In]

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

[Out]

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

Giac [F(-1)]

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

[In]

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

[Out]

Timed out

Mupad [F(-1)]

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

[In]

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

[Out]

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