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

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

Optimal result

Integrand size = 37, antiderivative size = 189 \[ \int \frac {1+x^2}{\left (-1+x^2\right ) \sqrt {a+b x+c x^2+b x^3+a x^4}} \, dx=-\frac {\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}-\frac {\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} \] Output:

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [F]

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^2+1}{\left (x^2-1\right ) \sqrt {a x^4+a+b x^3+b x+c x^2}} \, dx\)

\(\Big \downarrow \) 7276

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

$Aborted
 
Maple [A] (verified)

Time = 3.70 (sec) , antiderivative size = 180, normalized size of antiderivative = 0.95

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}+\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}}{2 \sqrt {2 a +2 b +c}\, \sqrt {2 a -2 b +c}}\) \(180\)
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}+\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}}{2 \sqrt {2 a +2 b +c}\, \sqrt {2 a -2 b +c}}\) \(180\)
elliptic \(\text {Expression too large to display}\) \(90178\)

Input:

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

Output:

-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)*(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)*(2*a+2*b+c)^(1/2))/(2*a+2*b+c)^(1/2)/(2*a-2*b+c)^(1/2)
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 353 vs. \(2 (165) = 330\).

Time = 0.38 (sec) , antiderivative size = 1659, normalized size of antiderivative = 8.78 \[ \int \frac {1+x^2}{\left (-1+x^2\right ) \sqrt {a+b x+c x^2+b x^3+a x^4}} \, dx=\text {Too large to display} \] Input:

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

Output:

[1/4*((2*a + 2*b + c)*sqrt(2*a - 2*b + c)*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)*(2*a - 2*b + c)*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)*sq 
rt(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)))/(4*a^2 - 4*b^2 + 
4*a*c + c^2), 1/4*(2*(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)*sqrt(2*a - 2*b + c)*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) + 2 
4*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...
 

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.40 (sec) , antiderivative size = 595, normalized size of antiderivative = 3.15 \[ \int \frac {1+x^2}{\left (-1+x^2\right ) \sqrt {a+b x+c x^2+b x^3+a x^4}} \, dx=\frac {-2 \sqrt {2 a -2 b +c}\, \mathrm {log}\left (x^{2}+2 x +1\right ) a -2 \sqrt {2 a -2 b +c}\, \mathrm {log}\left (x^{2}+2 x +1\right ) b -\sqrt {2 a -2 b +c}\, \mathrm {log}\left (x^{2}+2 x +1\right ) c +2 \sqrt {2 a -2 b +c}\, \mathrm {log}\left (2 \sqrt {2 a -2 b +c}\, \sqrt {a \,x^{4}+b \,x^{3}+c \,x^{2}+b x +a}+4 a \,x^{2}+4 a x +4 a -b \,x^{2}+2 b x -b -2 c x \right ) a +2 \sqrt {2 a -2 b +c}\, \mathrm {log}\left (2 \sqrt {2 a -2 b +c}\, \sqrt {a \,x^{4}+b \,x^{3}+c \,x^{2}+b x +a}+4 a \,x^{2}+4 a x +4 a -b \,x^{2}+2 b x -b -2 c x \right ) b +\sqrt {2 a -2 b +c}\, \mathrm {log}\left (2 \sqrt {2 a -2 b +c}\, \sqrt {a \,x^{4}+b \,x^{3}+c \,x^{2}+b x +a}+4 a \,x^{2}+4 a x +4 a -b \,x^{2}+2 b x -b -2 c x \right ) c -2 \sqrt {2 a +2 b +c}\, \mathrm {log}\left (x^{2}-2 x +1\right ) a +2 \sqrt {2 a +2 b +c}\, \mathrm {log}\left (x^{2}-2 x +1\right ) b -\sqrt {2 a +2 b +c}\, \mathrm {log}\left (x^{2}-2 x +1\right ) c +2 \sqrt {2 a +2 b +c}\, \mathrm {log}\left (-2 \sqrt {2 a +2 b +c}\, \sqrt {a \,x^{4}+b \,x^{3}+c \,x^{2}+b x +a}+4 a \,x^{2}-4 a x +4 a +b \,x^{2}+2 b x +b +2 c x \right ) a -2 \sqrt {2 a +2 b +c}\, \mathrm {log}\left (-2 \sqrt {2 a +2 b +c}\, \sqrt {a \,x^{4}+b \,x^{3}+c \,x^{2}+b x +a}+4 a \,x^{2}-4 a x +4 a +b \,x^{2}+2 b x +b +2 c x \right ) b +\sqrt {2 a +2 b +c}\, \mathrm {log}\left (-2 \sqrt {2 a +2 b +c}\, \sqrt {a \,x^{4}+b \,x^{3}+c \,x^{2}+b x +a}+4 a \,x^{2}-4 a x +4 a +b \,x^{2}+2 b x +b +2 c x \right ) c}{8 a^{2}+8 a c -8 b^{2}+2 c^{2}} \] Input:

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

Output:

( - 2*sqrt(2*a - 2*b + c)*log(x**2 + 2*x + 1)*a - 2*sqrt(2*a - 2*b + c)*lo 
g(x**2 + 2*x + 1)*b - sqrt(2*a - 2*b + c)*log(x**2 + 2*x + 1)*c + 2*sqrt(2 
*a - 2*b + c)*log(2*sqrt(2*a - 2*b + c)*sqrt(a*x**4 + a + b*x**3 + b*x + c 
*x**2) + 4*a*x**2 + 4*a*x + 4*a - b*x**2 + 2*b*x - b - 2*c*x)*a + 2*sqrt(2 
*a - 2*b + c)*log(2*sqrt(2*a - 2*b + c)*sqrt(a*x**4 + a + b*x**3 + b*x + c 
*x**2) + 4*a*x**2 + 4*a*x + 4*a - b*x**2 + 2*b*x - b - 2*c*x)*b + sqrt(2*a 
 - 2*b + c)*log(2*sqrt(2*a - 2*b + c)*sqrt(a*x**4 + a + b*x**3 + b*x + c*x 
**2) + 4*a*x**2 + 4*a*x + 4*a - b*x**2 + 2*b*x - b - 2*c*x)*c - 2*sqrt(2*a 
 + 2*b + c)*log(x**2 - 2*x + 1)*a + 2*sqrt(2*a + 2*b + c)*log(x**2 - 2*x + 
 1)*b - sqrt(2*a + 2*b + c)*log(x**2 - 2*x + 1)*c + 2*sqrt(2*a + 2*b + c)* 
log( - 2*sqrt(2*a + 2*b + c)*sqrt(a*x**4 + a + b*x**3 + b*x + c*x**2) + 4* 
a*x**2 - 4*a*x + 4*a + b*x**2 + 2*b*x + b + 2*c*x)*a - 2*sqrt(2*a + 2*b + 
c)*log( - 2*sqrt(2*a + 2*b + c)*sqrt(a*x**4 + a + b*x**3 + b*x + c*x**2) + 
 4*a*x**2 - 4*a*x + 4*a + b*x**2 + 2*b*x + b + 2*c*x)*b + sqrt(2*a + 2*b + 
 c)*log( - 2*sqrt(2*a + 2*b + c)*sqrt(a*x**4 + a + b*x**3 + b*x + c*x**2) 
+ 4*a*x**2 - 4*a*x + 4*a + b*x**2 + 2*b*x + b + 2*c*x)*c)/(2*(4*a**2 + 4*a 
*c - 4*b**2 + c**2))