3.11.48 \(\int \frac {(2+x^2) \sqrt {4-5 x^2+x^4}}{x^2 (-2+2 x+x^2)} \, dx\) [1048]

3.11.48.1 Optimal result
3.11.48.2 Mathematica [A] (verified)
3.11.48.3 Rubi [C] (warning: unable to verify)
3.11.48.4 Maple [A] (verified)
3.11.48.5 Fricas [A] (verification not implemented)
3.11.48.6 Sympy [F]
3.11.48.7 Maxima [F]
3.11.48.8 Giac [F]
3.11.48.9 Mupad [F(-1)]

3.11.48.1 Optimal result

Integrand size = 33, antiderivative size = 79 \[ \int \frac {\left (2+x^2\right ) \sqrt {4-5 x^2+x^4}}{x^2 \left (-2+2 x+x^2\right )} \, dx=\frac {\sqrt {4-5 x^2+x^4}}{x}-4 \text {arctanh}\left (\frac {-2+x+x^2}{\sqrt {4-5 x^2+x^4}}\right )+2 \sqrt {3} \text {arctanh}\left (\frac {\sqrt {4-5 x^2+x^4}}{\sqrt {3} \left (-2+x+x^2\right )}\right ) \]

output
(x^4-5*x^2+4)^(1/2)/x-4*arctanh((x^2+x-2)/(x^4-5*x^2+4)^(1/2))+2*3^(1/2)*a 
rctanh(1/3*(x^4-5*x^2+4)^(1/2)*3^(1/2)/(x^2+x-2))
 
3.11.48.2 Mathematica [A] (verified)

Time = 0.54 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.00 \[ \int \frac {\left (2+x^2\right ) \sqrt {4-5 x^2+x^4}}{x^2 \left (-2+2 x+x^2\right )} \, dx=\frac {\sqrt {4-5 x^2+x^4}}{x}-4 \text {arctanh}\left (\frac {-2+x+x^2}{\sqrt {4-5 x^2+x^4}}\right )+2 \sqrt {3} \text {arctanh}\left (\frac {\sqrt {4-5 x^2+x^4}}{\sqrt {3} \left (-2+x+x^2\right )}\right ) \]

input
Integrate[((2 + x^2)*Sqrt[4 - 5*x^2 + x^4])/(x^2*(-2 + 2*x + x^2)),x]
 
output
Sqrt[4 - 5*x^2 + x^4]/x - 4*ArcTanh[(-2 + x + x^2)/Sqrt[4 - 5*x^2 + x^4]] 
+ 2*Sqrt[3]*ArcTanh[Sqrt[4 - 5*x^2 + x^4]/(Sqrt[3]*(-2 + x + x^2))]
 
