3.21.45 \(\int \frac {\sqrt {-1+x^2} \sqrt {x^2+x \sqrt {-1+x^2}}}{1+x^2} \, dx\) [2045]

3.21.45.1 Optimal result
3.21.45.2 Mathematica [A] (verified)
3.21.45.3 Rubi [F]
3.21.45.4 Maple [F]
3.21.45.5 Fricas [B] (verification not implemented)
3.21.45.6 Sympy [F]
3.21.45.7 Maxima [F]
3.21.45.8 Giac [F]
3.21.45.9 Mupad [F(-1)]

3.21.45.1 Optimal result

Integrand size = 36, antiderivative size = 146 \[ \int \frac {\sqrt {-1+x^2} \sqrt {x^2+x \sqrt {-1+x^2}}}{1+x^2} \, dx=\sqrt {x^2+x \sqrt {-1+x^2}}-\sqrt {2 \left (1+\sqrt {2}\right )} \arctan \left (\frac {\sqrt {x^2+x \sqrt {-1+x^2}}}{\sqrt {1+\sqrt {2}}}\right )-\frac {\text {arctanh}\left (\sqrt {2} \sqrt {x^2+x \sqrt {-1+x^2}}\right )}{\sqrt {2}}+\sqrt {2 \left (-1+\sqrt {2}\right )} \text {arctanh}\left (\frac {\sqrt {x^2+x \sqrt {-1+x^2}}}{\sqrt {-1+\sqrt {2}}}\right ) \]

output
(x^2+x*(x^2-1)^(1/2))^(1/2)-(2+2*2^(1/2))^(1/2)*arctan((x^2+x*(x^2-1)^(1/2 
))^(1/2)/(1+2^(1/2))^(1/2))-1/2*arctanh(2^(1/2)*(x^2+x*(x^2-1)^(1/2))^(1/2 
))*2^(1/2)+(-2+2*2^(1/2))^(1/2)*arctanh((x^2+x*(x^2-1)^(1/2))^(1/2)/(2^(1/ 
2)-1)^(1/2))
 
3.21.45.2 Mathematica [A] (verified)

Time = 0.40 (sec) , antiderivative size = 194, normalized size of antiderivative = 1.33 \[ \int \frac {\sqrt {-1+x^2} \sqrt {x^2+x \sqrt {-1+x^2}}}{1+x^2} \, dx=\frac {\sqrt {x} \sqrt {x+\sqrt {-1+x^2}} \left (2 \sqrt {x} \sqrt {x+\sqrt {-1+x^2}}-2 \sqrt {2 \left (1+\sqrt {2}\right )} \arctan \left (\sqrt {-1+\sqrt {2}} \sqrt {x} \sqrt {x+\sqrt {-1+x^2}}\right )-\sqrt {2} \text {arctanh}\left (\sqrt {2} \sqrt {x} \sqrt {x+\sqrt {-1+x^2}}\right )+2 \sqrt {2 \left (-1+\sqrt {2}\right )} \text {arctanh}\left (\sqrt {1+\sqrt {2}} \sqrt {x} \sqrt {x+\sqrt {-1+x^2}}\right )\right )}{2 \sqrt {x \left (x+\sqrt {-1+x^2}\right )}} \]

input
Integrate[(Sqrt[-1 + x^2]*Sqrt[x^2 + x*Sqrt[-1 + x^2]])/(1 + x^2),x]
 
output
(Sqrt[x]*Sqrt[x + Sqrt[-1 + x^2]]*(2*Sqrt[x]*Sqrt[x + Sqrt[-1 + x^2]] - 2* 
Sqrt[2*(1 + Sqrt[2])]*ArcTan[Sqrt[-1 + Sqrt[2]]*Sqrt[x]*Sqrt[x + Sqrt[-1 + 
 x^2]]] - Sqrt[2]*ArcTanh[Sqrt[2]*Sqrt[x]*Sqrt[x + Sqrt[-1 + x^2]]] + 2*Sq 
rt[2*(-1 + Sqrt[2])]*ArcTanh[Sqrt[1 + Sqrt[2]]*Sqrt[x]*Sqrt[x + Sqrt[-1 + 
x^2]]]))/(2*Sqrt[x*(x + Sqrt[-1 + x^2])])
 
3.21.45.3 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 {\sqrt {x^2-1} \sqrt {x^2+\sqrt {x^2-1} x}}{x^2+1} \, dx\)

\(\Big \downarrow \) 7276

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {1}{2} i \int \frac {\sqrt {x^2-1} \sqrt {x^2+\sqrt {x^2-1} x}}{i-x}dx+\frac {1}{2} i \int \frac {\sqrt {x^2-1} \sqrt {x^2+\sqrt {x^2-1} x}}{x+i}dx\)

