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

Optimal. Leaf size=136 \[ \frac {8 x}{9}-\frac {x^2}{6}+\frac {8 \sqrt {1+x^2}}{9}-\frac {1}{6} x \sqrt {1+x^2}-\frac {41}{54} \sinh ^{-1}(x)+\frac {4}{27} \sqrt {2} \tan ^{-1}\left (\frac {1+3 x}{2 \sqrt {2}}\right )+\frac {4}{27} \sqrt {2} \tan ^{-1}\left (\frac {1+x}{\sqrt {2} \sqrt {1+x^2}}\right )+\frac {7}{27} \tanh ^{-1}\left (\frac {1-x}{2 \sqrt {1+x^2}}\right )-\frac {7}{54} \log \left (3+2 x+3 x^2\right ) \]

[Out]

8/9*x-1/6*x^2-41/54*arcsinh(x)+7/27*arctanh(1/2*(1-x)/(x^2+1)^(1/2))-7/54*ln(3*x^2+2*x+3)+4/27*arctan(1/4*(1+3
*x)*2^(1/2))*2^(1/2)+4/27*arctan(1/2*(1+x)*2^(1/2)/(x^2+1)^(1/2))*2^(1/2)+8/9*(x^2+1)^(1/2)-1/6*x*(x^2+1)^(1/2
)

________________________________________________________________________________________