3.11.48.3 Rubi [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.

Time = 2.29 (sec) , antiderivative size = 808, normalized size of antiderivative = 10.23, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.061, Rules used = {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 {\left (x^2+2\right ) \sqrt {x^4-5 x^2+4}}{x^2 \left (x^2+2 x-2\right )} \, dx\)

\(\Big \downarrow \) 7279

\(\displaystyle \int \left (\frac {\sqrt {x^4-5 x^2+4} (x+4)}{x^2+2 x-2}-\frac {\sqrt {x^4-5 x^2+4}}{x}-\frac {\sqrt {x^4-5 x^2+4}}{x^2}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \text {arctanh}\left (\frac {8-5 x^2}{4 \sqrt {x^4-5 x^2+4}}\right )+\frac {1}{8} \left (9+\sqrt {3}\right ) \text {arctanh}\left (\frac {5-2 x^2}{2 \sqrt {x^4-5 x^2+4}}\right )+\frac {1}{8} \left (9-\sqrt {3}\right ) \text {arctanh}\left (\frac {5-2 x^2}{2 \sqrt {x^4-5 x^2+4}}\right )-\frac {5}{4} \text {arctanh}\left (\frac {5-2 x^2}{2 \sqrt {x^4-5 x^2+4}}\right )+\frac {1}{2} \sqrt {3} \text {arctanh}\left (\frac {2 \left (6-5 \sqrt {3}\right )-\left (3-4 \sqrt {3}\right ) x^2}{2 \sqrt {6 \left (2-\sqrt {3}\right )} \sqrt {x^4-5 x^2+4}}\right )-\frac {1}{2} \sqrt {3} \text {arctanh}\left (\frac {2 \left (6+5 \sqrt {3}\right )-\left (3+4 \sqrt {3}\right ) x^2}{2 \sqrt {6 \left (2+\sqrt {3}\right )} \sqrt {x^4-5 x^2+4}}\right )-\frac {\sqrt {\frac {1}{3} \left (45+26 \sqrt {3}\right )} \sqrt {4-x^2} \sqrt {-\left (\left (3-2 \sqrt {3}\right ) x^2\right )-2 \sqrt {3}+3} \operatorname {EllipticF}\left (\arccos \left (\frac {x}{2}\right ),\frac {4}{3}\right )}{\sqrt {x^4-5 x^2+4}}-\frac {\left (2-\sqrt {3}\right ) \sqrt {\left (3-2 \sqrt {3}\right ) x^2-4 \left (3-2 \sqrt {3}\right )} \sqrt {-\left (\left (3+2 \sqrt {3}\right ) x^2\right )+2 \sqrt {3}+3} \operatorname {EllipticF}\left (\arcsin (x),\frac {1}{4}\right )}{2 \sqrt {x^4-5 x^2+4}}-\frac {\sqrt {2} \left (x^2+2\right ) \sqrt {\frac {x^4-5 x^2+4}{\left (x^2+2\right )^2}} \operatorname {EllipticF}\left (2 \arctan \left (\frac {x}{\sqrt {2}}\right ),\frac {9}{8}\right )}{\sqrt {x^4-5 x^2+4}}+\frac {\left (x^2+2\right ) \sqrt {\frac {x^4-5 x^2+4}{\left (x^2+2\right )^2}} \operatorname {EllipticF}\left (2 \arctan \left (\frac {x}{\sqrt {2}}\right ),\frac {9}{8}\right )}{2 \sqrt {2} \sqrt {x^4-5 x^2+4}}-\frac {3 \sqrt {1-x^2} \sqrt {4-x^2} \operatorname {EllipticPi}\left (\frac {1}{2} \left (2-\sqrt {3}\right ),\arcsin (x),\frac {1}{4}\right )}{2 \sqrt {x^4-5 x^2+4}}-\frac {\sqrt {3} \sqrt {\left (3-2 \sqrt {3}\right ) x^2-4 \left (3-2 \sqrt {3}\right )} \sqrt {-\left (\left (3+2 \sqrt {3}\right ) x^2\right )+2 \sqrt {3}+3} \operatorname {EllipticPi}\left (\frac {1}{2} \left (2+\sqrt {3}\right ),\arcsin (x),\frac {1}{4}\right )}{2 \sqrt {x^4-5 x^2+4}}+\frac {\sqrt {x^4-5 x^2+4}}{x}+\frac {1}{4} \left (1+\sqrt {3}\right ) \sqrt {x^4-5 x^2+4}+\frac {1}{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^2 + x^4)/(2 + x^2)^2]*EllipticF[2*ArcTa 
n[x/Sqrt[2]], 9/8])/(2*Sqrt[2]*Sqrt[4 - 5*x^2 + x^4]) - (Sqrt[2]*(2 + x^2) 
*Sqrt[(4 - 5*x^2 + x^4)/(2 + x^2)^2]*EllipticF[2*ArcTan[x/Sqrt[2]], 9/8])/ 
Sqrt[4 - 5*x^2 + x^4] - (3*Sqrt[1 - x^2]*Sqrt[4 - x^2]*EllipticPi[(2 - Sqr 
t[3])/2, ArcSin[x], 1/4])/(2*Sqrt[4 - 5*x^2 + x^4]) - (Sqrt[3]*Sqrt[-4*(3 
- 2*Sqrt[3]) + (3 - 2*Sqrt[3])*x^2]*Sqrt[3 + 2*Sqrt[3] - (3 + 2*Sqrt[3])*x 
^2]*EllipticPi[(2 + Sqrt[3])/2, ArcSin[x], 1/4])/(2*Sqrt[4 - 5*x^2 + x^4])
 

3.11.48.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 7279
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]
 