input
Int[(Sqrt[-1 + x^2]*Sqrt[x^2 + x*Sqrt[-1 + x^2]])/(1 + x^2),x]
 
output
$Aborted
 

3.21.45.3.1 Defintions of rubi rules used

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

rule 7276
Int[(u_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> With[{v = RationalFunctionE 
xpand[u/(a + b*x^n), x]}, Int[v, x] /; SumQ[v]] /; FreeQ[{a, b}, x] && IGtQ 
[n, 0]
 
3.21.45.4 Maple [F]

\[\int \frac {\sqrt {x^{2}-1}\, \sqrt {x^{2}+x \sqrt {x^{2}-1}}}{x^{2}+1}d x\]

input
int((x^2-1)^(1/2)*(x^2+x*(x^2-1)^(1/2))^(1/2)/(x^2+1),x)
 
output
int((x^2-1)^(1/2)*(x^2+x*(x^2-1)^(1/2))^(1/2)/(x^2+1),x)
 
3.21.45.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 594 vs. \(2 (110) = 220\).

Time = 17.03 (sec) , antiderivative size = 594, normalized size of antiderivative = 4.07 \[ \int \frac {\sqrt {-1+x^2} \sqrt {x^2+x \sqrt {-1+x^2}}}{1+x^2} \, dx=\frac {1}{4} \, \sqrt {2} \log \left (4 \, x^{2} + 2 \, {\left (2 \, \sqrt {2} \sqrt {x^{2} - 1} x - \sqrt {2} {\left (2 \, x^{2} - 1\right )}\right )} \sqrt {x^{2} + \sqrt {x^{2} - 1} x} - 4 \, \sqrt {x^{2} - 1} x - 1\right ) + \frac {1}{4} \, \sqrt {-2 \, \sqrt {2} - 2} \log \left (-\frac {2 \, \sqrt {x^{2} - 1} {\left (31 \, \sqrt {2} x - 218 \, x\right )} \sqrt {-2 \, \sqrt {2} - 2} + 4 \, {\left (31 \, x^{2} - \sqrt {2} {\left (109 \, x^{2} + 78\right )} + \sqrt {x^{2} - 1} {\left (109 \, \sqrt {2} x - 31 \, x\right )} - 187\right )} \sqrt {x^{2} + \sqrt {x^{2} - 1} x} + {\left (280 \, x^{2} - \sqrt {2} {\left (249 \, x^{2} - 187\right )} + 156\right )} \sqrt {-2 \, \sqrt {2} - 2}}{x^{2} + 1}\right ) - \frac {1}{4} \, \sqrt {-2 \, \sqrt {2} - 2} \log \left (\frac {2 \, \sqrt {x^{2} - 1} {\left (31 \, \sqrt {2} x - 218 \, x\right )} \sqrt {-2 \, \sqrt {2} - 2} - 4 \, {\left (31 \, x^{2} - \sqrt {2} {\left (109 \, x^{2} + 78\right )} + \sqrt {x^{2} - 1} {\left (109 \, \sqrt {2} x - 31 \, x\right )} - 187\right )} \sqrt {x^{2} + \sqrt {x^{2} - 1} x} + {\left (280 \, x^{2} - \sqrt {2} {\left (249 \, x^{2} - 187\right )} + 156\right )} \sqrt {-2 \, \sqrt {2} - 2}}{x^{2} + 1}\right ) + \frac {1}{4} \, \sqrt {2 \, \sqrt {2} - 2} \log \left (-\frac {4 \, {\left (31 \, x^{2} + \sqrt {2} {\left (109 \, x^{2} + 78\right )} - \sqrt {x^{2} - 1} {\left (109 \, \sqrt {2} x + 31 \, x\right )} - 187\right )} \sqrt {x^{2} + \sqrt {x^{2} - 1} x} + {\left (280 \, x^{2} + \sqrt {2} {\left (249 \, x^{2} - 187\right )} - 2 \, \sqrt {x^{2} - 1} {\left (31 \, \sqrt {2} x + 218 \, x\right )} + 156\right )} \sqrt {2 \, \sqrt {2} - 2}}{x^{2} + 1}\right ) - \frac {1}{4} \, \sqrt {2 \, \sqrt {2} - 2} \log \left (-\frac {4 \, {\left (31 \, x^{2} + \sqrt {2} {\left (109 \, x^{2} + 78\right )} - \sqrt {x^{2} - 1} {\left (109 \, \sqrt {2} x + 31 \, x\right )} - 187\right )} \sqrt {x^{2} + \sqrt {x^{2} - 1} x} - {\left (280 \, x^{2} + \sqrt {2} {\left (249 \, x^{2} - 187\right )} - 2 \, \sqrt {x^{2} - 1} {\left (31 \, \sqrt {2} x + 218 \, x\right )} + 156\right )} \sqrt {2 \, \sqrt {2} - 2}}{x^{2} + 1}\right ) + \sqrt {x^{2} + \sqrt {x^{2} - 1} x} \]

input
integrate((x^2-1)^(1/2)*(x^2+x*(x^2-1)^(1/2))^(1/2)/(x^2+1),x, algorithm=" 
fricas")
 
output
1/4*sqrt(2)*log(4*x^2 + 2*(2*sqrt(2)*sqrt(x^2 - 1)*x - sqrt(2)*(2*x^2 - 1) 
)*sqrt(x^2 + sqrt(x^2 - 1)*x) - 4*sqrt(x^2 - 1)*x - 1) + 1/4*sqrt(-2*sqrt( 
2) - 2)*log(-(2*sqrt(x^2 - 1)*(31*sqrt(2)*x - 218*x)*sqrt(-2*sqrt(2) - 2) 
+ 4*(31*x^2 - sqrt(2)*(109*x^2 + 78) + sqrt(x^2 - 1)*(109*sqrt(2)*x - 31*x 
) - 187)*sqrt(x^2 + sqrt(x^2 - 1)*x) + (280*x^2 - sqrt(2)*(249*x^2 - 187) 
+ 156)*sqrt(-2*sqrt(2) - 2))/(x^2 + 1)) - 1/4*sqrt(-2*sqrt(2) - 2)*log((2* 
sqrt(x^2 - 1)*(31*sqrt(2)*x - 218*x)*sqrt(-2*sqrt(2) - 2) - 4*(31*x^2 - sq 
rt(2)*(109*x^2 + 78) + sqrt(x^2 - 1)*(109*sqrt(2)*x - 31*x) - 187)*sqrt(x^ 
2 + sqrt(x^2 - 1)*x) + (280*x^2 - sqrt(2)*(249*x^2 - 187) + 156)*sqrt(-2*s 
qrt(2) - 2))/(x^2 + 1)) + 1/4*sqrt(2*sqrt(2) - 2)*log(-(4*(31*x^2 + sqrt(2 
)*(109*x^2 + 78) - sqrt(x^2 - 1)*(109*sqrt(2)*x + 31*x) - 187)*sqrt(x^2 + 
sqrt(x^2 - 1)*x) + (280*x^2 + sqrt(2)*(249*x^2 - 187) - 2*sqrt(x^2 - 1)*(3 
1*sqrt(2)*x + 218*x) + 156)*sqrt(2*sqrt(2) - 2))/(x^2 + 1)) - 1/4*sqrt(2*s 
qrt(2) - 2)*log(-(4*(31*x^2 + sqrt(2)*(109*x^2 + 78) - sqrt(x^2 - 1)*(109* 
sqrt(2)*x + 31*x) - 187)*sqrt(x^2 + sqrt(x^2 - 1)*x) - (280*x^2 + sqrt(2)* 
(249*x^2 - 187) - 2*sqrt(x^2 - 1)*(31*sqrt(2)*x + 218*x) + 156)*sqrt(2*sqr 
t(2) - 2))/(x^2 + 1)) + sqrt(x^2 + sqrt(x^2 - 1)*x)
 
3.21.45.6 Sympy [F]

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

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

\[ \int \frac {\sqrt {-1+x^2} \sqrt {x^2+x \sqrt {-1+x^2}}}{1+x^2} \, dx=\int { \frac {\sqrt {x^{2} + \sqrt {x^{2} - 1} x} \sqrt {x^{2} - 1}}{x^{2} + 1} \,d x } \]

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

\[ \int \frac {\sqrt {-1+x^2} \sqrt {x^2+x \sqrt {-1+x^2}}}{1+x^2} \, dx=\int { \frac {\sqrt {x^{2} + \sqrt {x^{2} - 1} x} \sqrt {x^{2} - 1}}{x^{2} + 1} \,d x } \]

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

Timed out. \[ \int \frac {\sqrt {-1+x^2} \sqrt {x^2+x \sqrt {-1+x^2}}}{1+x^2} \, dx=\int \frac {\sqrt {x^2-1}\,\sqrt {x\,\sqrt {x^2-1}+x^2}}{x^2+1} \,d x \]

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