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

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

Optimal result

Integrand size = 24, antiderivative size = 131 \[ \int \frac {-1+x}{(1+x) \sqrt {x+\sqrt {1+x^2}}} \, dx=\frac {2 (-6+3 x) \sqrt {1+x^2}+2 \left (1-6 x+3 x^2\right )}{3 \left (x+\sqrt {1+x^2}\right )^{3/2}}-4 \sqrt {-1+\sqrt {2}} \arctan \left (\frac {\sqrt {x+\sqrt {1+x^2}}}{\sqrt {1+\sqrt {2}}}\right )+4 \sqrt {1+\sqrt {2}} \text {arctanh}\left (\frac {\sqrt {x+\sqrt {1+x^2}}}{\sqrt {-1+\sqrt {2}}}\right ) \] Output:

1/3*(2*(-6+3*x)*(x^2+1)^(1/2)+6*x^2-12*x+2)/(x+(x^2+1)^(1/2))^(3/2)-4*(2^( 
1/2)-1)^(1/2)*arctan((x+(x^2+1)^(1/2))^(1/2)/(1+2^(1/2))^(1/2))+4*(1+2^(1/ 
2))^(1/2)*arctanh((x+(x^2+1)^(1/2))^(1/2)/(2^(1/2)-1)^(1/2))
                                                                                    
                                                                                    
 

Mathematica [A] (verified)

Time = 0.22 (sec) , antiderivative size = 126, normalized size of antiderivative = 0.96 \[ \int \frac {-1+x}{(1+x) \sqrt {x+\sqrt {1+x^2}}} \, dx=\frac {2-12 x+6 x^2+6 (-2+x) \sqrt {1+x^2}}{3 \left (x+\sqrt {1+x^2}\right )^{3/2}}-4 \sqrt {-1+\sqrt {2}} \arctan \left (\sqrt {-1+\sqrt {2}} \sqrt {x+\sqrt {1+x^2}}\right )+4 \sqrt {1+\sqrt {2}} \text {arctanh}\left (\sqrt {1+\sqrt {2}} \sqrt {x+\sqrt {1+x^2}}\right ) \] Input:

Integrate[(-1 + x)/((1 + x)*Sqrt[x + Sqrt[1 + x^2]]),x]
 

Output:

(2 - 12*x + 6*x^2 + 6*(-2 + x)*Sqrt[1 + x^2])/(3*(x + Sqrt[1 + x^2])^(3/2) 
) - 4*Sqrt[-1 + Sqrt[2]]*ArcTan[Sqrt[-1 + Sqrt[2]]*Sqrt[x + Sqrt[1 + x^2]] 
] + 4*Sqrt[1 + Sqrt[2]]*ArcTanh[Sqrt[1 + Sqrt[2]]*Sqrt[x + Sqrt[1 + x^2]]]
 

Rubi [A] (verified)

Time = 0.57 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.02, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {7293, 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 {x-1}{(x+1) \sqrt {\sqrt {x^2+1}+x}} \, dx\)

\(\Big \downarrow \) 7293

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

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {4 \arctan \left (\sqrt {\sqrt {2}-1} \sqrt {\sqrt {x^2+1}+x}\right )}{\sqrt {1+\sqrt {2}}}+\frac {4 \text {arctanh}\left (\sqrt {1+\sqrt {2}} \sqrt {\sqrt {x^2+1}+x}\right )}{\sqrt {\sqrt {2}-1}}+\sqrt {\sqrt {x^2+1}+x}-\frac {4}{\sqrt {\sqrt {x^2+1}+x}}-\frac {1}{3 \left (\sqrt {x^2+1}+x\right )^{3/2}}\)

Input:

Int[(-1 + x)/((1 + x)*Sqrt[x + Sqrt[1 + x^2]]),x]
 

Output:

-1/3*1/(x + Sqrt[1 + x^2])^(3/2) - 4/Sqrt[x + Sqrt[1 + x^2]] + Sqrt[x + Sq 
rt[1 + x^2]] - (4*ArcTan[Sqrt[-1 + Sqrt[2]]*Sqrt[x + Sqrt[1 + x^2]]])/Sqrt 
[1 + Sqrt[2]] + (4*ArcTanh[Sqrt[1 + Sqrt[2]]*Sqrt[x + Sqrt[1 + x^2]]])/Sqr 
t[-1 + Sqrt[2]]
 

