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

Optimal. Leaf size=78 \[ \sqrt{2 \left (\sqrt{5}-1\right )} \tanh ^{-1}\left (\sqrt{2+\sqrt{5}} \left (\sqrt{x^2+1}+x\right )\right )-\sqrt{2 \left (1+\sqrt{5}\right )} \tan ^{-1}\left (\sqrt{\sqrt{5}-2} \left (\sqrt{x^2+1}+x\right )\right ) \]

[Out]

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

________________________________________________________________________________________

Rubi [B]  time = 0.568053, antiderivative size = 319, normalized size of antiderivative = 4.09, number of steps used = 25, number of rules used = 12, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.387, Rules used = {6742, 261, 1130, 203, 207, 1251, 824, 707, 1093, 1247, 699, 1279} \[ -\sqrt{\frac{2}{5} \left (\sqrt{5}-1\right )} \tan ^{-1}\left (\sqrt{\frac{2}{\sqrt{5}-1}} \sqrt{x^2+1}\right )-\sqrt{\frac{2}{5 \left (\sqrt{5}-1\right )}} \tan ^{-1}\left (\sqrt{\frac{2}{\sqrt{5}-1}} \sqrt{x^2+1}\right )+\sqrt{\frac{2}{5} \left (1+\sqrt{5}\right )} \tanh ^{-1}\left (\sqrt{\frac{2}{1+\sqrt{5}}} \sqrt{x^2+1}\right )-\sqrt{\frac{2}{5 \left (1+\sqrt{5}\right )}} \tanh ^{-1}\left (\sqrt{\frac{2}{1+\sqrt{5}}} \sqrt{x^2+1}\right )-\sqrt{\frac{1}{10} \left (1+\sqrt{5}\right )} \tan ^{-1}\left (\sqrt{\frac{2}{1+\sqrt{5}}} x\right )-2 \sqrt{\frac{2}{5 \left (1+\sqrt{5}\right )}} \tan ^{-1}\left (\sqrt{\frac{2}{1+\sqrt{5}}} x\right )+\sqrt{\frac{1}{10} \left (\sqrt{5}-1\right )} \tanh ^{-1}\left (\sqrt{\frac{2}{\sqrt{5}-1}} x\right )-2 \sqrt{\frac{2}{5 \left (\sqrt{5}-1\right )}} \tanh ^{-1}\left (\sqrt{\frac{2}{\sqrt{5}-1}} x\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

-2*Sqrt[2/(5*(1 + Sqrt[5]))]*ArcTan[Sqrt[2/(1 + Sqrt[5])]*x] - Sqrt[(1 + Sqrt[5])/10]*ArcTan[Sqrt[2/(1 + Sqrt[
5])]*x] - Sqrt[2/(5*(-1 + Sqrt[5]))]*ArcTan[Sqrt[2/(-1 + Sqrt[5])]*Sqrt[1 + x^2]] - Sqrt[(2*(-1 + Sqrt[5]))/5]
*ArcTan[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 + S
qrt[5])]*Sqrt[1 + x^2]] + Sqrt[(2*(1 + Sqrt[5]))/5]*ArcTanh[Sqrt[2/(1 + Sqrt[5])]*Sqrt[1 + x^2]]

Rule 6742

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

Rule 261

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a + b*x^n)^(p + 1)/(b*n*(p + 1)), x] /; FreeQ
[{a, b, m, n, p}, x] && EqQ[m, n - 1] && NeQ[p, -1]

Rule 1130

