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

3.20.34.1 Optimal result
3.20.34.2 Mathematica [A] (verified)
3.20.34.3 Rubi [F]
3.20.34.4 Maple [F]
3.20.34.5 Fricas [B] (verification not implemented)
3.20.34.6 Sympy [F]
3.20.34.7 Maxima [F]
3.20.34.8 Giac [F]
3.20.34.9 Mupad [F(-1)]

3.20.34.1 Optimal result

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

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

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

input
Integrate[((1 + x^2)*Sqrt[1 + Sqrt[1 + x^2]])/(-1 + x^2),x]
 
output
(2*x*(2 + Sqrt[1 + x^2]))/(3*Sqrt[1 + Sqrt[1 + x^2]]) + 2*Sqrt[-1 + Sqrt[2 
]]*ArcTan[x/(Sqrt[1 + Sqrt[2]]*Sqrt[1 + Sqrt[1 + x^2]])] - 2*Sqrt[1 + Sqrt 
[2]]*ArcTanh[(Sqrt[1 + Sqrt[2]]*x)/Sqrt[1 + Sqrt[1 + x^2]]]
 
3.20.34.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 {\left (x^2+1\right ) \sqrt {\sqrt {x^2+1}+1}}{x^2-1} \, dx\)

\(\Big \downarrow \) 7276

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

\(\Big \downarrow \) 2009

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

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

3.20.34.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.20.34.4 Maple [F]

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

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

Leaf count of result is larger than twice the leaf count of optimal. 536 vs. \(2 (96) = 192\).

Time = 2.61 (sec) , antiderivative size = 536, normalized size of antiderivative = 4.00 \[ \int \frac {\left (1+x^2\right ) \sqrt {1+\sqrt {1+x^2}}}{-1+x^2} \, dx=\frac {3 \, x \sqrt {-4 \, \sqrt {2} + 4} \log \left (-\frac {2 \, \sqrt {x^{2} + 1} {\left (132 \, \sqrt {2} x + 193 \, x\right )} \sqrt {-4 \, \sqrt {2} + 4} - {\left (71 \, x^{3} + \sqrt {2} {\left (61 \, x^{3} + 325 \, x\right )} + 457 \, x\right )} \sqrt {-4 \, \sqrt {2} + 4} + 4 \, {\left (71 \, x^{2} + \sqrt {2} {\left (61 \, x^{2} + 132\right )} - \sqrt {x^{2} + 1} {\left (132 \, \sqrt {2} + 193\right )} + 193\right )} \sqrt {\sqrt {x^{2} + 1} + 1}}{x^{3} - x}\right ) - 3 \, x \sqrt {-4 \, \sqrt {2} + 4} \log \left (\frac {2 \, \sqrt {x^{2} + 1} {\left (132 \, \sqrt {2} x + 193 \, x\right )} \sqrt {-4 \, \sqrt {2} + 4} - {\left (71 \, x^{3} + \sqrt {2} {\left (61 \, x^{3} + 325 \, x\right )} + 457 \, x\right )} \sqrt {-4 \, \sqrt {2} + 4} - 4 \, {\left (71 \, x^{2} + \sqrt {2} {\left (61 \, x^{2} + 132\right )} - \sqrt {x^{2} + 1} {\left (132 \, \sqrt {2} + 193\right )} + 193\right )} \sqrt {\sqrt {x^{2} + 1} + 1}}{x^{3} - x}\right ) - 6 \, x \sqrt {\sqrt {2} + 1} \log \left (-\frac {2 \, {\left ({\left (71 \, x^{3} - \sqrt {2} {\left (61 \, x^{3} + 325 \, x\right )} + 2 \, \sqrt {x^{2} + 1} {\left (132 \, \sqrt {2} x - 193 \, x\right )} + 457 \, x\right )} \sqrt {\sqrt {2} + 1} + 2 \, {\left (71 \, x^{2} - \sqrt {2} {\left (61 \, x^{2} + 132\right )} + \sqrt {x^{2} + 1} {\left (132 \, \sqrt {2} - 193\right )} + 193\right )} \sqrt {\sqrt {x^{2} + 1} + 1}\right )}}{x^{3} - x}\right ) + 6 \, x \sqrt {\sqrt {2} + 1} \log \left (\frac {2 \, {\left ({\left (71 \, x^{3} - \sqrt {2} {\left (61 \, x^{3} + 325 \, x\right )} + 2 \, \sqrt {x^{2} + 1} {\left (132 \, \sqrt {2} x - 193 \, x\right )} + 457 \, x\right )} \sqrt {\sqrt {2} + 1} - 2 \, {\left (71 \, x^{2} - \sqrt {2} {\left (61 \, x^{2} + 132\right )} + \sqrt {x^{2} + 1} {\left (132 \, \sqrt {2} - 193\right )} + 193\right )} \sqrt {\sqrt {x^{2} + 1} + 1}\right )}}{x^{3} - x}\right ) + 8 \, {\left (x^{2} + \sqrt {x^{2} + 1} - 1\right )} \sqrt {\sqrt {x^{2} + 1} + 1}}{12 \, x} \]

