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

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

Optimal result

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

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

Mathematica [A] (verified)

Time = 0.61 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.06 \[ \int -\frac {x+2 \sqrt {1+x^2}}{x+x^3+\sqrt {1+x^2}} \, dx=-\sqrt {2 \left (1+\sqrt {5}\right )} \arctan \left (\sqrt {2+\sqrt {5}} \left (x-\sqrt {1+x^2}\right )\right )-\sqrt {2 \left (-1+\sqrt {5}\right )} \text {arctanh}\left (\sqrt {-2+\sqrt {5}} \left (x-\sqrt {1+x^2}\right )\right ) \] Input:

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

Output:

-(Sqrt[2*(1 + Sqrt[5])]*ArcTan[Sqrt[2 + Sqrt[5]]*(x - Sqrt[1 + x^2])]) - S 
qrt[2*(-1 + Sqrt[5])]*ArcTanh[Sqrt[-2 + Sqrt[5]]*(x - Sqrt[1 + x^2])]
 

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(319\) vs. \(2(78)=156\).

Time = 1.32 (sec) , antiderivative size = 319, normalized size of antiderivative = 4.09, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {25, 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 {2 \sqrt {x^2+1}+x}{x^3+\sqrt {x^2+1}+x} \, dx\)

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 7293

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

\(\Big \downarrow \) 2009

\(\displaystyle -\sqrt {\frac {2}{5} \left (\sqrt {5}-1\right )} \arctan \left (\sqrt {\frac {2}{\sqrt {5}-1}} \sqrt {x^2+1}\right )-\sqrt {\frac {2}{5 \left (\sqrt {5}-1\right )}} \arctan \left (\sqrt {\frac {2}{\sqrt {5}-1}} \sqrt {x^2+1}\right )-\sqrt {\frac {1}{10} \left (1+\sqrt {5}\right )} \arctan \left (\sqrt {\frac {2}{1+\sqrt {5}}} x\right )-2 \sqrt {\frac {2}{5 \left (1+\sqrt {5}\right )}} \arctan \left (\sqrt {\frac {2}{1+\sqrt {5}}} x\right )+\sqrt {\frac {2}{5} \left (1+\sqrt {5}\right )} \text {arctanh}\left (\sqrt {\frac {2}{1+\sqrt {5}}} \sqrt {x^2+1}\right )-\sqrt {\frac {2}{5 \left (1+\sqrt {5}\right )}} \text {arctanh}\left (\sqrt {\frac {2}{1+\sqrt {5}}} \sqrt {x^2+1}\right )+\sqrt {\frac {1}{10} \left (\sqrt {5}-1\right )} \text {arctanh}\left (\sqrt {\frac {2}{\sqrt {5}-1}} x\right )-2 \sqrt {\frac {2}{5 \left (\sqrt {5}-1\right )}} \text {arctanh}\left (\sqrt {\frac {2}{\sqrt {5}-1}} x\right )\)

Input:

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

Output:

-2*Sqrt[2/(5*(1 + Sqrt[5]))]*ArcTan[Sqrt[2/(1 + Sqrt[5])]*x] - Sqrt[(1 + S 
qrt[5])/10]*ArcTan[Sqrt[2/(1 + Sqrt[5])]*x] - Sqrt[2/(5*(-1 + Sqrt[5]))]*A 
rcTan[Sqrt[2/(-1 + Sqrt[5])]*Sqrt[1 + x^2]] - Sqrt[(2*(-1 + Sqrt[5]))/5]*A 
rcTan[Sqrt[2/(-1 + Sqrt[5])]*Sqrt[1 + x^2]] - 2*Sqrt[2/(5*(-1 + Sqrt[5]))] 
*ArcTanh[Sqrt[2/(-1 + Sqrt[5])]*x] + Sqrt[(-1 + Sqrt[5])/10]*ArcTanh[Sqrt[ 
2/(-1 + Sqrt[5])]*x] - Sqrt[2/(5*(1 + Sqrt[5]))]*ArcTanh[Sqrt[2/(1 + Sqrt[ 
5])]*Sqrt[1 + x^2]] + Sqrt[(2*(1 + Sqrt[5]))/5]*ArcTanh[Sqrt[2/(1 + Sqrt[5 
])]*Sqrt[1 + x^2]]
 

Defintions of rubi rules used

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

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 [C] (warning: unable to verify)

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

Time = 1.32 (sec) , antiderivative size = 214, normalized size of antiderivative = 2.74

