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

Optimal. Leaf size=82 \[ -\frac {\tan ^{-1}\left (\frac {x+1}{\sqrt {3} \sqrt {x^2+2 x+5}}\right )}{4 \sqrt {3}}-\frac {\tanh ^{-1}\left (\frac {3 x+7}{\sqrt {13} \sqrt {x^2+2 x+5}}\right )}{12 \sqrt {13}}+\frac {1}{12} \tanh ^{-1}\left (\sqrt {x^2+2 x+5}\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.350, Rules used = {2074, 724, 206, 1025, 982, 204, 1024} \[ -\frac {\tan ^{-1}\left (\frac {x+1}{\sqrt {3} \sqrt {x^2+2 x+5}}\right )}{4 \sqrt {3}}-\frac {\tanh ^{-1}\left (\frac {3 x+7}{\sqrt {13} \sqrt {x^2+2 x+5}}\right )}{12 \sqrt {13}}+\frac {1}{12} \tanh ^{-1}\left (\sqrt {x^2+2 x+5}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

-ArcTan[(1 + x)/(Sqrt[3]*Sqrt[5 + 2*x + x^2])]/(4*Sqrt[3]) - ArcTanh[(7 + 3*x)/(Sqrt[13]*Sqrt[5 + 2*x + x^2])]
/(12*Sqrt[13]) + ArcTanh[Sqrt[5 + 2*x + x^2]]/12

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 724

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

Rule 982

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

Rule 1024

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

Rule 1025

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

Rule 2074

Int[(P_)^(p_)*(Q_)^(q_.), x_Symbol] :> With[{PP = Factor[P]}, Int[ExpandIntegrand[PP^p*Q^q, x], x] /;  !SumQ[N
onfreeFactors[PP, x]]] /; FreeQ[q, x] && PolyQ[P, x] && PolyQ[Q, x] && IntegerQ[p] && NeQ[P, x]

Rubi steps

\begin {align*} \int \frac {1}{\sqrt {5+2 x+x^2} \left (-8+x^3\right )} \, dx &=\int \left (\frac {1}{12 (-2+x) \sqrt {5+2 x+x^2}}+\frac {-4-x}{12 \left (4+2 x+x^2\right ) \sqrt {5+2 x+x^2}}\right ) \, dx\\ &=\frac {1}{12} \int \frac {1}{(-2+x) \sqrt {5+2 x+x^2}} \, dx+\frac {1}{12} \int \frac {-4-x}{\left (4+2 x+x^2\right ) \sqrt {5+2 x+x^2}} \, dx\\ &=-\left (\frac {1}{24} \int \frac {2+2 x}{\left (4+2 x+x^2\right ) \sqrt {5+2 x+x^2}} \, dx\right )-\frac {1}{6} \operatorname {Subst}\left (\int \frac {1}{52-x^2} \, dx,x,\frac {14+6 x}{\sqrt {5+2 x+x^2}}\right )-\frac {1}{4} \int \frac {1}{\left (4+2 x+x^2\right ) \sqrt {5+2 x+x^2}} \, dx\\ &=-\frac {\tanh ^{-1}\left (\frac {7+3 x}{\sqrt {13} \sqrt {5+2 x+x^2}}\right )}{12 \sqrt {13}}+\frac {1}{6} \operatorname {Subst}\left (\int \frac {1}{2-2 x^2} \, dx,x,\sqrt {5+2 x+x^2}\right )+\operatorname {Subst}\left (\int \frac {1}{-24-2 x^2} \, dx,x,\frac {2+2 x}{\sqrt {5+2 x+x^2}}\right )\\ &=-\frac {\tan ^{-1}\left (\frac {2+2 x}{2 \sqrt {3} \sqrt {5+2 x+x^2}}\right )}{4 \sqrt {3}}-\frac {\tanh ^{-1}\left (\frac {7+3 x}{\sqrt {13} \sqrt {5+2 x+x^2}}\right )}{12 \sqrt {13}}+\frac {1}{12} \tanh ^{-1}\left (\sqrt {5+2 x+x^2}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.36, size = 159, normalized size = 1.94 \[ \frac {1}{312} \left (-2 \sqrt {13} \tanh ^{-1}\left (\frac {3 x+7}{\sqrt {13} \sqrt {x^2+2 x+5}}\right )-13 \left (\left (\sqrt {3}+i\right ) \tan ^{-1}\left (\frac {2 \left (\sqrt [3]{-1}-2\right ) x+5 i \sqrt {3}+1}{\sqrt {2-2 i \sqrt {3}} \sqrt {x^2+2 x+5}}\right )+\left (\sqrt {3}-i\right ) \tan ^{-1}\left (\frac {-2 \left (2+(-1)^{2/3}\right ) x-5 i \sqrt {3}+1}{\sqrt {2+2 i \sqrt {3}} \sqrt {x^2+2 x+5}}\right )\right )\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

(-13*((I + Sqrt[3])*ArcTan[(1 + (5*I)*Sqrt[3] + 2*(-2 + (-1)^(1/3))*x)/(Sqrt[2 - (2*I)*Sqrt[3]]*Sqrt[5 + 2*x +
 x^2])] + (-I + Sqrt[3])*ArcTan[(1 - (5*I)*Sqrt[3] - 2*(2 + (-1)^(2/3))*x)/(Sqrt[2 + (2*I)*Sqrt[3]]*Sqrt[5 + 2
*x + x^2])]) - 2*Sqrt[13]*ArcTanh[(7 + 3*x)/(Sqrt[13]*Sqrt[5 + 2*x + x^2])])/312

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.36, size = 119, normalized size = 1.45 \[ \frac {\tan ^{-1}\left (\frac {x^2}{\sqrt {3}}-\frac {(x+1) \sqrt {x^2+2 x+5}}{\sqrt {3}}+\frac {2 x}{\sqrt {3}}+\frac {4}{\sqrt {3}}\right )}{4 \sqrt {3}}+\frac {1}{12} \tanh ^{-1}\left (\sqrt {x^2+2 x+5}\right )-\frac {\tanh ^{-1}\left (\frac {\sqrt {x^2+2 x+5}}{\sqrt {13}}-\frac {x}{\sqrt {13}}+\frac {2}{\sqrt {13}}\right )}{6 \sqrt {13}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

ArcTan[4/Sqrt[3] + (2*x)/Sqrt[3] + x^2/Sqrt[3] - ((1 + x)*Sqrt[5 + 2*x + x^2])/Sqrt[3]]/(4*Sqrt[3]) + ArcTanh[
Sqrt[5 + 2*x + x^2]]/12 - ArcTanh[2/Sqrt[13] - x/Sqrt[13] + Sqrt[5 + 2*x + x^2]/Sqrt[13]]/(6*Sqrt[13])

________________________________________________________________________________________

fricas [B]  time = 1.00, size = 151, normalized size = 1.84 \[ \frac {1}{12} \, \sqrt {3} \arctan \left (-\frac {1}{3} \, \sqrt {3} {\left (x + 2\right )} + \frac {1}{3} \, \sqrt {3} \sqrt {x^{2} + 2 \, x + 5}\right ) - \frac {1}{12} \, \sqrt {3} \arctan \left (-\frac {1}{3} \, \sqrt {3} x + \frac {1}{3} \, \sqrt {3} \sqrt {x^{2} + 2 \, x + 5}\right ) + \frac {1}{156} \, \sqrt {13} \log \left (\frac {\sqrt {13} {\left (3 \, x + 7\right )} + \sqrt {x^{2} + 2 \, x + 5} {\left (3 \, \sqrt {13} - 13\right )} - 9 \, x - 21}{x - 2}\right ) - \frac {1}{24} \, \log \left (x^{2} - \sqrt {x^{2} + 2 \, x + 5} {\left (x + 2\right )} + 3 \, x + 6\right ) + \frac {1}{24} \, \log \left (x^{2} - \sqrt {x^{2} + 2 \, x + 5} x + x + 4\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/12*sqrt(3)*arctan(-1/3*sqrt(3)*(x + 2) + 1/3*sqrt(3)*sqrt(x^2 + 2*x + 5)) - 1/12*sqrt(3)*arctan(-1/3*sqrt(3)
*x + 1/3*sqrt(3)*sqrt(x^2 + 2*x + 5)) + 1/156*sqrt(13)*log((sqrt(13)*(3*x + 7) + sqrt(x^2 + 2*x + 5)*(3*sqrt(1
3) - 13) - 9*x - 21)/(x - 2)) - 1/24*log(x^2 - sqrt(x^2 + 2*x + 5)*(x + 2) + 3*x + 6) + 1/24*log(x^2 - sqrt(x^
2 + 2*x + 5)*x + x + 4)

________________________________________________________________________________________

giac [B]  time = 0.72, size = 164, normalized size = 2.00 \[ \frac {1}{12} \, \sqrt {3} \arctan \left (-\frac {1}{3} \, \sqrt {3} {\left (x - \sqrt {x^{2} + 2 \, x + 5} + 2\right )}\right ) - \frac {1}{12} \, \sqrt {3} \arctan \left (-\frac {1}{3} \, \sqrt {3} {\left (x - \sqrt {x^{2} + 2 \, x + 5}\right )}\right ) + \frac {1}{156} \, \sqrt {13} \log \left (\frac {{\left | -2 \, x - 2 \, \sqrt {13} + 2 \, \sqrt {x^{2} + 2 \, x + 5} + 4 \right |}}{{\left | -2 \, x + 2 \, \sqrt {13} + 2 \, \sqrt {x^{2} + 2 \, x + 5} + 4 \right |}}\right ) - \frac {1}{24} \, \log \left ({\left (x - \sqrt {x^{2} + 2 \, x + 5}\right )}^{2} + 4 \, x - 4 \, \sqrt {x^{2} + 2 \, x + 5} + 7\right ) + \frac {1}{24} \, \log \left ({\left (x - \sqrt {x^{2} + 2 \, x + 5}\right )}^{2} + 3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/12*sqrt(3)*arctan(-1/3*sqrt(3)*(x - sqrt(x^2 + 2*x + 5) + 2)) - 1/12*sqrt(3)*arctan(-1/3*sqrt(3)*(x - sqrt(x
^2 + 2*x + 5))) + 1/156*sqrt(13)*log(abs(-2*x - 2*sqrt(13) + 2*sqrt(x^2 + 2*x + 5) + 4)/abs(-2*x + 2*sqrt(13)
+ 2*sqrt(x^2 + 2*x + 5) + 4)) - 1/24*log((x - sqrt(x^2 + 2*x + 5))^2 + 4*x - 4*sqrt(x^2 + 2*x + 5) + 7) + 1/24
*log((x - sqrt(x^2 + 2*x + 5))^2 + 3)

________________________________________________________________________________________

maple [A]  time = 0.58, size = 69, normalized size = 0.84




method result size



default \(\frac {\arctanh \left (\sqrt {x^{2}+2 x +5}\right )}{12}-\frac {\sqrt {3}\, \arctan \left (\frac {\sqrt {3}\, \left (2 x +2\right )}{6 \sqrt {x^{2}+2 x +5}}\right )}{12}-\frac {\sqrt {13}\, \arctanh \left (\frac {\left (14+6 x \right ) \sqrt {13}}{26 \sqrt {\left (-2+x \right )^{2}+1+6 x}}\right )}{156}\) \(69\)
trager \(\RootOf \left (144 \textit {\_Z}^{2}-12 \textit {\_Z} +1\right ) \ln \left (-\frac {-2880 \RootOf \left (144 \textit {\_Z}^{2}-12 \textit {\_Z} +1\right )^{2} x +126 \RootOf \left (144 \textit {\_Z}^{2}-12 \textit {\_Z} +1\right ) \sqrt {x^{2}+2 x +5}+306 \RootOf \left (144 \textit {\_Z}^{2}-12 \textit {\_Z} +1\right ) x -8 \sqrt {x^{2}+2 x +5}+570 \RootOf \left (144 \textit {\_Z}^{2}-12 \textit {\_Z} +1\right )-7 x -19}{12 \RootOf \left (144 \textit {\_Z}^{2}-12 \textit {\_Z} +1\right ) x -x -2}\right )+\frac {\ln \left (\frac {5760 \RootOf \left (144 \textit {\_Z}^{2}-12 \textit {\_Z} +1\right )^{2} x +252 \RootOf \left (144 \textit {\_Z}^{2}-12 \textit {\_Z} +1\right ) \sqrt {x^{2}+2 x +5}-348 \RootOf \left (144 \textit {\_Z}^{2}-12 \textit {\_Z} +1\right ) x -5 \sqrt {x^{2}+2 x +5}+1140 \RootOf \left (144 \textit {\_Z}^{2}-12 \textit {\_Z} +1\right )+3 x -57}{6 \RootOf \left (144 \textit {\_Z}^{2}-12 \textit {\_Z} +1\right ) x +1}\right )}{12}-\ln \left (\frac {5760 \RootOf \left (144 \textit {\_Z}^{2}-12 \textit {\_Z} +1\right )^{2} x +252 \RootOf \left (144 \textit {\_Z}^{2}-12 \textit {\_Z} +1\right ) \sqrt {x^{2}+2 x +5}-348 \RootOf \left (144 \textit {\_Z}^{2}-12 \textit {\_Z} +1\right ) x -5 \sqrt {x^{2}+2 x +5}+1140 \RootOf \left (144 \textit {\_Z}^{2}-12 \textit {\_Z} +1\right )+3 x -57}{6 \RootOf \left (144 \textit {\_Z}^{2}-12 \textit {\_Z} +1\right ) x +1}\right ) \RootOf \left (144 \textit {\_Z}^{2}-12 \textit {\_Z} +1\right )-\frac {\RootOf \left (\textit {\_Z}^{2}-13\right ) \ln \left (-\frac {3 \RootOf \left (\textit {\_Z}^{2}-13\right ) x +13 \sqrt {x^{2}+2 x +5}+7 \RootOf \left (\textit {\_Z}^{2}-13\right )}{-2+x}\right )}{156}\) \(388\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/12*arctanh((x^2+2*x+5)^(1/2))-1/12*3^(1/2)*arctan(1/6*3^(1/2)/(x^2+2*x+5)^(1/2)*(2*x+2))-1/156*13^(1/2)*arct
anh(1/26*(14+6*x)*13^(1/2)/((-2+x)^2+1+6*x)^(1/2))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{{\left (x^{3} - 8\right )} \sqrt {x^{2} + 2 \, x + 5}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {1}{\left (x^3-8\right )\,\sqrt {x^2+2\,x+5}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\left (x - 2\right ) \left (x^{2} + 2 x + 4\right ) \sqrt {x^{2} + 2 x + 5}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________