input
integrate((x^2+1)*(1+(x^2+1)^(1/2))^(1/2)/(x^2-1),x, algorithm="fricas")
 
output
1/12*(3*x*sqrt(-4*sqrt(2) + 4)*log(-(2*sqrt(x^2 + 1)*(132*sqrt(2)*x + 193* 
x)*sqrt(-4*sqrt(2) + 4) - (71*x^3 + sqrt(2)*(61*x^3 + 325*x) + 457*x)*sqrt 
(-4*sqrt(2) + 4) + 4*(71*x^2 + sqrt(2)*(61*x^2 + 132) - sqrt(x^2 + 1)*(132 
*sqrt(2) + 193) + 193)*sqrt(sqrt(x^2 + 1) + 1))/(x^3 - x)) - 3*x*sqrt(-4*s 
qrt(2) + 4)*log((2*sqrt(x^2 + 1)*(132*sqrt(2)*x + 193*x)*sqrt(-4*sqrt(2) + 
 4) - (71*x^3 + sqrt(2)*(61*x^3 + 325*x) + 457*x)*sqrt(-4*sqrt(2) + 4) - 4 
*(71*x^2 + sqrt(2)*(61*x^2 + 132) - sqrt(x^2 + 1)*(132*sqrt(2) + 193) + 19 
3)*sqrt(sqrt(x^2 + 1) + 1))/(x^3 - x)) - 6*x*sqrt(sqrt(2) + 1)*log(-2*((71 
*x^3 - sqrt(2)*(61*x^3 + 325*x) + 2*sqrt(x^2 + 1)*(132*sqrt(2)*x - 193*x) 
+ 457*x)*sqrt(sqrt(2) + 1) + 2*(71*x^2 - sqrt(2)*(61*x^2 + 132) + sqrt(x^2 
 + 1)*(132*sqrt(2) - 193) + 193)*sqrt(sqrt(x^2 + 1) + 1))/(x^3 - x)) + 6*x 
*sqrt(sqrt(2) + 1)*log(2*((71*x^3 - sqrt(2)*(61*x^3 + 325*x) + 2*sqrt(x^2 
+ 1)*(132*sqrt(2)*x - 193*x) + 457*x)*sqrt(sqrt(2) + 1) - 2*(71*x^2 - sqrt 
(2)*(61*x^2 + 132) + sqrt(x^2 + 1)*(132*sqrt(2) - 193) + 193)*sqrt(sqrt(x^ 
2 + 1) + 1))/(x^3 - x)) + 8*(x^2 + sqrt(x^2 + 1) - 1)*sqrt(sqrt(x^2 + 1) + 
 1))/x
 
3.20.34.6 Sympy [F]

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

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

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

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

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

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

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

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