method result size
trager \(\operatorname {RootOf}\left (\textit {\_Z}^{4}+\textit {\_Z}^{2}-1\right ) \ln \left (-\frac {\sqrt {x^{2}+1}\, \operatorname {RootOf}\left (\textit {\_Z}^{4}+\textit {\_Z}^{2}-1\right )^{2}+\operatorname {RootOf}\left (\textit {\_Z}^{4}+\textit {\_Z}^{2}-1\right )^{3}+\sqrt {x^{2}+1}+2 \operatorname {RootOf}\left (\textit {\_Z}^{4}+\textit {\_Z}^{2}-1\right )}{\operatorname {RootOf}\left (\textit {\_Z}^{4}+\textit {\_Z}^{2}-1\right )^{3} x +\operatorname {RootOf}\left (\textit {\_Z}^{4}+\textit {\_Z}^{2}-1\right ) x +1}\right )-\operatorname {RootOf}\left (\operatorname {RootOf}\left (\textit {\_Z}^{4}+\textit {\_Z}^{2}-1\right )^{2}+\textit {\_Z}^{2}+1\right ) \ln \left (\frac {\sqrt {x^{2}+1}\, \operatorname {RootOf}\left (\textit {\_Z}^{4}+\textit {\_Z}^{2}-1\right )^{2}-\operatorname {RootOf}\left (\operatorname {RootOf}\left (\textit {\_Z}^{4}+\textit {\_Z}^{2}-1\right )^{2}+\textit {\_Z}^{2}+1\right ) \operatorname {RootOf}\left (\textit {\_Z}^{4}+\textit {\_Z}^{2}-1\right )^{2}+\operatorname {RootOf}\left (\operatorname {RootOf}\left (\textit {\_Z}^{4}+\textit {\_Z}^{2}-1\right )^{2}+\textit {\_Z}^{2}+1\right )}{1+\operatorname {RootOf}\left (\operatorname {RootOf}\left (\textit {\_Z}^{4}+\textit {\_Z}^{2}-1\right )^{2}+\textit {\_Z}^{2}+1\right ) \operatorname {RootOf}\left (\textit {\_Z}^{4}+\textit {\_Z}^{2}-1\right )^{2} x}\right )\) \(214\)
default \(-\frac {\left (\sqrt {5}+3\right ) \sqrt {5}\, \arctan \left (\frac {2 x}{\sqrt {2+2 \sqrt {5}}}\right )}{5 \sqrt {2+2 \sqrt {5}}}+\frac {\left (\sqrt {5}-3\right ) \sqrt {5}\, \operatorname {arctanh}\left (\frac {2 x}{\sqrt {-2+2 \sqrt {5}}}\right )}{5 \sqrt {-2+2 \sqrt {5}}}+\frac {2 \left (\sqrt {5}+1\right ) \sqrt {5}\, \arctan \left (\frac {2 x}{\sqrt {2+2 \sqrt {5}}}\right )}{5 \sqrt {2+2 \sqrt {5}}}-\frac {2 \left (\sqrt {5}-1\right ) \sqrt {5}\, \operatorname {arctanh}\left (\frac {2 x}{\sqrt {-2+2 \sqrt {5}}}\right )}{5 \sqrt {-2+2 \sqrt {5}}}-\frac {2 \left (2+\sqrt {5}\right ) \sqrt {5}\, \arctan \left (\frac {2 x}{\sqrt {2+2 \sqrt {5}}}\right )}{5 \sqrt {2+2 \sqrt {5}}}+\frac {2 \sqrt {5}\, \left (-2+\sqrt {5}\right ) \operatorname {arctanh}\left (\frac {2 x}{\sqrt {-2+2 \sqrt {5}}}\right )}{5 \sqrt {-2+2 \sqrt {5}}}-\frac {\sqrt {x^{2}+1}}{2}-\frac {x}{2}+\frac {\left (\sqrt {5}+1\right ) \sqrt {5}\, \operatorname {arctanh}\left (\frac {-x +\sqrt {x^{2}+1}}{\sqrt {2+\sqrt {5}}}\right )}{10 \sqrt {2+\sqrt {5}}}-\frac {\left (\sqrt {5}-1\right ) \sqrt {5}\, \arctan \left (\frac {-x +\sqrt {x^{2}+1}}{\sqrt {-2+\sqrt {5}}}\right )}{10 \sqrt {-2+\sqrt {5}}}+\frac {1}{-2 x +2 \sqrt {x^{2}+1}}-\frac {\left (\sqrt {5}-3\right ) \sqrt {5}\, \operatorname {arctanh}\left (\frac {-x +\sqrt {x^{2}+1}}{\sqrt {-2+\sqrt {5}}}\right )}{10 \sqrt {-2+\sqrt {5}}}+\frac {\left (\sqrt {5}+3\right ) \sqrt {5}\, \arctan \left (\frac {-x +\sqrt {x^{2}+1}}{\sqrt {2+\sqrt {5}}}\right )}{10 \sqrt {2+\sqrt {5}}}+\frac {2 \sqrt {5}\, \operatorname {arctanh}\left (\frac {-x +\sqrt {x^{2}+1}}{\sqrt {2+\sqrt {5}}}\right )}{5 \sqrt {2+\sqrt {5}}}+\frac {2 \sqrt {5}\, \arctan \left (\frac {-x +\sqrt {x^{2}+1}}{\sqrt {-2+\sqrt {5}}}\right )}{5 \sqrt {-2+\sqrt {5}}}+\frac {2 \sqrt {5}\, \sqrt {-2+\sqrt {5}}\, \operatorname {arctanh}\left (\frac {-x +\sqrt {x^{2}+1}}{\sqrt {-2+\sqrt {5}}}\right )}{5}-\frac {2 \sqrt {2+\sqrt {5}}\, \sqrt {5}\, \arctan \left (\frac {-x +\sqrt {x^{2}+1}}{\sqrt {2+\sqrt {5}}}\right )}{5}\) \(497\)