Rubi [A]
time = 1.06, antiderivative size = 136, normalized size of antiderivative = 1.00, number of steps used = 32, number of rules used = 14, integrand size = 44, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.318, Rules used = {6874, 201, 221, 648, 632, 210, 642, 1034, 12, 1095, 1051, 1045, 212, 267} \begin {gather*} \frac {4}{27} \sqrt {2} \text {ArcTan}\left (\frac {x+1}{\sqrt {2} \sqrt {x^2+1}}\right )+\frac {4}{27} \sqrt {2} \text {ArcTan}\left (\frac {3 x+1}{2 \sqrt {2}}\right )-\frac {x^2}{6}-\frac {1}{6} \sqrt {x^2+1} x+\frac {8 \sqrt {x^2+1}}{9}-\frac {7}{54} \log \left (3 x^2+2 x+3\right )+\frac {7}{27} \tanh ^{-1}\left (\frac {1-x}{2 \sqrt {x^2+1}}\right )+\frac {8 x}{9}-\frac {41}{54} \sinh ^{-1}(x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(8*x)/9 - x^2/6 + (8*Sqrt[1 + x^2])/9 - (x*Sqrt[1 + x^2])/6 - (41*ArcSinh[x])/54 + (4*Sqrt[2]*ArcTan[(1 + 3*x)
/(2*Sqrt[2])])/27 + (4*Sqrt[2]*ArcTan[(1 + x)/(Sqrt[2]*Sqrt[1 + x^2])])/27 + (7*ArcTanh[(1 - x)/(2*Sqrt[1 + x^
2])])/27 - (7*Log[3 + 2*x + 3*x^2])/54

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 201

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[x*((a + b*x^n)^p/(n*p + 1)), x] + Dist[a*n*(p/(n*p + 1)),
 Int[(a + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && GtQ[p, 0] && (IntegerQ[2*p] || (EqQ[n, 2
] && IntegerQ[4*p]) || (EqQ[n, 2] && IntegerQ[3*p]) || LtQ[Denominator[p + 1/n], Denominator[p]])

Rule 210

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 212

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

Rule 221

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

Rule 267

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 632

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

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[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 648

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

Rule 1034

Int[((g_.) + (h_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_)*((d_) + (e_.)*(x_) + (f_.)*(x_)^2)^(q_), x_Symbol] :> Simp
[h*(a + c*x^2)^p*((d + e*x + f*x^2)^(q + 1)/(2*f*(p + q + 1))), x] + Dist[1/(2*f*(p + q + 1)), Int[(a + c*x^2)
^(p - 1)*(d + e*x + f*x^2)^q*Simp[a*h*e*p - a*(h*e - 2*g*f)*(p + q + 1) - 2*h*p*(c*d - a*f)*x - (h*c*e*p + c*(
h*e - 2*g*f)*(p + q + 1))*x^2, x], x], x] /; FreeQ[{a, c, d, e, f, g, h, q}, x] && NeQ[e^2 - 4*d*f, 0] && GtQ[
p, 0] && NeQ[p + q + 1, 0]

Rule 1045

Int[((g_) + (h_.)*(x_))/(((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_) + (f_.)*(x_)^2]), x_Symbol] :> Dist[-2*
g*(g*b - 2*a*h), Subst[Int[1/Simp[g*(g*b - 2*a*h)*(b^2 - 4*a*c) - b*d*x^2, x], x], x, Simp[g*b - 2*a*h - (b*h
- 2*g*c)*x, x]/Sqrt[d + f*x^2]], x] /; FreeQ[{a, b, c, d, f, g, h}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[b*h^2*d -
 2*g*h*(c*d - a*f) - g^2*b*f, 0]

Rule 1051

Int[((g_.) + (h_.)*(x_))/(((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_) + (f_.)*(x_)^2]), x_Symbol] :> With[{q
 = Rt[(c*d - a*f)^2 + b^2*d*f, 2]}, Dist[1/(2*q), Int[Simp[h*b*d - g*(c*d - a*f - q) + (h*(c*d - a*f + q) + g*
b*f)*x, x]/((a + b*x + c*x^2)*Sqrt[d + f*x^2]), x], x] - Dist[1/(2*q), Int[Simp[h*b*d - g*(c*d - a*f + q) + (h
*(c*d - a*f - q) + g*b*f)*x, x]/((a + b*x + c*x^2)*Sqrt[d + f*x^2]), x], x]] /; FreeQ[{a, b, c, d, f, g, h}, x
] && NeQ[b^2 - 4*a*c, 0] && NegQ[b^2 - 4*a*c]

Rule 1095

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

Rule 6874

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

Rubi steps

\begin {align*} \int \frac {x^2 \left (2-\sqrt {1+x^2}\right )}{\sqrt {1+x^2} \left (1-x^3+\left (1+x^2\right )^{3/2}\right )} \, dx &=\int \left (-\frac {x^2}{1-x^3+\sqrt {1+x^2}+x^2 \sqrt {1+x^2}}-\frac {2 x^2}{\sqrt {1+x^2} \left (-1+x^3-\left (1+x^2\right )^{3/2}\right )}\right ) \, dx\\ &=-\left (2 \int \frac {x^2}{\sqrt {1+x^2} \left (-1+x^3-\left (1+x^2\right )^{3/2}\right )} \, dx\right )-\int \frac {x^2}{1-x^3+\sqrt {1+x^2}+x^2 \sqrt {1+x^2}} \, dx\\ &=-\left (2 \int \left (-\frac {1}{3}+\frac {2}{9 \sqrt {1+x^2}}-\frac {x}{3 \sqrt {1+x^2}}+\frac {2 x}{3 \left (3+2 x+3 x^2\right )}+\frac {3+5 x}{9 \sqrt {1+x^2} \left (3+2 x+3 x^2\right )}\right ) \, dx\right )-\int \left (-\frac {2}{9}+\frac {x}{3}+\frac {\sqrt {1+x^2}}{3}+\frac {-3-5 x}{9 \left (3+2 x+3 x^2\right )}-\frac {2 x \sqrt {1+x^2}}{3 \left (3+2 x+3 x^2\right )}\right ) \, dx\\ &=\frac {8 x}{9}-\frac {x^2}{6}-\frac {1}{9} \int \frac {-3-5 x}{3+2 x+3 x^2} \, dx-\frac {2}{9} \int \frac {3+5 x}{\sqrt {1+x^2} \left (3+2 x+3 x^2\right )} \, dx-\frac {1}{3} \int \sqrt {1+x^2} \, dx-\frac {4}{9} \int \frac {1}{\sqrt {1+x^2}} \, dx+\frac {2}{3} \int \frac {x}{\sqrt {1+x^2}} \, dx+\frac {2}{3} \int \frac {x \sqrt {1+x^2}}{3+2 x+3 x^2} \, dx-\frac {4}{3} \int \frac {x}{3+2 x+3 x^2} \, dx\\ &=\frac {8 x}{9}-\frac {x^2}{6}+\frac {8 \sqrt {1+x^2}}{9}-\frac {1}{6} x \sqrt {1+x^2}-\frac {4}{9} \sinh ^{-1}(x)+\frac {1}{18} \int \frac {4-4 x}{\sqrt {1+x^2} \left (3+2 x+3 x^2\right )} \, dx-\frac {1}{18} \int \frac {16+16 x}{\sqrt {1+x^2} \left (3+2 x+3 x^2\right )} \, dx+\frac {5}{54} \int \frac {2+6 x}{3+2 x+3 x^2} \, dx+\frac {4}{27} \int \frac {1}{3+2 x+3 x^2} \, dx-\frac {1}{6} \int \frac {1}{\sqrt {1+x^2}} \, dx-\frac {2}{9} \int \frac {2+6 x}{3+2 x+3 x^2} \, dx+\frac {2}{9} \int -\frac {2 x^2}{\sqrt {1+x^2} \left (3+2 x+3 x^2\right )} \, dx+\frac {4}{9} \int \frac {1}{3+2 x+3 x^2} \, dx\\ &=\frac {8 x}{9}-\frac {x^2}{6}+\frac {8 \sqrt {1+x^2}}{9}-\frac {1}{6} x \sqrt {1+x^2}-\frac {11}{18} \sinh ^{-1}(x)-\frac {7}{54} \log \left (3+2 x+3 x^2\right )-\frac {8}{27} \text {Subst}\left (\int \frac {1}{-32-x^2} \, dx,x,2+6 x\right )-\frac {4}{9} \int \frac {x^2}{\sqrt {1+x^2} \left (3+2 x+3 x^2\right )} \, dx-\frac {8}{9} \text {Subst}\left (\int \frac {1}{-32-x^2} \, dx,x,2+6 x\right )-\frac {128}{9} \text {Subst}\left (\int \frac {1}{-4096-2 x^2} \, dx,x,\frac {32+32 x}{\sqrt {1+x^2}}\right )-\frac {1024}{9} \text {Subst}\left (\int \frac {1}{32768-2 x^2} \, dx,x,\frac {-64+64 x}{\sqrt {1+x^2}}\right )\\ &=\frac {8 x}{9}-\frac {x^2}{6}+\frac {8 \sqrt {1+x^2}}{9}-\frac {1}{6} x \sqrt {1+x^2}-\frac {11}{18} \sinh ^{-1}(x)+\frac {4}{27} \sqrt {2} \tan ^{-1}\left (\frac {1+3 x}{2 \sqrt {2}}\right )+\frac {1}{9} \sqrt {2} \tan ^{-1}\left (\frac {1+x}{\sqrt {2} \sqrt {1+x^2}}\right )+\frac {4}{9} \tanh ^{-1}\left (\frac {1-x}{2 \sqrt {1+x^2}}\right )-\frac {7}{54} \log \left (3+2 x+3 x^2\right )-\frac {4}{27} \int \frac {1}{\sqrt {1+x^2}} \, dx-\frac {4}{27} \int \frac {-3-2 x}{\sqrt {1+x^2} \left (3+2 x+3 x^2\right )} \, dx\\ &=\frac {8 x}{9}-\frac {x^2}{6}+\frac {8 \sqrt {1+x^2}}{9}-\frac {1}{6} x \sqrt {1+x^2}-\frac {41}{54} \sinh ^{-1}(x)+\frac {4}{27} \sqrt {2} \tan ^{-1}\left (\frac {1+3 x}{2 \sqrt {2}}\right )+\frac {1}{9} \sqrt {2} \tan ^{-1}\left (\frac {1+x}{\sqrt {2} \sqrt {1+x^2}}\right )+\frac {4}{9} \tanh ^{-1}\left (\frac {1-x}{2 \sqrt {1+x^2}}\right )-\frac {7}{54} \log \left (3+2 x+3 x^2\right )-\frac {1}{27} \int \frac {-10-10 x}{\sqrt {1+x^2} \left (3+2 x+3 x^2\right )} \, dx+\frac {1}{27} \int \frac {2-2 x}{\sqrt {1+x^2} \left (3+2 x+3 x^2\right )} \, dx\\ &=\frac {8 x}{9}-\frac {x^2}{6}+\frac {8 \sqrt {1+x^2}}{9}-\frac {1}{6} x \sqrt {1+x^2}-\frac {41}{54} \sinh ^{-1}(x)+\frac {4}{27} \sqrt {2} \tan ^{-1}\left (\frac {1+3 x}{2 \sqrt {2}}\right )+\frac {1}{9} \sqrt {2} \tan ^{-1}\left (\frac {1+x}{\sqrt {2} \sqrt {1+x^2}}\right )+\frac {4}{9} \tanh ^{-1}\left (\frac {1-x}{2 \sqrt {1+x^2}}\right )-\frac {7}{54} \log \left (3+2 x+3 x^2\right )-\frac {64}{27} \text {Subst}\left (\int \frac {1}{-1024-2 x^2} \, dx,x,\frac {16+16 x}{\sqrt {1+x^2}}\right )-\frac {800}{27} \text {Subst}\left (\int \frac {1}{12800-2 x^2} \, dx,x,\frac {40-40 x}{\sqrt {1+x^2}}\right )\\ &=\frac {8 x}{9}-\frac {x^2}{6}+\frac {8 \sqrt {1+x^2}}{9}-\frac {1}{6} x \sqrt {1+x^2}-\frac {41}{54} \sinh ^{-1}(x)+\frac {4}{27} \sqrt {2} \tan ^{-1}\left (\frac {1+3 x}{2 \sqrt {2}}\right )+\frac {4}{27} \sqrt {2} \tan ^{-1}\left (\frac {1+x}{\sqrt {2} \sqrt {1+x^2}}\right )+\frac {7}{27} \tanh ^{-1}\left (\frac {1-x}{2 \sqrt {1+x^2}}\right )-\frac {7}{54} \log \left (3+2 x+3 x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.34, size = 104, normalized size = 0.76 \begin {gather*} \frac {1}{54} \left (48 x-9 x^2+48 \sqrt {1+x^2}-9 x \sqrt {1+x^2}+16 \sqrt {2} \tan ^{-1}\left (\frac {1+x-\sqrt {1+x^2}}{\sqrt {2}}\right )-55 \tanh ^{-1}\left (\frac {x}{\sqrt {1+x^2}}\right )-14 \log \left (-2-x-x^2+(1+x) \sqrt {1+x^2}\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(48*x - 9*x^2 + 48*Sqrt[1 + x^2] - 9*x*Sqrt[1 + x^2] + 16*Sqrt[2]*ArcTan[(1 + x - Sqrt[1 + x^2])/Sqrt[2]] - 55
*ArcTanh[x/Sqrt[1 + x^2]] - 14*Log[-2 - x - x^2 + (1 + x)*Sqrt[1 + x^2]])/54

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(655\) vs. \(2(99)=198\).
time = 0.03, size = 656, normalized size = 4.82 \[-\frac {x^{2}}{6}+\frac {8 x}{9}-\frac {7 \ln \left (3 x^{2}+2 x +3\right )}{54}+\frac {4 \sqrt {2}\, \arctan \left (\frac {\left (6 x +2\right ) \sqrt {2}}{8}\right )}{27}-\frac {41 \arcsinh \left (x \right )}{54}+\frac {\sqrt {2}\, \sqrt {\frac {2 \left (1+x \right )^{2}}{\left (1-x \right )^{2}}+2}\, \left (\sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \sqrt {\frac {2 \left (1+x \right )^{2}}{\left (1-x \right )^{2}}+2}\, \left (1+x \right )}{2 \left (\frac {\left (1+x \right )^{2}}{\left (1-x \right )^{2}}+1\right ) \left (1-x \right )}\right )-5 \arctanh \left (\sqrt {\frac {2 \left (1+x \right )^{2}}{\left (1-x \right )^{2}}+2}\right )\right )}{12 \sqrt {\frac {\frac {\left (1+x \right )^{2}}{\left (1-x \right )^{2}}+1}{\left (\frac {1+x}{1-x}+1\right )^{2}}}\, \left (\frac {1+x}{1-x}+1\right )}-\frac {3 \sqrt {2}\, \sqrt {\frac {2 \left (1+x \right )^{2}}{\left (1-x \right )^{2}}+2}\, \left (\sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \sqrt {\frac {2 \left (1+x \right )^{2}}{\left (1-x \right )^{2}}+2}\, \left (1+x \right )}{2 \left (\frac {\left (1+x \right )^{2}}{\left (1-x \right )^{2}}+1\right ) \left (1-x \right )}\right )-\arctanh \left (\sqrt {\frac {2 \left (1+x \right )^{2}}{\left (1-x \right )^{2}}+2}\right )\right )}{8 \sqrt {\frac {\frac {\left (1+x \right )^{2}}{\left (1-x \right )^{2}}+1}{\left (\frac {1+x}{1-x}+1\right )^{2}}}\, \left (\frac {1+x}{1-x}+1\right )}-\frac {x \sqrt {x^{2}+1}}{6}+\frac {8 \sqrt {x^{2}+1}}{9}+\frac {\sqrt {2}\, \sqrt {\frac {2 \left (1+x \right )^{2}}{\left (1-x \right )^{2}}+2}\, \left (13 \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \sqrt {\frac {2 \left (1+x \right )^{2}}{\left (1-x \right )^{2}}+2}\, \left (1+x \right )}{2 \left (\frac {\left (1+x \right )^{2}}{\left (1-x \right )^{2}}+1\right ) \left (1-x \right )}\right )+43 \arctanh \left (\sqrt {\frac {2 \left (1+x \right )^{2}}{\left (1-x \right )^{2}}+2}\right )\right )}{216 \sqrt {\frac {\frac {\left (1+x \right )^{2}}{\left (1-x \right )^{2}}+1}{\left (\frac {1+x}{1-x}+1\right )^{2}}}\, \left (\frac {1+x}{1-x}+1\right )}+\frac {\sqrt {2}\, \sqrt {\frac {2 \left (1+x \right )^{2}}{\left (1-x \right )^{2}}+2}\, \left (11 \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \sqrt {\frac {2 \left (1+x \right )^{2}}{\left (1-x \right )^{2}}+2}\, \left (1+x \right )}{2 \left (\frac {\left (1+x \right )^{2}}{\left (1-x \right )^{2}}+1\right ) \left (1-x \right )}\right )-\arctanh \left (\sqrt {\frac {2 \left (1+x \right )^{2}}{\left (1-x \right )^{2}}+2}\right )\right )}{36 \sqrt {\frac {\frac {\left (1+x \right )^{2}}{\left (1-x \right )^{2}}+1}{\left (\frac {1+x}{1-x}+1\right )^{2}}}\, \left (\frac {1+x}{1-x}+1\right )}\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/6*x^2+8/9*x-7/54*ln(3*x^2+2*x+3)+4/27*2^(1/2)*arctan(1/8*(6*x+2)*2^(1/2))-41/54*arcsinh(x)+1/12*2^(1/2)*(2*
(1+x)^2/(1-x)^2+2)^(1/2)*(2^(1/2)*arctan(1/2*2^(1/2)*(2*(1+x)^2/(1-x)^2+2)^(1/2)/((1+x)^2/(1-x)^2+1)*(1+x)/(1-
x))-5*arctanh((2*(1+x)^2/(1-x)^2+2)^(1/2)))/(((1+x)^2/(1-x)^2+1)/((1+x)/(1-x)+1)^2)^(1/2)/((1+x)/(1-x)+1)-3/8*
2^(1/2)*(2*(1+x)^2/(1-x)^2+2)^(1/2)*(2^(1/2)*arctan(1/2*2^(1/2)*(2*(1+x)^2/(1-x)^2+2)^(1/2)/((1+x)^2/(1-x)^2+1
)*(1+x)/(1-x))-arctanh((2*(1+x)^2/(1-x)^2+2)^(1/2)))/(((1+x)^2/(1-x)^2+1)/((1+x)/(1-x)+1)^2)^(1/2)/((1+x)/(1-x
)+1)-1/6*x*(x^2+1)^(1/2)+8/9*(x^2+1)^(1/2)+1/216*2^(1/2)*(2*(1+x)^2/(1-x)^2+2)^(1/2)*(13*2^(1/2)*arctan(1/2*2^
(1/2)*(2*(1+x)^2/(1-x)^2+2)^(1/2)/((1+x)^2/(1-x)^2+1)*(1+x)/(1-x))+43*arctanh((2*(1+x)^2/(1-x)^2+2)^(1/2)))/((
(1+x)^2/(1-x)^2+1)/((1+x)/(1-x)+1)^2)^(1/2)/((1+x)/(1-x)+1)+1/36*2^(1/2)*(2*(1+x)^2/(1-x)^2+2)^(1/2)*(11*2^(1/
2)*arctan(1/2*2^(1/2)*(2*(1+x)^2/(1-x)^2+2)^(1/2)/((1+x)^2/(1-x)^2+1)*(1+x)/(1-x))-arctanh((2*(1+x)^2/(1-x)^2+
2)^(1/2)))/(((1+x)^2/(1-x)^2+1)/((1+x)/(1-x)+1)^2)^(1/2)/((1+x)/(1-x)+1)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*x/(x^2 + 1) + 1/2*arctan(x) + integrate(-1/2*(3*x^10 - 4*x^9 + 5*x^8 - 2*x^7 + 15*x^6 + 6*x^5 + 9*x^4)/(2
*x^13 + 7*x^11 - 4*x^10 + 11*x^9 - 11*x^8 + 13*x^7 - 13*x^6 + 11*x^5 - 11*x^4 + 4*x^3 - 7*x^2 - 2*(x^12 + 3*x^
10 - 2*x^9 + 3*x^8 - 6*x^7 + 2*x^6 - 6*x^5 + 3*x^4 - 2*x^3 + 3*x^2 + 1)*sqrt(x^2 + 1) - 2), x) + 1/6*log(x^2 +
 x + 1) + 1/6*log(x - 1)

________________________________________________________________________________________

Fricas [A]
time = 0.49, size = 170, normalized size = 1.25 \begin {gather*} -\frac {1}{6} \, x^{2} - \frac {1}{18} \, \sqrt {x^{2} + 1} {\left (3 \, x - 16\right )} + \frac {4}{27} \, \sqrt {2} \arctan \left (\frac {1}{4} \, \sqrt {2} {\left (3 \, x + 1\right )}\right ) + \frac {4}{27} \, \sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (3 \, x - 1\right )} + \frac {3}{2} \, \sqrt {2} \sqrt {x^{2} + 1}\right ) - \frac {4}{27} \, \sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (x + 1\right )} + \frac {1}{2} \, \sqrt {2} \sqrt {x^{2} + 1}\right ) + \frac {8}{9} \, x + \frac {7}{54} \, \log \left (3 \, x^{2} - \sqrt {x^{2} + 1} {\left (3 \, x - 1\right )} - x + 2\right ) - \frac {7}{54} \, \log \left (3 \, x^{2} + 2 \, x + 3\right ) - \frac {7}{54} \, \log \left (x^{2} - \sqrt {x^{2} + 1} {\left (x + 1\right )} + x + 2\right ) + \frac {41}{54} \, \log \left (-x + \sqrt {x^{2} + 1}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/6*x^2 - 1/18*sqrt(x^2 + 1)*(3*x - 16) + 4/27*sqrt(2)*arctan(1/4*sqrt(2)*(3*x + 1)) + 4/27*sqrt(2)*arctan(-1
/2*sqrt(2)*(3*x - 1) + 3/2*sqrt(2)*sqrt(x^2 + 1)) - 4/27*sqrt(2)*arctan(-1/2*sqrt(2)*(x + 1) + 1/2*sqrt(2)*sqr
t(x^2 + 1)) + 8/9*x + 7/54*log(3*x^2 - sqrt(x^2 + 1)*(3*x - 1) - x + 2) - 7/54*log(3*x^2 + 2*x + 3) - 7/54*log
(x^2 - sqrt(x^2 + 1)*(x + 1) + x + 2) + 41/54*log(-x + sqrt(x^2 + 1))

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [A]
time = 0.57, size = 176, normalized size = 1.29 \begin {gather*} -\frac {1}{6} \, x^{2} - \frac {1}{18} \, \sqrt {x^{2} + 1} {\left (3 \, x - 16\right )} + \frac {4}{27} \, \sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (3 \, x - 3 \, \sqrt {x^{2} + 1} - 1\right )}\right ) + \frac {4}{27} \, \sqrt {2} \arctan \left (\frac {1}{4} \, \sqrt {2} {\left (3 \, x + 1\right )}\right ) - \frac {4}{27} \, \sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (x - \sqrt {x^{2} + 1} + 1\right )}\right ) + \frac {8}{9} \, x + \frac {7}{54} \, \log \left (3 \, {\left (x - \sqrt {x^{2} + 1}\right )}^{2} - 2 \, x + 2 \, \sqrt {x^{2} + 1} + 1\right ) - \frac {7}{54} \, \log \left ({\left (x - \sqrt {x^{2} + 1}\right )}^{2} + 2 \, x - 2 \, \sqrt {x^{2} + 1} + 3\right ) - \frac {7}{54} \, \log \left (3 \, x^{2} + 2 \, x + 3\right ) + \frac {41}{54} \, \log \left (-x + \sqrt {x^{2} + 1}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/6*x^2 - 1/18*sqrt(x^2 + 1)*(3*x - 16) + 4/27*sqrt(2)*arctan(-1/2*sqrt(2)*(3*x - 3*sqrt(x^2 + 1) - 1)) + 4/2
7*sqrt(2)*arctan(1/4*sqrt(2)*(3*x + 1)) - 4/27*sqrt(2)*arctan(-1/2*sqrt(2)*(x - sqrt(x^2 + 1) + 1)) + 8/9*x +
7/54*log(3*(x - sqrt(x^2 + 1))^2 - 2*x + 2*sqrt(x^2 + 1) + 1) - 7/54*log((x - sqrt(x^2 + 1))^2 + 2*x - 2*sqrt(
x^2 + 1) + 3) - 7/54*log(3*x^2 + 2*x + 3) + 41/54*log(-x + sqrt(x^2 + 1))

________________________________________________________________________________________

Mupad [B]
time = 0.62, size = 216, normalized size = 1.59 \begin {gather*} \frac {8\,x}{9}-\frac {41\,\mathrm {asinh}\left (x\right )}{54}-\left (\frac {x}{6}-\frac {8}{9}\right )\,\sqrt {x^2+1}-\frac {x^2}{6}+\frac {\sqrt {2}\,\ln \left (x+\frac {1}{3}-\frac {\sqrt {2}\,2{}\mathrm {i}}{3}\right )\,\left (-\frac {16}{27}+\frac {\sqrt {2}\,14{}\mathrm {i}}{27}\right )\,1{}\mathrm {i}}{8}+\frac {\sqrt {2}\,\ln \left (x+\frac {1}{3}+\frac {\sqrt {2}\,2{}\mathrm {i}}{3}\right )\,\left (\frac {16}{27}+\frac {\sqrt {2}\,14{}\mathrm {i}}{27}\right )\,1{}\mathrm {i}}{8}+\frac {\sqrt {2}\,\left (\frac {4}{81}+\frac {\sqrt {2}\,44{}\mathrm {i}}{81}\right )\,\left (\ln \left (x+\frac {1}{3}+\frac {\sqrt {2}\,2{}\mathrm {i}}{3}\right )-\ln \left (1+\left (\frac {2}{3}+\frac {\sqrt {2}\,1{}\mathrm {i}}{3}\right )\,\sqrt {x^2+1}-\frac {x}{3}-\frac {\sqrt {2}\,x\,2{}\mathrm {i}}{3}\right )\right )\,1{}\mathrm {i}}{8\,\sqrt {{\left (\frac {1}{3}+\frac {\sqrt {2}\,2{}\mathrm {i}}{3}\right )}^2+1}}+\frac {\sqrt {2}\,\left (-\frac {4}{81}+\frac {\sqrt {2}\,44{}\mathrm {i}}{81}\right )\,\left (\ln \left (x+\frac {1}{3}-\frac {\sqrt {2}\,2{}\mathrm {i}}{3}\right )-\ln \left (1-\left (-\frac {2}{3}+\frac {\sqrt {2}\,1{}\mathrm {i}}{3}\right )\,\sqrt {x^2+1}-\frac {x}{3}+\frac {\sqrt {2}\,x\,2{}\mathrm {i}}{3}\right )\right )\,1{}\mathrm {i}}{8\,\sqrt {{\left (-\frac {1}{3}+\frac {\sqrt {2}\,2{}\mathrm {i}}{3}\right )}^2+1}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(8*x)/9 - (41*asinh(x))/54 - (x/6 - 8/9)*(x^2 + 1)^(1/2) - x^2/6 + (2^(1/2)*log(x - (2^(1/2)*2i)/3 + 1/3)*((2^
(1/2)*14i)/27 - 16/27)*1i)/8 + (2^(1/2)*log(x + (2^(1/2)*2i)/3 + 1/3)*((2^(1/2)*14i)/27 + 16/27)*1i)/8 + (2^(1
/2)*((2^(1/2)*44i)/81 + 4/81)*(log(x + (2^(1/2)*2i)/3 + 1/3) - log(((2^(1/2)*1i)/3 + 2/3)*(x^2 + 1)^(1/2) - x/
3 - (2^(1/2)*x*2i)/3 + 1))*1i)/(8*(((2^(1/2)*2i)/3 + 1/3)^2 + 1)^(1/2)) + (2^(1/2)*((2^(1/2)*44i)/81 - 4/81)*(
log(x - (2^(1/2)*2i)/3 + 1/3) - log((2^(1/2)*x*2i)/3 - ((2^(1/2)*1i)/3 - 2/3)*(x^2 + 1)^(1/2) - x/3 + 1))*1i)/
(8*(((2^(1/2)*2i)/3 - 1/3)^2 + 1)^(1/2))

________________________________________________________________________________________