Int[((d_.)*(x_))^(m_)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[(
d^2*(b/q + 1))/2, Int[(d*x)^(m - 2)/(b/2 + q/2 + c*x^2), x], x] - Dist[(d^2*(b/q - 1))/2, Int[(d*x)^(m - 2)/(b
/2 - q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[b^2 - 4*a*c, 0] && GeQ[m, 2]

Rule 203

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

Rule 207

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

Rule 1251

Int[(x_)^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2,
Subst[Int[x^((m - 1)/2)*(d + e*x)^q*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, d, e, p, q}, x] &&
 IntegerQ[(m - 1)/2]

Rule 824

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

Rule 707

Int[1/(Sqrt[(d_.) + (e_.)*(x_)]*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)), x_Symbol] :> Dist[2*e, Subst[Int[1/(c*d^
2 - b*d*e + a*e^2 - (2*c*d - b*e)*x^2 + c*x^4), x], x, Sqrt[d + e*x]], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[
b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && NeQ[2*c*d - b*e, 0]

Rule 1093

Int[((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(-1), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[c/q, Int[1/(b/
2 - q/2 + c*x^2), x], x] - Dist[c/q, Int[1/(b/2 + q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*
a*c, 0] && PosQ[b^2 - 4*a*c]

Rule 1247

Int[(x_)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2, Subst[
Int[(d + e*x)^q*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, d, e, p, q}, x]

Rule 699

Int[Sqrt[(d_.) + (e_.)*(x_)]/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[2*e, Subst[Int[x^2/(c*d^2
- b*d*e + a*e^2 - (2*c*d - b*e)*x^2 + c*x^4), x], x, Sqrt[d + e*x]], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^
2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && NeQ[2*c*d - b*e, 0]

Rule 1279

Int[((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Simp[(e*f
*(f*x)^(m - 1)*(a + b*x^2 + c*x^4)^(p + 1))/(c*(m + 4*p + 3)), x] - Dist[f^2/(c*(m + 4*p + 3)), Int[(f*x)^(m -
 2)*(a + b*x^2 + c*x^4)^p*Simp[a*e*(m - 1) + (b*e*(m + 2*p + 1) - c*d*(m + 4*p + 3))*x^2, x], x], x] /; FreeQ[
{a, b, c, d, e, f, p}, x] && NeQ[b^2 - 4*a*c, 0] && GtQ[m, 1] && NeQ[m + 4*p + 3, 0] && IntegerQ[2*p] && (Inte
gerQ[p] || IntegerQ[m])

Rubi steps

\begin{align*} \int -\frac{x+2 \sqrt{1+x^2}}{x+x^3+\sqrt{1+x^2}} \, dx &=-\int \left (\frac{x}{x+x^3+\sqrt{1+x^2}}+\frac{2 \sqrt{1+x^2}}{x+x^3+\sqrt{1+x^2}}\right ) \, dx\\ &=-\left (2 \int \frac{\sqrt{1+x^2}}{x+x^3+\sqrt{1+x^2}} \, dx\right )-\int \frac{x}{x+x^3+\sqrt{1+x^2}} \, dx\\ &=-\left (2 \int \left (1+\frac{x \sqrt{1+x^2}}{-1+x^2+x^4}-\frac{x^2 \left (1+x^2\right )}{-1+x^2+x^4}\right ) \, dx\right )-\int \left (\frac{x}{\sqrt{1+x^2}}+\frac{x^2}{-1+x^2+x^4}-\frac{x^3 \sqrt{1+x^2}}{-1+x^2+x^4}\right ) \, dx\\ &=-2 x-2 \int \frac{x \sqrt{1+x^2}}{-1+x^2+x^4} \, dx+2 \int \frac{x^2 \left (1+x^2\right )}{-1+x^2+x^4} \, dx-\int \frac{x}{\sqrt{1+x^2}} \, dx-\int \frac{x^2}{-1+x^2+x^4} \, dx+\int \frac{x^3 \sqrt{1+x^2}}{-1+x^2+x^4} \, dx\\ &=-\sqrt{1+x^2}+\frac{1}{2} \operatorname{Subst}\left (\int \frac{x \sqrt{1+x}}{-1+x+x^2} \, dx,x,x^2\right )+2 \int \frac{1}{-1+x^2+x^4} \, dx+\frac{1}{10} \left (-5+\sqrt{5}\right ) \int \frac{1}{\frac{1}{2}-\frac{\sqrt{5}}{2}+x^2} \, dx-\frac{1}{10} \left (5+\sqrt{5}\right ) \int \frac{1}{\frac{1}{2}+\frac{\sqrt{5}}{2}+x^2} \, dx-\operatorname{Subst}\left (\int \frac{\sqrt{1+x}}{-1+x+x^2} \, dx,x,x^2\right )\\ &=-\sqrt{\frac{1}{10} \left (1+\sqrt{5}\right )} \tan ^{-1}\left (\sqrt{\frac{2}{1+\sqrt{5}}} x\right )+\sqrt{\frac{1}{10} \left (-1+\sqrt{5}\right )} \tanh ^{-1}\left (\sqrt{\frac{2}{-1+\sqrt{5}}} x\right )+\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{\sqrt{1+x} \left (-1+x+x^2\right )} \, dx,x,x^2\right )-2 \operatorname{Subst}\left (\int \frac{x^2}{-1-x^2+x^4} \, dx,x,\sqrt{1+x^2}\right )+\frac{2 \int \frac{1}{\frac{1}{2}-\frac{\sqrt{5}}{2}+x^2} \, dx}{\sqrt{5}}-\frac{2 \int \frac{1}{\frac{1}{2}+\frac{\sqrt{5}}{2}+x^2} \, dx}{\sqrt{5}}\\ &=-2 \sqrt{\frac{2}{5 \left (1+\sqrt{5}\right )}} \tan ^{-1}\left (\sqrt{\frac{2}{1+\sqrt{5}}} x\right )-\sqrt{\frac{1}{10} \left (1+\sqrt{5}\right )} \tan ^{-1}\left (\sqrt{\frac{2}{1+\sqrt{5}}} x\right )-2 \sqrt{\frac{2}{5 \left (-1+\sqrt{5}\right )}} \tanh ^{-1}\left (\sqrt{\frac{2}{-1+\sqrt{5}}} x\right )+\sqrt{\frac{1}{10} \left (-1+\sqrt{5}\right )} \tanh ^{-1}\left (\sqrt{\frac{2}{-1+\sqrt{5}}} x\right )-\frac{1}{5} \left (5-\sqrt{5}\right ) \operatorname{Subst}\left (\int \frac{1}{-\frac{1}{2}+\frac{\sqrt{5}}{2}+x^2} \, dx,x,\sqrt{1+x^2}\right )-\frac{1}{5} \left (5+\sqrt{5}\right ) \operatorname{Subst}\left (\int \frac{1}{-\frac{1}{2}-\frac{\sqrt{5}}{2}+x^2} \, dx,x,\sqrt{1+x^2}\right )+\operatorname{Subst}\left (\int \frac{1}{-1-x^2+x^4} \, dx,x,\sqrt{1+x^2}\right )\\ &=-2 \sqrt{\frac{2}{5 \left (1+\sqrt{5}\right )}} \tan ^{-1}\left (\sqrt{\frac{2}{1+\sqrt{5}}} x\right )-\sqrt{\frac{1}{10} \left (1+\sqrt{5}\right )} \tan ^{-1}\left (\sqrt{\frac{2}{1+\sqrt{5}}} x\right )-\sqrt{\frac{2}{5} \left (-1+\sqrt{5}\right )} \tan ^{-1}\left (\sqrt{\frac{2}{-1+\sqrt{5}}} \sqrt{1+x^2}\right )-2 \sqrt{\frac{2}{5 \left (-1+\sqrt{5}\right )}} \tanh ^{-1}\left (\sqrt{\frac{2}{-1+\sqrt{5}}} x\right )+\sqrt{\frac{1}{10} \left (-1+\sqrt{5}\right )} \tanh ^{-1}\left (\sqrt{\frac{2}{-1+\sqrt{5}}} x\right )+\sqrt{\frac{2}{5} \left (1+\sqrt{5}\right )} \tanh ^{-1}\left (\sqrt{\frac{2}{1+\sqrt{5}}} \sqrt{1+x^2}\right )+\frac{\operatorname{Subst}\left (\int \frac{1}{-\frac{1}{2}-\frac{\sqrt{5}}{2}+x^2} \, dx,x,\sqrt{1+x^2}\right )}{\sqrt{5}}-\frac{\operatorname{Subst}\left (\int \frac{1}{-\frac{1}{2}+\frac{\sqrt{5}}{2}+x^2} \, dx,x,\sqrt{1+x^2}\right )}{\sqrt{5}}\\ &=-2 \sqrt{\frac{2}{5 \left (1+\sqrt{5}\right )}} \tan ^{-1}\left (\sqrt{\frac{2}{1+\sqrt{5}}} x\right )-\sqrt{\frac{1}{10} \left (1+\sqrt{5}\right )} \tan ^{-1}\left (\sqrt{\frac{2}{1+\sqrt{5}}} x\right )-\sqrt{\frac{2}{5 \left (-1+\sqrt{5}\right )}} \tan ^{-1}\left (\sqrt{\frac{2}{-1+\sqrt{5}}} \sqrt{1+x^2}\right )-\sqrt{\frac{2}{5} \left (-1+\sqrt{5}\right )} \tan ^{-1}\left (\sqrt{\frac{2}{-1+\sqrt{5}}} \sqrt{1+x^2}\right )-2 \sqrt{\frac{2}{5 \left (-1+\sqrt{5}\right )}} \tanh ^{-1}\left (\sqrt{\frac{2}{-1+\sqrt{5}}} x\right )+\sqrt{\frac{1}{10} \left (-1+\sqrt{5}\right )} \tanh ^{-1}\left (\sqrt{\frac{2}{-1+\sqrt{5}}} x\right )-\sqrt{\frac{2}{5 \left (1+\sqrt{5}\right )}} \tanh ^{-1}\left (\sqrt{\frac{2}{1+\sqrt{5}}} \sqrt{1+x^2}\right )+\sqrt{\frac{2}{5} \left (1+\sqrt{5}\right )} \tanh ^{-1}\left (\sqrt{\frac{2}{1+\sqrt{5}}} \sqrt{1+x^2}\right )\\ \end{align*}

Mathematica [F]  time = 0.416731, size = 34, normalized size = 0.44 \[ -\int \frac{2 \sqrt{x^2+1}+x}{x^3+\sqrt{x^2+1}+x} \, dx \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.147, size = 438, normalized size = 5.6 \begin{align*} -{\frac{\sqrt{5}}{\sqrt{2+2\,\sqrt{5}}}\arctan \left ( 2\,{\frac{x}{\sqrt{2+2\,\sqrt{5}}}} \right ) }-{\frac{1}{\sqrt{2+2\,\sqrt{5}}}\arctan \left ( 2\,{\frac{x}{\sqrt{2+2\,\sqrt{5}}}} \right ) }-{\frac{\sqrt{5}}{\sqrt{-2+2\,\sqrt{5}}}{\it Artanh} \left ( 2\,{\frac{x}{\sqrt{-2+2\,\sqrt{5}}}} \right ) }+{\frac{1}{\sqrt{-2+2\,\sqrt{5}}}{\it Artanh} \left ( 2\,{\frac{x}{\sqrt{-2+2\,\sqrt{5}}}} \right ) }-{\frac{1}{2}\sqrt{{x}^{2}+1}}-{\frac{x}{2}}+{\frac{3\,\sqrt{5}}{10\,\sqrt{-2+\sqrt{5}}}{\it Artanh} \left ({\frac{1}{\sqrt{-2+\sqrt{5}}} \left ( -x+\sqrt{{x}^{2}+1} \right ) } \right ) }-{\frac{1}{2\,\sqrt{-2+\sqrt{5}}}{\it Artanh} \left ({\frac{1}{\sqrt{-2+\sqrt{5}}} \left ( -x+\sqrt{{x}^{2}+1} \right ) } \right ) }+{\frac{3\,\sqrt{5}}{10\,\sqrt{2+\sqrt{5}}}\arctan \left ({\frac{1}{\sqrt{2+\sqrt{5}}} \left ( -x+\sqrt{{x}^{2}+1} \right ) } \right ) }+{\frac{1}{2\,\sqrt{2+\sqrt{5}}}\arctan \left ({\frac{1}{\sqrt{2+\sqrt{5}}} \left ( -x+\sqrt{{x}^{2}+1} \right ) } \right ) }-{\frac{1}{2\,\sqrt{-2+\sqrt{5}}}\arctan \left ({\frac{1}{\sqrt{-2+\sqrt{5}}} \left ( -x+\sqrt{{x}^{2}+1} \right ) } \right ) }+{\frac{\sqrt{5}}{2\,\sqrt{-2+\sqrt{5}}}\arctan \left ({\frac{1}{\sqrt{-2+\sqrt{5}}} \left ( -x+\sqrt{{x}^{2}+1} \right ) } \right ) }+{\frac{1}{2\,\sqrt{2+\sqrt{5}}}{\it Artanh} \left ({\frac{1}{\sqrt{2+\sqrt{5}}} \left ( -x+\sqrt{{x}^{2}+1} \right ) } \right ) }+{\frac{\sqrt{5}}{2\,\sqrt{2+\sqrt{5}}}{\it Artanh} \left ({\frac{1}{\sqrt{2+\sqrt{5}}} \left ( -x+\sqrt{{x}^{2}+1} \right ) } \right ) }+{\frac{1}{2} \left ( -x+\sqrt{{x}^{2}+1} \right ) ^{-1}}+{\frac{2\,\sqrt{-2+\sqrt{5}}\sqrt{5}}{5}{\it Artanh} \left ({\frac{1}{\sqrt{-2+\sqrt{5}}} \left ( -x+\sqrt{{x}^{2}+1} \right ) } \right ) }-{\frac{2\,\sqrt{2+\sqrt{5}}\sqrt{5}}{5}\arctan \left ({\frac{1}{\sqrt{2+\sqrt{5}}} \left ( -x+\sqrt{{x}^{2}+1} \right ) } \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-5^(1/2)/(2+2*5^(1/2))^(1/2)*arctan(2*x/(2+2*5^(1/2))^(1/2))-1/(2+2*5^(1/2))^(1/2)*arctan(2*x/(2+2*5^(1/2))^(1
/2))-5^(1/2)/(-2+2*5^(1/2))^(1/2)*arctanh(2*x/(-2+2*5^(1/2))^(1/2))+1/(-2+2*5^(1/2))^(1/2)*arctanh(2*x/(-2+2*5
^(1/2))^(1/2))-1/2*(x^2+1)^(1/2)-1/2*x+3/10*5^(1/2)/(-2+5^(1/2))^(1/2)*arctanh((-x+(x^2+1)^(1/2))/(-2+5^(1/2))
^(1/2))-1/2/(-2+5^(1/2))^(1/2)*arctanh((-x+(x^2+1)^(1/2))/(-2+5^(1/2))^(1/2))+3/10*5^(1/2)/(2+5^(1/2))^(1/2)*a
rctan((-x+(x^2+1)^(1/2))/(2+5^(1/2))^(1/2))+1/2/(2+5^(1/2))^(1/2)*arctan((-x+(x^2+1)^(1/2))/(2+5^(1/2))^(1/2))
-1/2/(-2+5^(1/2))^(1/2)*arctan((-x+(x^2+1)^(1/2))/(-2+5^(1/2))^(1/2))+1/2*5^(1/2)/(-2+5^(1/2))^(1/2)*arctan((-
x+(x^2+1)^(1/2))/(-2+5^(1/2))^(1/2))+1/2/(2+5^(1/2))^(1/2)*arctanh((-x+(x^2+1)^(1/2))/(2+5^(1/2))^(1/2))+1/2*5
^(1/2)/(2+5^(1/2))^(1/2)*arctanh((-x+(x^2+1)^(1/2))/(2+5^(1/2))^(1/2))+1/2/(-x+(x^2+1)^(1/2))+2/5*(-2+5^(1/2))
^(1/2)*5^(1/2)*arctanh((-x+(x^2+1)^(1/2))/(-2+5^(1/2))^(1/2))-2/5*(2+5^(1/2))^(1/2)*5^(1/2)*arctan((-x+(x^2+1)
^(1/2))/(2+5^(1/2))^(1/2))

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} -x - \frac{1}{2} \, \arctan \left (x\right ) + \int \frac{2 \, x^{6} + 3 \, x^{4} - x^{2} - 1}{2 \,{\left (x^{6} + 2 \, x^{4} + 2 \, x^{2} + 2 \,{\left (x^{3} + x\right )} \sqrt{x^{2} + 1} + 1\right )}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-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)

________________________________________________________________________________________

Fricas [B]  time = 1.94273, size = 1173, normalized size = 15.04 \begin{align*} \sqrt{2} \sqrt{\sqrt{5} + 1} \arctan \left (\frac{1}{4} \, \sqrt{2} \sqrt{4 \, x^{4} + 4 \, x^{2} + \sqrt{5}{\left (2 \, x^{2} + 1\right )} - 2 \,{\left (2 \, x^{3} + \sqrt{5} x + x\right )} \sqrt{x^{2} + 1} + 1}{\left (\sqrt{2} x + \sqrt{2} \sqrt{x^{2} + 1}\right )} \sqrt{\sqrt{5} + 1} - \frac{1}{2} \, \sqrt{2} \sqrt{x^{2} + 1} \sqrt{\sqrt{5} + 1}\right ) + \sqrt{2} \sqrt{\sqrt{5} + 1} \arctan \left (\frac{1}{8} \, \sqrt{4 \, x^{2} + 2 \, \sqrt{5} + 2}{\left (\sqrt{5} \sqrt{2} - \sqrt{2}\right )} \sqrt{\sqrt{5} + 1} - \frac{1}{4} \,{\left (\sqrt{5} \sqrt{2} x - \sqrt{2} x\right )} \sqrt{\sqrt{5} + 1}\right ) - \frac{1}{4} \, \sqrt{2} \sqrt{\sqrt{5} - 1} \log \left (4 \, x^{2} - 4 \, \sqrt{x^{2} + 1} x +{\left (\sqrt{5} \sqrt{2} x - \sqrt{x^{2} + 1}{\left (\sqrt{5} \sqrt{2} + \sqrt{2}\right )} + \sqrt{2} x\right )} \sqrt{\sqrt{5} - 1} + 4\right ) + \frac{1}{4} \, \sqrt{2} \sqrt{\sqrt{5} - 1} \log \left (4 \, x^{2} - 4 \, \sqrt{x^{2} + 1} x -{\left (\sqrt{5} \sqrt{2} x - \sqrt{x^{2} + 1}{\left (\sqrt{5} \sqrt{2} + \sqrt{2}\right )} + \sqrt{2} x\right )} \sqrt{\sqrt{5} - 1} + 4\right ) - \frac{1}{4} \, \sqrt{2} \sqrt{\sqrt{5} - 1} \log \left (2 \, x + \sqrt{2} \sqrt{\sqrt{5} - 1}\right ) + \frac{1}{4} \, \sqrt{2} \sqrt{\sqrt{5} - 1} \log \left (2 \, x - \sqrt{2} \sqrt{\sqrt{5} - 1}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

sqrt(2)*sqrt(sqrt(5) + 1)*arctan(1/4*sqrt(2)*sqrt(4*x^4 + 4*x^2 + sqrt(5)*(2*x^2 + 1) - 2*(2*x^3 + sqrt(5)*x +
 x)*sqrt(x^2 + 1) + 1)*(sqrt(2)*x + sqrt(2)*sqrt(x^2 + 1))*sqrt(sqrt(5) + 1) - 1/2*sqrt(2)*sqrt(x^2 + 1)*sqrt(
sqrt(5) + 1)) + sqrt(2)*sqrt(sqrt(5) + 1)*arctan(1/8*sqrt(4*x^2 + 2*sqrt(5) + 2)*(sqrt(5)*sqrt(2) - sqrt(2))*s
qrt(sqrt(5) + 1) - 1/4*(sqrt(5)*sqrt(2)*x - sqrt(2)*x)*sqrt(sqrt(5) + 1)) - 1/4*sqrt(2)*sqrt(sqrt(5) - 1)*log(
4*x^2 - 4*sqrt(x^2 + 1)*x + (sqrt(5)*sqrt(2)*x - sqrt(x^2 + 1)*(sqrt(5)*sqrt(2) + sqrt(2)) + sqrt(2)*x)*sqrt(s
qrt(5) - 1) + 4) + 1/4*sqrt(2)*sqrt(sqrt(5) - 1)*log(4*x^2 - 4*sqrt(x^2 + 1)*x - (sqrt(5)*sqrt(2)*x - sqrt(x^2
 + 1)*(sqrt(5)*sqrt(2) + sqrt(2)) + sqrt(2)*x)*sqrt(sqrt(5) - 1) + 4) - 1/4*sqrt(2)*sqrt(sqrt(5) - 1)*log(2*x
+ sqrt(2)*sqrt(sqrt(5) - 1)) + 1/4*sqrt(2)*sqrt(sqrt(5) - 1)*log(2*x - sqrt(2)*sqrt(sqrt(5) - 1))

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.35034, size = 294, normalized size = 3.77 \begin{align*} -\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 ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-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) - sqr
t(2*sqrt(5) + 2) - 1/(x - sqrt(x^2 + 1))))