Input:

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

Output:

RootOf(_Z^4+_Z^2-1)*ln(-((x^2+1)^(1/2)*RootOf(_Z^4+_Z^2-1)^2+RootOf(_Z^4+_ 
Z^2-1)^3+(x^2+1)^(1/2)+2*RootOf(_Z^4+_Z^2-1))/(RootOf(_Z^4+_Z^2-1)^3*x+Roo 
tOf(_Z^4+_Z^2-1)*x+1))-RootOf(RootOf(_Z^4+_Z^2-1)^2+_Z^2+1)*ln(((x^2+1)^(1 
/2)*RootOf(_Z^4+_Z^2-1)^2-RootOf(RootOf(_Z^4+_Z^2-1)^2+_Z^2+1)*RootOf(_Z^4 
+_Z^2-1)^2+RootOf(RootOf(_Z^4+_Z^2-1)^2+_Z^2+1))/(1+RootOf(RootOf(_Z^4+_Z^ 
2-1)^2+_Z^2+1)*RootOf(_Z^4+_Z^2-1)^2*x))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 231 vs. \(2 (58) = 116\).

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

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

Output:

-sqrt(1/2*sqrt(5) + 1/2)*arctan(1/2*(sqrt(5)*x - x)*sqrt(1/2*sqrt(5) + 1/2 
)) - sqrt(1/2*sqrt(5) + 1/2)*arctan(sqrt(x^2 + 1)*sqrt(1/2*sqrt(5) + 1/2)) 
 - 1/2*sqrt(1/2*sqrt(5) - 1/2)*log(2*x^2 - 2*sqrt(x^2 + 1)*x + (sqrt(5)*x 
- sqrt(x^2 + 1)*(sqrt(5) + 1) + x)*sqrt(1/2*sqrt(5) - 1/2) + 2) + 1/2*sqrt 
(1/2*sqrt(5) - 1/2)*log(2*x^2 - 2*sqrt(x^2 + 1)*x - (sqrt(5)*x - sqrt(x^2 
+ 1)*(sqrt(5) + 1) + x)*sqrt(1/2*sqrt(5) - 1/2) + 2) - 1/2*sqrt(1/2*sqrt(5 
) - 1/2)*log(x + sqrt(1/2*sqrt(5) - 1/2)) + 1/2*sqrt(1/2*sqrt(5) - 1/2)*lo 
g(x - sqrt(1/2*sqrt(5) - 1/2))
 

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

-x - 1/2*arctan(x) + integrate(1/2*(2*x^6 + 3*x^4 - x^2 - 1)/(x^6 + 2*x^4 
+ 2*x^2 + 2*(x^3 + x)*sqrt(x^2 + 1) + 1), x)
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 218 vs. \(2 (58) = 116\).

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

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

Output:

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

Mupad [B] (verification not implemented)

Time = 23.24 (sec) , antiderivative size = 649, normalized size of antiderivative = 8.32 \[ \int -\frac {x+2 \sqrt {1+x^2}}{x+x^3+\sqrt {1+x^2}} \, dx =\text {Too large to display} \] Input:

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