Defintions of rubi rules used

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

rule 7293
Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v] 
]
 
Maple [F]

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

Input:

int((-1+x)/(1+x)/(x+(x^2+1)^(1/2))^(1/2),x)
 

Output:

int((-1+x)/(1+x)/(x+(x^2+1)^(1/2))^(1/2),x)
 

Fricas [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 139, normalized size of antiderivative = 1.06 \[ \int \frac {-1+x}{(1+x) \sqrt {x+\sqrt {1+x^2}}} \, dx=-\frac {2}{3} \, {\left (x^{2} - \sqrt {x^{2} + 1} {\left (x - 6\right )} - 6 \, x - 1\right )} \sqrt {x + \sqrt {x^{2} + 1}} - 4 \, \sqrt {\sqrt {2} - 1} \arctan \left (\sqrt {x + \sqrt {x^{2} + 1}} \sqrt {\sqrt {2} - 1}\right ) + 2 \, \sqrt {\sqrt {2} + 1} \log \left (2 \, \sqrt {\sqrt {2} + 1} {\left (\sqrt {2} - 1\right )} + 2 \, \sqrt {x + \sqrt {x^{2} + 1}}\right ) - 2 \, \sqrt {\sqrt {2} + 1} \log \left (-2 \, \sqrt {\sqrt {2} + 1} {\left (\sqrt {2} - 1\right )} + 2 \, \sqrt {x + \sqrt {x^{2} + 1}}\right ) \] Input:

integrate((-1+x)/(1+x)/(x+(x^2+1)^(1/2))^(1/2),x, algorithm="fricas")
 

Output:

-2/3*(x^2 - sqrt(x^2 + 1)*(x - 6) - 6*x - 1)*sqrt(x + sqrt(x^2 + 1)) - 4*s 
qrt(sqrt(2) - 1)*arctan(sqrt(x + sqrt(x^2 + 1))*sqrt(sqrt(2) - 1)) + 2*sqr 
t(sqrt(2) + 1)*log(2*sqrt(sqrt(2) + 1)*(sqrt(2) - 1) + 2*sqrt(x + sqrt(x^2 
 + 1))) - 2*sqrt(sqrt(2) + 1)*log(-2*sqrt(sqrt(2) + 1)*(sqrt(2) - 1) + 2*s 
qrt(x + sqrt(x^2 + 1)))
 

Sympy [F]

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

integrate((-1+x)/(1+x)/(x+(x**2+1)**(1/2))**(1/2),x)
 

Output:

Integral((x - 1)/((x + 1)*sqrt(x + sqrt(x**2 + 1))), x)
 

Maxima [F]

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

integrate((-1+x)/(1+x)/(x+(x^2+1)^(1/2))^(1/2),x, algorithm="maxima")
 

Output:

integrate((x - 1)/(sqrt(x + sqrt(x^2 + 1))*(x + 1)), x)
 

Giac [F]

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

integrate((-1+x)/(1+x)/(x+(x^2+1)^(1/2))^(1/2),x, algorithm="giac")
 

Output:

integrate((x - 1)/(sqrt(x + sqrt(x^2 + 1))*(x + 1)), x)
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 339, normalized size of antiderivative = 2.59 \[ \int \frac {-1+x}{(1+x) \sqrt {x+\sqrt {1+x^2}}} \, dx=2 \sqrt {\sqrt {2}+1}\, \sqrt {2}\, \mathit {atan} \left (\frac {\sqrt {\sqrt {2}+1}\, \sqrt {\sqrt {x^{2}+1}+x}\, \sqrt {x^{2}+1}}{2}-\frac {\sqrt {\sqrt {2}+1}\, \sqrt {\sqrt {x^{2}+1}+x}\, \sqrt {2}}{2}-\frac {\sqrt {\sqrt {2}+1}\, \sqrt {\sqrt {x^{2}+1}+x}\, x}{2}+\frac {\sqrt {\sqrt {2}+1}\, \sqrt {\sqrt {x^{2}+1}+x}}{2}\right )-2 \sqrt {\sqrt {2}+1}\, \mathit {atan} \left (\frac {\sqrt {\sqrt {2}+1}\, \sqrt {\sqrt {x^{2}+1}+x}\, \sqrt {x^{2}+1}}{2}-\frac {\sqrt {\sqrt {2}+1}\, \sqrt {\sqrt {x^{2}+1}+x}\, \sqrt {2}}{2}-\frac {\sqrt {\sqrt {2}+1}\, \sqrt {\sqrt {x^{2}+1}+x}\, x}{2}+\frac {\sqrt {\sqrt {2}+1}\, \sqrt {\sqrt {x^{2}+1}+x}}{2}\right )+\frac {2 \sqrt {\sqrt {x^{2}+1}+x}\, \sqrt {x^{2}+1}\, x}{3}-4 \sqrt {\sqrt {x^{2}+1}+x}\, \sqrt {x^{2}+1}-\frac {2 \sqrt {\sqrt {x^{2}+1}+x}\, x^{2}}{3}+4 \sqrt {\sqrt {x^{2}+1}+x}\, x +\frac {2 \sqrt {\sqrt {x^{2}+1}+x}}{3}-2 \sqrt {\sqrt {2}-1}\, \sqrt {2}\, \mathrm {log}\left (\sqrt {\sqrt {x^{2}+1}+x}-\sqrt {\sqrt {2}-1}\right )+2 \sqrt {\sqrt {2}-1}\, \sqrt {2}\, \mathrm {log}\left (\sqrt {\sqrt {x^{2}+1}+x}+\sqrt {\sqrt {2}-1}\right )-2 \sqrt {\sqrt {2}-1}\, \mathrm {log}\left (\sqrt {\sqrt {x^{2}+1}+x}-\sqrt {\sqrt {2}-1}\right )+2 \sqrt {\sqrt {2}-1}\, \mathrm {log}\left (\sqrt {\sqrt {x^{2}+1}+x}+\sqrt {\sqrt {2}-1}\right ) \] Input:

int((-1+x)/(1+x)/(x+(x^2+1)^(1/2))^(1/2),x)
 

Output:

(2*(3*sqrt(sqrt(2) + 1)*sqrt(2)*atan((sqrt(sqrt(2) + 1)*sqrt(sqrt(x**2 + 1 
) + x)*sqrt(x**2 + 1) - sqrt(sqrt(2) + 1)*sqrt(sqrt(x**2 + 1) + x)*sqrt(2) 
 - sqrt(sqrt(2) + 1)*sqrt(sqrt(x**2 + 1) + x)*x + sqrt(sqrt(2) + 1)*sqrt(s 
qrt(x**2 + 1) + x))/2) - 3*sqrt(sqrt(2) + 1)*atan((sqrt(sqrt(2) + 1)*sqrt( 
sqrt(x**2 + 1) + x)*sqrt(x**2 + 1) - sqrt(sqrt(2) + 1)*sqrt(sqrt(x**2 + 1) 
 + x)*sqrt(2) - sqrt(sqrt(2) + 1)*sqrt(sqrt(x**2 + 1) + x)*x + sqrt(sqrt(2 
) + 1)*sqrt(sqrt(x**2 + 1) + x))/2) + sqrt(sqrt(x**2 + 1) + x)*sqrt(x**2 + 
 1)*x - 6*sqrt(sqrt(x**2 + 1) + x)*sqrt(x**2 + 1) - sqrt(sqrt(x**2 + 1) + 
x)*x**2 + 6*sqrt(sqrt(x**2 + 1) + x)*x + sqrt(sqrt(x**2 + 1) + x) - 3*sqrt 
(sqrt(2) - 1)*sqrt(2)*log(sqrt(sqrt(x**2 + 1) + x) - sqrt(sqrt(2) - 1)) + 
3*sqrt(sqrt(2) - 1)*sqrt(2)*log(sqrt(sqrt(x**2 + 1) + x) + sqrt(sqrt(2) - 
1)) - 3*sqrt(sqrt(2) - 1)*log(sqrt(sqrt(x**2 + 1) + x) - sqrt(sqrt(2) - 1) 
) + 3*sqrt(sqrt(2) - 1)*log(sqrt(sqrt(x**2 + 1) + x) + sqrt(sqrt(2) - 1))) 
)/3