3.11.48.4 Maple [A] (verified)

Time = 3.27 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.91

method result size
risch \(\frac {\sqrt {x^{4}-5 x^{2}+4}}{x}-2 \ln \left (\frac {x^{2}+\sqrt {x^{4}-5 x^{2}+4}-2}{x}\right )+\sqrt {3}\, \operatorname {arctanh}\left (\frac {\left (2 x^{2}+x -4\right ) \sqrt {3}}{3 \sqrt {x^{4}-5 x^{2}+4}}\right )\) \(72\)
default \(\frac {\sqrt {3}\, \operatorname {arctanh}\left (\frac {\left (2 x^{2}+x -4\right ) \sqrt {3}}{3 \sqrt {x^{4}-5 x^{2}+4}}\right ) x -2 \ln \left (\frac {x^{2}+\sqrt {x^{4}-5 x^{2}+4}-2}{x}\right ) x +\sqrt {x^{4}-5 x^{2}+4}}{x}\) \(74\)
pseudoelliptic \(\frac {\sqrt {3}\, \operatorname {arctanh}\left (\frac {\left (2 x^{2}+x -4\right ) \sqrt {3}}{3 \sqrt {x^{4}-5 x^{2}+4}}\right ) x -2 \ln \left (\frac {x^{2}+\sqrt {x^{4}-5 x^{2}+4}-2}{x}\right ) x +\sqrt {x^{4}-5 x^{2}+4}}{x}\) \(74\)
trager \(\frac {\sqrt {x^{4}-5 x^{2}+4}}{x}+\operatorname {RootOf}\left (\textit {\_Z}^{2}-3\right ) \ln \left (-\frac {2 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3\right ) x^{2}+\operatorname {RootOf}\left (\textit {\_Z}^{2}-3\right ) x -4 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3\right )+3 \sqrt {x^{4}-5 x^{2}+4}}{x^{2}+2 x -2}\right )-2 \ln \left (-\frac {x^{2}+\sqrt {x^{4}-5 x^{2}+4}-2}{x}\right )\) \(105\)
elliptic \(-\ln \left (-\frac {5}{2}+x^{2}+\sqrt {x^{4}-5 x^{2}+4}\right )-\frac {\operatorname {arctanh}\left (\frac {-5 x^{2}+8}{4 \sqrt {x^{4}-5 x^{2}+4}}\right )}{\left (2+\sqrt {3}\right ) \left (-2+\sqrt {3}\right )}+\frac {\left (9+5 \sqrt {3}\right ) \sqrt {3}\, \operatorname {arctanh}\left (\frac {24+12 \sqrt {3}+\left (3+4 \sqrt {3}\right ) \left (x^{2}-4-2 \sqrt {3}\right )}{2 \left (3+\sqrt {3}\right ) \sqrt {\left (x^{2}-4-2 \sqrt {3}\right )^{2}+\left (3+4 \sqrt {3}\right ) \left (x^{2}-4-2 \sqrt {3}\right )+12+6 \sqrt {3}}}\right )}{\left (4+2 \sqrt {3}\right ) \left (3+\sqrt {3}\right )}-\frac {\left (-9+5 \sqrt {3}\right ) \sqrt {3}\, \operatorname {arctanh}\left (\frac {24-12 \sqrt {3}+\left (3-4 \sqrt {3}\right ) \left (x^{2}-4+2 \sqrt {3}\right )}{2 \left (3-\sqrt {3}\right ) \sqrt {\left (x^{2}-4+2 \sqrt {3}\right )^{2}+\left (3-4 \sqrt {3}\right ) \left (x^{2}-4+2 \sqrt {3}\right )+12-6 \sqrt {3}}}\right )}{\left (-4+2 \sqrt {3}\right ) \left (3-\sqrt {3}\right )}+\frac {\left (\frac {\sqrt {x^{4}-5 x^{2}+4}\, \sqrt {2}}{x}-\sqrt {6}\, \operatorname {arctanh}\left (\frac {\sqrt {6}\, \sqrt {x^{4}-5 x^{2}+4}\, \sqrt {2}}{6 x}\right )\right ) \sqrt {2}}{2}\) \(321\)