Output:

(log(x + (2^(1/2)*(5^(1/2) - 1)^(1/2))/2)*(5^(1/2)/2 - 5/2))/(2*(5^(1/2)/2 
 - 1/2)^(1/2) + 4*(5^(1/2)/2 - 1/2)^(3/2)) - (log(x - (2^(1/2)*(5^(1/2) - 
1)^(1/2))/2)*(5^(1/2)/2 - 5/2))/(2*(5^(1/2)/2 - 1/2)^(1/2) + 4*(5^(1/2)/2 
- 1/2)^(3/2)) + (log(x - (2^(1/2)*(- 5^(1/2) - 1)^(1/2))/2)*(5^(1/2)/2 + 5 
/2))/(2*(- 5^(1/2)/2 - 1/2)^(1/2) + 4*(- 5^(1/2)/2 - 1/2)^(3/2)) - (log(x 
+ (2^(1/2)*(- 5^(1/2) - 1)^(1/2))/2)*(5^(1/2)/2 + 5/2))/(2*(- 5^(1/2)/2 - 
1/2)^(1/2) + 4*(- 5^(1/2)/2 - 1/2)^(3/2)) - ((log(x - (2^(1/2)*(5^(1/2) - 
1)^(1/2))/2) - log((2^(1/2)*x*(5^(1/2) - 1)^(1/2))/2 + (2^(1/2)*(x^2 + 1)^ 
(1/2)*(5^(1/2) + 1)^(1/2))/2 + 1))*((5^(1/2)/2 - 1/2)^(1/2) + 2*(5^(1/2)/2 
 - 1/2)^(3/2)))/((2*(5^(1/2)/2 - 1/2)^(1/2) + 4*(5^(1/2)/2 - 1/2)^(3/2))*( 
5^(1/2)/2 + 1/2)^(1/2)) - ((log(x + (2^(1/2)*(5^(1/2) - 1)^(1/2))/2) - log 
((2^(1/2)*(x^2 + 1)^(1/2)*(5^(1/2) + 1)^(1/2))/2 - (2^(1/2)*x*(5^(1/2) - 1 
)^(1/2))/2 + 1))*((5^(1/2)/2 - 1/2)^(1/2) + 2*(5^(1/2)/2 - 1/2)^(3/2)))/(( 
2*(5^(1/2)/2 - 1/2)^(1/2) + 4*(5^(1/2)/2 - 1/2)^(3/2))*(5^(1/2)/2 + 1/2)^( 
1/2)) + ((log((2^(1/2)*(x^2 + 1)^(1/2)*(1 - 5^(1/2))^(1/2))/2 - (2^(1/2)*x 
*(- 5^(1/2) - 1)^(1/2))/2 + 1) - log(x + (2^(1/2)*(- 5^(1/2) - 1)^(1/2))/2 
))*((- 5^(1/2)/2 - 1/2)^(1/2) + 2*(- 5^(1/2)/2 - 1/2)^(3/2)))/((2*(- 5^(1/ 
2)/2 - 1/2)^(1/2) + 4*(- 5^(1/2)/2 - 1/2)^(3/2))*(1/2 - 5^(1/2)/2)^(1/2)) 
+ ((log((2^(1/2)*x*(- 5^(1/2) - 1)^(1/2))/2 + (2^(1/2)*(x^2 + 1)^(1/2)*(1 
- 5^(1/2))^(1/2))/2 + 1) - log(x - (2^(1/2)*(- 5^(1/2) - 1)^(1/2))/2))*...
 

Reduce [B] (verification not implemented)

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

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

Output:

( - 2*sqrt(sqrt(5) + 2)*sqrt(5)*atan((sqrt(x**2 + 1) + x)/sqrt(sqrt(5) + 2 
)) + 2*sqrt(sqrt(5) + 2)*atan((sqrt(x**2 + 1) + x)/sqrt(sqrt(5) + 2)) - sq 
rt(sqrt(5) - 2)*sqrt(5)*log(sqrt(x**2 + 1) - sqrt(sqrt(5) - 2) + x) + sqrt 
(sqrt(5) - 2)*sqrt(5)*log(sqrt(x**2 + 1) + sqrt(sqrt(5) - 2) + x) - sqrt(s 
qrt(5) - 2)*log(sqrt(x**2 + 1) - sqrt(sqrt(5) - 2) + x) + sqrt(sqrt(5) - 2 
)*log(sqrt(x**2 + 1) + sqrt(sqrt(5) - 2) + x))/2