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

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

Optimal result

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

-2*(1+x)^(1/2)-(1+2^(1/2))^(1/2)*arctan(((2+2*2^(1/2))^(1/2)-2*(1+x)^(1/2) 
)/(-2+2*2^(1/2))^(1/2))+(1+2^(1/2))^(1/2)*arctan(((2+2*2^(1/2))^(1/2)+2*(1 
+x)^(1/2))/(-2+2*2^(1/2))^(1/2))+arctanh((2+2*2^(1/2))^(1/2)*(1+x)^(1/2)/( 
1+2^(1/2)+x))/(1+2^(1/2))^(1/2)
 

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.22 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.43 \[ \int \frac {(1-x) \sqrt {1+x}}{1+x^2} \, dx=-2 \sqrt {1+x}+\sqrt {2+2 i} \arctan \left (\sqrt {-\frac {1}{2}-\frac {i}{2}} \sqrt {1+x}\right )+\sqrt {2-2 i} \arctan \left (\sqrt {-\frac {1}{2}+\frac {i}{2}} \sqrt {1+x}\right ) \] Input:

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

Output:

-2*Sqrt[1 + x] + Sqrt[2 + 2*I]*ArcTan[Sqrt[-1/2 - I/2]*Sqrt[1 + x]] + Sqrt 
[2 - 2*I]*ArcTan[Sqrt[-1/2 + I/2]*Sqrt[1 + x]]
 

Rubi [A] (verified)

Time = 0.45 (sec) , antiderivative size = 236, normalized size of antiderivative = 1.52, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.450, Rules used = {653, 27, 484, 1407, 1142, 25, 1083, 217, 1103}

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 {(1-x) \sqrt {x+1}}{x^2+1} \, dx\)

\(\Big \downarrow \) 653

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 484

\(\displaystyle 4 \int \frac {1}{(x+1)^2-2 (x+1)+2}d\sqrt {x+1}-2 \sqrt {x+1}\)

\(\Big \downarrow \) 1407

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

\(\Big \downarrow \) 1142

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 1083

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

\(\Big \downarrow \) 217