input
int((x^2+2)*(x^4-5*x^2+4)^(1/2)/x^2/(x^2+2*x-2),x,method=_RETURNVERBOSE)
 
output
(x^4-5*x^2+4)^(1/2)/x-2*ln((x^2+(x^4-5*x^2+4)^(1/2)-2)/x)+3^(1/2)*arctanh( 
1/3*(2*x^2+x-4)*3^(1/2)/(x^4-5*x^2+4)^(1/2))
 
3.11.48.5 Fricas [A] (verification not implemented)

Time = 0.35 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.46 \[ \int \frac {\left (2+x^2\right ) \sqrt {4-5 x^2+x^4}}{x^2 \left (-2+2 x+x^2\right )} \, dx=\frac {\sqrt {3} x \log \left (-\frac {7 \, x^{4} + 4 \, x^{3} + 2 \, \sqrt {3} \sqrt {x^{4} - 5 \, x^{2} + 4} {\left (2 \, x^{2} + x - 4\right )} - 30 \, x^{2} - 8 \, x + 28}{x^{4} + 4 \, x^{3} - 8 \, x + 4}\right ) + 4 \, x \log \left (\frac {x^{2} - \sqrt {x^{4} - 5 \, x^{2} + 4} - 2}{x}\right ) + 2 \, \sqrt {x^{4} - 5 \, x^{2} + 4}}{2 \, x} \]

input
integrate((x^2+2)*(x^4-5*x^2+4)^(1/2)/x^2/(x^2+2*x-2),x, algorithm="fricas 
")
 
output
1/2*(sqrt(3)*x*log(-(7*x^4 + 4*x^3 + 2*sqrt(3)*sqrt(x^4 - 5*x^2 + 4)*(2*x^ 
2 + x - 4) - 30*x^2 - 8*x + 28)/(x^4 + 4*x^3 - 8*x + 4)) + 4*x*log((x^2 - 
sqrt(x^4 - 5*x^2 + 4) - 2)/x) + 2*sqrt(x^4 - 5*x^2 + 4))/x
 
3.11.48.6 Sympy [F]

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

input
integrate((x**2+2)*(x**4-5*x**2+4)**(1/2)/x**2/(x**2+2*x-2),x)
 
output
Integral(sqrt((x - 2)*(x - 1)*(x + 1)*(x + 2))*(x**2 + 2)/(x**2*(x**2 + 2* 
x - 2)), x)
 
3.11.48.7 Maxima [F]

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

input
integrate((x^2+2)*(x^4-5*x^2+4)^(1/2)/x^2/(x^2+2*x-2),x, algorithm="maxima 
")
 
output
integrate(sqrt(x^4 - 5*x^2 + 4)*(x^2 + 2)/((x^2 + 2*x - 2)*x^2), x)
 
3.11.48.8 Giac [F]

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

input
integrate((x^2+2)*(x^4-5*x^2+4)^(1/2)/x^2/(x^2+2*x-2),x, algorithm="giac")
 
output
integrate(sqrt(x^4 - 5*x^2 + 4)*(x^2 + 2)/((x^2 + 2*x - 2)*x^2), x)
 
3.11.48.9 Mupad [F(-1)]

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

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