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

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

________________________________________________________________________________________

Rubi [A]  time = 1.50, 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 = {6742, 195, 215, 634, 618, 204, 628, 1020, 12, 1081, 1037, 1031, 206, 261} \[ -\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 {4}{27} \sqrt {2} \tan ^{-1}\left (\frac {x+1}{\sqrt {2} \sqrt {x^2+1}}\right )+\frac {7}{27} \tanh ^{-1}\left (\frac {1-x}{2 \sqrt {x^2+1}}\right )+\frac {8 x}{9}+\frac {4}{27} \sqrt {2} \tan ^{-1}\left (\frac {3 x+1}{2 \sqrt {2}}\right )-\frac {41}{54} \sinh ^{-1}(x) \]

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 195

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 204

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

Rule 206

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

Rule 215

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

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 628

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 634

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 1020

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 1031

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 1037

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 1081

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 6742

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} \operatorname {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} \operatorname {Subst}\left (\int \frac {1}{-32-x^2} \, dx,x,2+6 x\right )-\frac {128}{9} \operatorname {Subst}\left (\int \frac {1}{-4096-2 x^2} \, dx,x,\frac {32+32 x}{\sqrt {1+x^2}}\right )-\frac {1024}{9} \operatorname {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} \operatorname {Subst}\left (\int \frac {1}{-1024-2 x^2} \, dx,x,\frac {16+16 x}{\sqrt {1+x^2}}\right )-\frac {800}{27} \operatorname {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 [C]  time = 1.01, size = 261, normalized size = 1.92 \[ \frac {1}{162} \left (-27 x^2-27 \sqrt {x^2+1} x+144 \sqrt {x^2+1}-21 \log \left (3 x^2+2 x+3\right )+\sqrt {1-2 i \sqrt {2}} \left (11 \sqrt {2}-i\right ) \tanh ^{-1}\left (\frac {-2 i \sqrt {2} x-x+3}{\sqrt {2+4 i \sqrt {2}} \sqrt {x^2+1}}\right )+11 \sqrt {2+4 i \sqrt {2}} \tanh ^{-1}\left (\frac {2 i \sqrt {2} x-x+3}{\sqrt {2-4 i \sqrt {2}} \sqrt {x^2+1}}\right )+i \sqrt {1+2 i \sqrt {2}} \tanh ^{-1}\left (\frac {2 i \sqrt {2} x-x+3}{\sqrt {2-4 i \sqrt {2}} \sqrt {x^2+1}}\right )+144 x+24 \sqrt {2} \tan ^{-1}\left (\frac {3 x+1}{2 \sqrt {2}}\right )-123 \sinh ^{-1}(x)\right ) \]

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]

(144*x - 27*x^2 + 144*Sqrt[1 + x^2] - 27*x*Sqrt[1 + x^2] - 123*ArcSinh[x] + 24*Sqrt[2]*ArcTan[(1 + 3*x)/(2*Sqr
t[2])] + Sqrt[1 - (2*I)*Sqrt[2]]*(-I + 11*Sqrt[2])*ArcTanh[(3 - x - (2*I)*Sqrt[2]*x)/(Sqrt[2 + (4*I)*Sqrt[2]]*
Sqrt[1 + x^2])] + I*Sqrt[1 + (2*I)*Sqrt[2]]*ArcTanh[(3 - x + (2*I)*Sqrt[2]*x)/(Sqrt[2 - (4*I)*Sqrt[2]]*Sqrt[1
+ x^2])] + 11*Sqrt[2 + (4*I)*Sqrt[2]]*ArcTanh[(3 - x + (2*I)*Sqrt[2]*x)/(Sqrt[2 - (4*I)*Sqrt[2]]*Sqrt[1 + x^2]
)] - 21*Log[3 + 2*x + 3*x^2])/162

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.32, size = 117, normalized size = 0.86 \[ \frac {1}{18} \sqrt {x^2+1} (16-3 x)+\frac {1}{18} \left (16 x-3 x^2\right )+\frac {55}{54} \log \left (\sqrt {x^2+1}-x\right )-\frac {7}{27} \log \left (-x^2+(x+1) \sqrt {x^2+1}-x-2\right )+\frac {8}{27} \sqrt {2} \tan ^{-1}\left (-\frac {\sqrt {x^2+1}}{\sqrt {2}}+\frac {x}{\sqrt {2}}+\frac {1}{\sqrt {2}}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

(16*x - 3*x^2)/18 + ((16 - 3*x)*Sqrt[1 + x^2])/18 + (8*Sqrt[2]*ArcTan[1/Sqrt[2] + x/Sqrt[2] - Sqrt[1 + x^2]/Sq
rt[2]])/27 + (55*Log[-x + Sqrt[1 + x^2]])/54 - (7*Log[-2 - x - x^2 + (1 + x)*Sqrt[1 + x^2]])/27

________________________________________________________________________________________

fricas [A]  time = 0.68, size = 170, normalized size = 1.25 \[ -\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 ) \]

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

________________________________________________________________________________________

giac [A]  time = 0.67, size = 176, normalized size = 1.29 \[ -\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 ) \]

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

________________________________________________________________________________________

maple [B]  time = 0.05, size = 654, normalized size = 4.81 \[-\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 \relax (x )}{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 (1+\frac {1+x}{1-x}\right )^{2}}}\, \left (1+\frac {1+x}{1-x}\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 (1+\frac {1+x}{1-x}\right )^{2}}}\, \left (1+\frac {1+x}{1-x}\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 (1+\frac {1+x}{1-x}\right )^{2}}}\, \left (1+\frac {1+x}{1-x}\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 (1+\frac {1+x}{1-x}\right )^{2}}}\, \left (1+\frac {1+x}{1-x}\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+(1+x)/(1-x))^2)^(1/2)/(1+(1+x)/(1-x))+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+(1+x)/(1-x))^2)^(1/2)/(1+(1+x)/
(1-x))-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+(1+x)/(1-x))^2)^(1/2)/(1+(1+x)/(1-x))-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+(1+x)/(1-x))^2)^(1/2)/(1+(1+x)/(1-x))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ -\frac {x}{2 \, {\left (x^{2} + 1\right )}} + \frac {1}{2} \, \arctan \relax (x) + \int -\frac {3 \, x^{10} - 4 \, x^{9} + 5 \, x^{8} - 2 \, x^{7} + 15 \, x^{6} + 6 \, x^{5} + 9 \, x^{4}}{2 \, {\left (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 \, {\left (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\right )} \sqrt {x^{2} + 1} - 2\right )}}\,{d x} + \frac {1}{6} \, \log \left (x^{2} + x + 1\right ) + \frac {1}{6} \, \log \left (x - 1\right ) \]

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)

________________________________________________________________________________________

mupad [B]  time = 0.62, size = 216, normalized size = 1.59 \[ \frac {8\,x}{9}-\frac {41\,\mathrm {asinh}\relax (x)}{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}} \]

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

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

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

________________________________________________________________________________________