\(\displaystyle 4 \left (\frac {\frac {1}{2} \int \frac {\sqrt {2 \left (1+\sqrt {2}\right )}-2 \sqrt {x+1}}{x-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+1}+\sqrt {2}+1}d\sqrt {x+1}+\sqrt {\frac {1+\sqrt {2}}{\sqrt {2}-1}} \arctan \left (\frac {2 \sqrt {x+1}-\sqrt {2 \left (1+\sqrt {2}\right )}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )}{4 \sqrt {1+\sqrt {2}}}+\frac {\frac {1}{2} \int \frac {2 \sqrt {x+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{x+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+1}+\sqrt {2}+1}d\sqrt {x+1}+\sqrt {\frac {1+\sqrt {2}}{\sqrt {2}-1}} \arctan \left (\frac {2 \sqrt {x+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )}{4 \sqrt {1+\sqrt {2}}}\right )-2 \sqrt {x+1}\)

\(\Big \downarrow \) 1103

\(\displaystyle 4 \left (\frac {\sqrt {\frac {1+\sqrt {2}}{\sqrt {2}-1}} \arctan \left (\frac {2 \sqrt {x+1}-\sqrt {2 \left (1+\sqrt {2}\right )}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )-\frac {1}{2} \log \left (x-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+1}+\sqrt {2}+1\right )}{4 \sqrt {1+\sqrt {2}}}+\frac {\sqrt {\frac {1+\sqrt {2}}{\sqrt {2}-1}} \arctan \left (\frac {2 \sqrt {x+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )+\frac {1}{2} \log \left (x+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+1}+\sqrt {2}+1\right )}{4 \sqrt {1+\sqrt {2}}}\right )-2 \sqrt {x+1}\)

Input:

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

Output:

-2*Sqrt[1 + x] + 4*((Sqrt[(1 + Sqrt[2])/(-1 + Sqrt[2])]*ArcTan[(-Sqrt[2*(1 
 + Sqrt[2])] + 2*Sqrt[1 + x])/Sqrt[2*(-1 + Sqrt[2])]] - Log[1 + Sqrt[2] + 
x - Sqrt[2*(1 + Sqrt[2])]*Sqrt[1 + x]]/2)/(4*Sqrt[1 + Sqrt[2]]) + (Sqrt[(1 
 + Sqrt[2])/(-1 + Sqrt[2])]*ArcTan[(Sqrt[2*(1 + Sqrt[2])] + 2*Sqrt[1 + x]) 
/Sqrt[2*(-1 + Sqrt[2])]] + Log[1 + Sqrt[2] + x + Sqrt[2*(1 + Sqrt[2])]*Sqr 
t[1 + x]]/2)/(4*Sqrt[1 + Sqrt[2]]))
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 217
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( 
-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & 
& (LtQ[a, 0] || LtQ[b, 0])
 

rule 484
Int[1/(Sqrt[(c_) + (d_.)*(x_)]*((a_) + (b_.)*(x_)^2)), x_Symbol] :> Simp[2* 
d   Subst[Int[1/(b*c^2 + a*d^2 - 2*b*c*x^2 + b*x^4), x], x, Sqrt[c + d*x]], 
 x] /; FreeQ[{a, b, c, d}, x]
 

rule 653
Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), 
 x_Symbol] :> Simp[g*((d + e*x)^m/(c*m)), x] + Simp[1/c   Int[(d + e*x)^(m 
- 1)*(Simp[c*d*f - a*e*g + (g*c*d + c*e*f)*x, x]/(a + c*x^2)), x], x] /; Fr 
eeQ[{a, c, d, e, f, g}, x] && FractionQ[m] && GtQ[m, 0]
 

rule 1083
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2   Subst[I 
nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, 
x]
 

rule 1103
Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S 
imp[d*(Log[RemoveContent[a + b*x + c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, 
e}, x] && EqQ[2*c*d - b*e, 0]
 

rule 1142
Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S 
imp[(2*c*d - b*e)/(2*c)   Int[1/(a + b*x + c*x^2), x], x] + Simp[e/(2*c) 
Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x]
 

rule 1407
Int[((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(-1), x_Symbol] :> With[{q = Rt[a/ 
c, 2]}, With[{r = Rt[2*q - b/c, 2]}, Simp[1/(2*c*q*r)   Int[(r - x)/(q - r* 
x + x^2), x], x] + Simp[1/(2*c*q*r)   Int[(r + x)/(q + r*x + x^2), x], x]]] 
 /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && NegQ[b^2 - 4*a*c]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(271\) vs. \(2(113)=226\).

Time = 2.25 (sec) , antiderivative size = 272, normalized size of antiderivative = 1.75

method result size
derivativedivides \(-2 \sqrt {x +1}+\frac {\left (\sqrt {2+2 \sqrt {2}}\, \sqrt {2}-2 \sqrt {2+2 \sqrt {2}}\right ) \ln \left (x +1-\sqrt {x +1}\, \sqrt {2+2 \sqrt {2}}+\sqrt {2}\right )}{4}+\frac {\left (2 \sqrt {2}+\frac {\left (\sqrt {2+2 \sqrt {2}}\, \sqrt {2}-2 \sqrt {2+2 \sqrt {2}}\right ) \sqrt {2+2 \sqrt {2}}}{2}\right ) \arctan \left (\frac {2 \sqrt {x +1}-\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right )}{\sqrt {-2+2 \sqrt {2}}}+\frac {\left (-\sqrt {2+2 \sqrt {2}}\, \sqrt {2}+2 \sqrt {2+2 \sqrt {2}}\right ) \ln \left (x +1+\sqrt {x +1}\, \sqrt {2+2 \sqrt {2}}+\sqrt {2}\right )}{4}+\frac {\left (2 \sqrt {2}-\frac {\left (-\sqrt {2+2 \sqrt {2}}\, \sqrt {2}+2 \sqrt {2+2 \sqrt {2}}\right ) \sqrt {2+2 \sqrt {2}}}{2}\right ) \arctan \left (\frac {\sqrt {2+2 \sqrt {2}}+2 \sqrt {x +1}}{\sqrt {-2+2 \sqrt {2}}}\right )}{\sqrt {-2+2 \sqrt {2}}}\) \(272\)
default \(-2 \sqrt {x +1}+\frac {\left (\sqrt {2+2 \sqrt {2}}\, \sqrt {2}-2 \sqrt {2+2 \sqrt {2}}\right ) \ln \left (x +1-\sqrt {x +1}\, \sqrt {2+2 \sqrt {2}}+\sqrt {2}\right )}{4}+\frac {\left (2 \sqrt {2}+\frac {\left (\sqrt {2+2 \sqrt {2}}\, \sqrt {2}-2 \sqrt {2+2 \sqrt {2}}\right ) \sqrt {2+2 \sqrt {2}}}{2}\right ) \arctan \left (\frac {2 \sqrt {x +1}-\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right )}{\sqrt {-2+2 \sqrt {2}}}+\frac {\left (-\sqrt {2+2 \sqrt {2}}\, \sqrt {2}+2 \sqrt {2+2 \sqrt {2}}\right ) \ln \left (x +1+\sqrt {x +1}\, \sqrt {2+2 \sqrt {2}}+\sqrt {2}\right )}{4}+\frac {\left (2 \sqrt {2}-\frac {\left (-\sqrt {2+2 \sqrt {2}}\, \sqrt {2}+2 \sqrt {2+2 \sqrt {2}}\right ) \sqrt {2+2 \sqrt {2}}}{2}\right ) \arctan \left (\frac {\sqrt {2+2 \sqrt {2}}+2 \sqrt {x +1}}{\sqrt {-2+2 \sqrt {2}}}\right )}{\sqrt {-2+2 \sqrt {2}}}\) \(272\)
trager \(-2 \sqrt {x +1}-\operatorname {RootOf}\left (\textit {\_Z}^{2}+16 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{2}+1\right ) \ln \left (\frac {1024 \operatorname {RootOf}\left (\textit {\_Z}^{2}+16 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{2}+1\right ) \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{4} x +192 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{2} \operatorname {RootOf}\left (\textit {\_Z}^{2}+16 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{2}+1\right ) x +160 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{2} \operatorname {RootOf}\left (\textit {\_Z}^{2}+16 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{2}+1\right )+192 \sqrt {x +1}\, \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{2}+9 \operatorname {RootOf}\left (\textit {\_Z}^{2}+16 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{2}+1\right ) x +15 \operatorname {RootOf}\left (\textit {\_Z}^{2}+16 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{2}+1\right )-2 \sqrt {x +1}}{32 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{2} x +x -1}\right )+4 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right ) \ln \left (-\frac {2048 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{5} x -128 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{3} x +96 \sqrt {x +1}\, \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{2}-320 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{3}+2 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right ) x +7 \sqrt {x +1}+10 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )}{32 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{2} x +x +1}\right )\) \(417\)
risch \(-2 \sqrt {x +1}-\frac {\ln \left (x +1+\sqrt {x +1}\, \sqrt {2+2 \sqrt {2}}+\sqrt {2}\right ) \sqrt {2+2 \sqrt {2}}\, \sqrt {2}}{4}+\frac {\ln \left (x +1+\sqrt {x +1}\, \sqrt {2+2 \sqrt {2}}+\sqrt {2}\right ) \sqrt {2+2 \sqrt {2}}}{2}+\frac {\arctan \left (\frac {\sqrt {2+2 \sqrt {2}}+2 \sqrt {x +1}}{\sqrt {-2+2 \sqrt {2}}}\right ) \left (2+2 \sqrt {2}\right ) \sqrt {2}}{2 \sqrt {-2+2 \sqrt {2}}}-\frac {\arctan \left (\frac {\sqrt {2+2 \sqrt {2}}+2 \sqrt {x +1}}{\sqrt {-2+2 \sqrt {2}}}\right ) \left (2+2 \sqrt {2}\right )}{\sqrt {-2+2 \sqrt {2}}}+\frac {2 \arctan \left (\frac {\sqrt {2+2 \sqrt {2}}+2 \sqrt {x +1}}{\sqrt {-2+2 \sqrt {2}}}\right ) \sqrt {2}}{\sqrt {-2+2 \sqrt {2}}}+\frac {\ln \left (x +1-\sqrt {x +1}\, \sqrt {2+2 \sqrt {2}}+\sqrt {2}\right ) \sqrt {2+2 \sqrt {2}}\, \sqrt {2}}{4}-\frac {\ln \left (x +1-\sqrt {x +1}\, \sqrt {2+2 \sqrt {2}}+\sqrt {2}\right ) \sqrt {2+2 \sqrt {2}}}{2}+\frac {\arctan \left (\frac {2 \sqrt {x +1}-\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right ) \left (2+2 \sqrt {2}\right ) \sqrt {2}}{2 \sqrt {-2+2 \sqrt {2}}}-\frac {\arctan \left (\frac {2 \sqrt {x +1}-\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right ) \left (2+2 \sqrt {2}\right )}{\sqrt {-2+2 \sqrt {2}}}+\frac {2 \arctan \left (\frac {2 \sqrt {x +1}-\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right ) \sqrt {2}}{\sqrt {-2+2 \sqrt {2}}}\) \(429\)

Input:

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

Output:

-2*(x+1)^(1/2)+1/4*((2+2*2^(1/2))^(1/2)*2^(1/2)-2*(2+2*2^(1/2))^(1/2))*ln( 
x+1-(x+1)^(1/2)*(2+2*2^(1/2))^(1/2)+2^(1/2))+(2*2^(1/2)+1/2*((2+2*2^(1/2)) 
^(1/2)*2^(1/2)-2*(2+2*2^(1/2))^(1/2))*(2+2*2^(1/2))^(1/2))/(-2+2*2^(1/2))^ 
(1/2)*arctan((2*(x+1)^(1/2)-(2+2*2^(1/2))^(1/2))/(-2+2*2^(1/2))^(1/2))+1/4 
*(-(2+2*2^(1/2))^(1/2)*2^(1/2)+2*(2+2*2^(1/2))^(1/2))*ln(x+1+(x+1)^(1/2)*( 
2+2*2^(1/2))^(1/2)+2^(1/2))+(2*2^(1/2)-1/2*(-(2+2*2^(1/2))^(1/2)*2^(1/2)+2 
*(2+2*2^(1/2))^(1/2))*(2+2*2^(1/2))^(1/2))/(-2+2*2^(1/2))^(1/2)*arctan(((2 
+2*2^(1/2))^(1/2)+2*(x+1)^(1/2))/(-2+2*2^(1/2))^(1/2))
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.03 \[ \int \frac {(1-x) \sqrt {1+x}}{1+x^2} \, dx=\sqrt {\sqrt {2} + 1} \arctan \left ({\left ({\left (\sqrt {2} + 1\right )} \sqrt {\sqrt {2} - 1} + \sqrt {2} \sqrt {x + 1}\right )} \sqrt {\sqrt {2} + 1}\right ) - \sqrt {\sqrt {2} + 1} \arctan \left ({\left ({\left (\sqrt {2} + 1\right )} \sqrt {\sqrt {2} - 1} - \sqrt {2} \sqrt {x + 1}\right )} \sqrt {\sqrt {2} + 1}\right ) + \frac {1}{2} \, \sqrt {\sqrt {2} - 1} \log \left (\sqrt {x + 1} {\left (\sqrt {2} + 2\right )} \sqrt {\sqrt {2} - 1} + x + \sqrt {2} + 1\right ) - \frac {1}{2} \, \sqrt {\sqrt {2} - 1} \log \left (-\sqrt {x + 1} {\left (\sqrt {2} + 2\right )} \sqrt {\sqrt {2} - 1} + x + \sqrt {2} + 1\right ) - 2 \, \sqrt {x + 1} \] Input:

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

Output:

sqrt(sqrt(2) + 1)*arctan(((sqrt(2) + 1)*sqrt(sqrt(2) - 1) + sqrt(2)*sqrt(x 
 + 1))*sqrt(sqrt(2) + 1)) - sqrt(sqrt(2) + 1)*arctan(((sqrt(2) + 1)*sqrt(s 
qrt(2) - 1) - sqrt(2)*sqrt(x + 1))*sqrt(sqrt(2) + 1)) + 1/2*sqrt(sqrt(2) - 
 1)*log(sqrt(x + 1)*(sqrt(2) + 2)*sqrt(sqrt(2) - 1) + x + sqrt(2) + 1) - 1 
/2*sqrt(sqrt(2) - 1)*log(-sqrt(x + 1)*(sqrt(2) + 2)*sqrt(sqrt(2) - 1) + x 
+ sqrt(2) + 1) - 2*sqrt(x + 1)
 

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [A] (verification not implemented)

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

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

Output:

sqrt(sqrt(2) + 1)*arctan(1/2*2^(3/4)*(2^(1/4)*sqrt(sqrt(2) + 2) + 2*sqrt(x 
 + 1))/sqrt(-sqrt(2) + 2)) + sqrt(sqrt(2) + 1)*arctan(-1/2*2^(3/4)*(2^(1/4 
)*sqrt(sqrt(2) + 2) - 2*sqrt(x + 1))/sqrt(-sqrt(2) + 2)) + 1/2*sqrt(sqrt(2 
) - 1)*log(2^(1/4)*sqrt(x + 1)*sqrt(sqrt(2) + 2) + x + sqrt(2) + 1) - 1/2* 
sqrt(sqrt(2) - 1)*log(-2^(1/4)*sqrt(x + 1)*sqrt(sqrt(2) + 2) + x + sqrt(2) 
 + 1) - 2*sqrt(x + 1)
 

Mupad [B] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 233, normalized size of antiderivative = 1.50 \[ \int \frac {(1-x) \sqrt {1+x}}{1+x^2} \, dx=\mathrm {atanh}\left (\frac {64\,\sqrt {2}\,\sqrt {-\frac {\sqrt {2}}{4}-\frac {1}{4}}\,\sqrt {x+1}}{256\,\sqrt {\frac {\sqrt {2}}{4}-\frac {1}{4}}\,\sqrt {-\frac {\sqrt {2}}{4}-\frac {1}{4}}-64}-\frac {64\,\sqrt {2}\,\sqrt {\frac {\sqrt {2}}{4}-\frac {1}{4}}\,\sqrt {x+1}}{256\,\sqrt {\frac {\sqrt {2}}{4}-\frac {1}{4}}\,\sqrt {-\frac {\sqrt {2}}{4}-\frac {1}{4}}-64}\right )\,\left (2\,\sqrt {-\frac {\sqrt {2}}{4}-\frac {1}{4}}+2\,\sqrt {\frac {\sqrt {2}}{4}-\frac {1}{4}}\right )-2\,\sqrt {x+1}-\mathrm {atanh}\left (\frac {64\,\sqrt {2}\,\sqrt {-\frac {\sqrt {2}}{4}-\frac {1}{4}}\,\sqrt {x+1}}{256\,\sqrt {\frac {\sqrt {2}}{4}-\frac {1}{4}}\,\sqrt {-\frac {\sqrt {2}}{4}-\frac {1}{4}}+64}+\frac {64\,\sqrt {2}\,\sqrt {\frac {\sqrt {2}}{4}-\frac {1}{4}}\,\sqrt {x+1}}{256\,\sqrt {\frac {\sqrt {2}}{4}-\frac {1}{4}}\,\sqrt {-\frac {\sqrt {2}}{4}-\frac {1}{4}}+64}\right )\,\left (2\,\sqrt {-\frac {\sqrt {2}}{4}-\frac {1}{4}}-2\,\sqrt {\frac {\sqrt {2}}{4}-\frac {1}{4}}\right ) \] Input:

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

Output:

atanh((64*2^(1/2)*(- 2^(1/2)/4 - 1/4)^(1/2)*(x + 1)^(1/2))/(256*(2^(1/2)/4 
 - 1/4)^(1/2)*(- 2^(1/2)/4 - 1/4)^(1/2) - 64) - (64*2^(1/2)*(2^(1/2)/4 - 1 
/4)^(1/2)*(x + 1)^(1/2))/(256*(2^(1/2)/4 - 1/4)^(1/2)*(- 2^(1/2)/4 - 1/4)^ 
(1/2) - 64))*(2*(- 2^(1/2)/4 - 1/4)^(1/2) + 2*(2^(1/2)/4 - 1/4)^(1/2)) - 2 
*(x + 1)^(1/2) - atanh((64*2^(1/2)*(- 2^(1/2)/4 - 1/4)^(1/2)*(x + 1)^(1/2) 
)/(256*(2^(1/2)/4 - 1/4)^(1/2)*(- 2^(1/2)/4 - 1/4)^(1/2) + 64) + (64*2^(1/ 
2)*(2^(1/2)/4 - 1/4)^(1/2)*(x + 1)^(1/2))/(256*(2^(1/2)/4 - 1/4)^(1/2)*(- 
2^(1/2)/4 - 1/4)^(1/2) + 64))*(2*(- 2^(1/2)/4 - 1/4)^(1/2) - 2*(2^(1/2)/4 
- 1/4)^(1/2))
 

Reduce [B] (verification not implemented)

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

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

Output:

( - 2*sqrt(sqrt(2) - 1)*sqrt(2)*atan((sqrt(sqrt(2) + 1)*sqrt(2) - 2*sqrt(x 
 + 1))/(sqrt(sqrt(2) - 1)*sqrt(2))) - 2*sqrt(sqrt(2) - 1)*atan((sqrt(sqrt( 
2) + 1)*sqrt(2) - 2*sqrt(x + 1))/(sqrt(sqrt(2) - 1)*sqrt(2))) + 2*sqrt(sqr 
t(2) - 1)*sqrt(2)*atan((sqrt(sqrt(2) + 1)*sqrt(2) + 2*sqrt(x + 1))/(sqrt(s 
qrt(2) - 1)*sqrt(2))) + 2*sqrt(sqrt(2) - 1)*atan((sqrt(sqrt(2) + 1)*sqrt(2 
) + 2*sqrt(x + 1))/(sqrt(sqrt(2) - 1)*sqrt(2))) - sqrt(sqrt(2) + 1)*sqrt(2 
)*log( - sqrt(x + 1)*sqrt(sqrt(2) + 1)*sqrt(2) + sqrt(2) + x + 1) + sqrt(s 
qrt(2) + 1)*sqrt(2)*log(sqrt(x + 1)*sqrt(sqrt(2) + 1)*sqrt(2) + sqrt(2) + 
x + 1) + sqrt(sqrt(2) + 1)*log( - sqrt(x + 1)*sqrt(sqrt(2) + 1)*sqrt(2) + 
sqrt(2) + x + 1) - sqrt(sqrt(2) + 1)*log(sqrt(x + 1)*sqrt(sqrt(2) + 1)*sqr 
t(2) + sqrt(2) + x + 1) - 4*sqrt(x + 1))/2