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

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

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

[Out]

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

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.67, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {2092, 2089, 65, 212} \[ \int \frac {1}{\sqrt {3-5 x+x^2+x^3}} \, dx=\frac {(1-x) \sqrt {x+3} \text {arctanh}\left (\frac {\sqrt {x+3}}{2}\right )}{\sqrt {x^3+x^2-5 x+3}} \]

[In]

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

[Out]

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

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

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 2089

Int[((a_.) + (b_.)*(x_) + (d_.)*(x_)^3)^(p_), x_Symbol] :> Dist[(a + b*x + d*x^3)^p/((3*a - b*x)^p*(3*a + 2*b*
x)^(2*p)), Int[(3*a - b*x)^p*(3*a + 2*b*x)^(2*p), x], x] /; FreeQ[{a, b, d, p}, x] && EqQ[4*b^3 + 27*a^2*d, 0]
 &&  !IntegerQ[p]

Rule 2092

Int[(P3_)^(p_), x_Symbol] :> With[{a = Coeff[P3, x, 0], b = Coeff[P3, x, 1], c = Coeff[P3, x, 2], d = Coeff[P3
, x, 3]}, Subst[Int[Simp[(2*c^3 - 9*b*c*d + 27*a*d^2)/(27*d^2) - (c^2 - 3*b*d)*(x/(3*d)) + d*x^3, x]^p, x], x,
 x + c/(3*d)] /; NeQ[c, 0]] /; FreeQ[p, x] && PolyQ[P3, x, 3]

Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {1}{\sqrt {\frac {128}{27}-\frac {16 x}{3}+x^3}} \, dx,x,\frac {1}{3}+x\right ) \\ & = \frac {\left (128 (1-x) \sqrt {3+x}\right ) \text {Subst}\left (\int \frac {1}{\left (\frac {128}{9}-\frac {32 x}{3}\right ) \sqrt {\frac {128}{9}+\frac {16 x}{3}}} \, dx,x,\frac {1}{3}+x\right )}{3 \sqrt {3} \sqrt {3-5 x+x^2+x^3}} \\ & = \frac {\left (16 (1-x) \sqrt {3+x}\right ) \text {Subst}\left (\int \frac {1}{\frac {128}{3}-2 x^2} \, dx,x,\frac {4 \sqrt {3+x}}{\sqrt {3}}\right )}{\sqrt {3} \sqrt {3-5 x+x^2+x^3}} \\ & = \frac {(1-x) \sqrt {3+x} \text {arctanh}\left (\frac {\sqrt {3+x}}{2}\right )}{\sqrt {3-5 x+x^2+x^3}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.54 \[ \int \frac {1}{\sqrt {3-5 x+x^2+x^3}} \, dx=-\frac {(-1+x) \sqrt {3+x} \text {arctanh}\left (\frac {\sqrt {3+x}}{2}\right )}{\sqrt {(-1+x)^2 (3+x)}} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.16 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.46

method result size
trager \(\frac {\ln \left (\frac {-x^{2}+4 \sqrt {x^{3}+x^{2}-5 x +3}-6 x +7}{\left (x -1\right )^{2}}\right )}{2}\) \(35\)
default \(-\frac {\left (x -1\right ) \sqrt {3+x}\, \left (\ln \left (\sqrt {3+x}+2\right )-\ln \left (\sqrt {3+x}-2\right )\right )}{2 \sqrt {x^{3}+x^{2}-5 x +3}}\) \(43\)

[In]

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

[Out]

1/2*ln((-x^2+4*(x^3+x^2-5*x+3)^(1/2)-6*x+7)/(x-1)^2)

Fricas [B] (verification not implemented)

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

Time = 0.26 (sec) , antiderivative size = 58, normalized size of antiderivative = 2.42 \[ \int \frac {1}{\sqrt {3-5 x+x^2+x^3}} \, dx=-\frac {1}{2} \, \log \left (\frac {2 \, x + \sqrt {x^{3} + x^{2} - 5 \, x + 3} - 2}{x - 1}\right ) + \frac {1}{2} \, \log \left (-\frac {2 \, x - \sqrt {x^{3} + x^{2} - 5 \, x + 3} - 2}{x - 1}\right ) \]

[In]

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

[Out]

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

Sympy [F]

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

[In]

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

[Out]

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

Maxima [F]

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.42 \[ \int \frac {1}{\sqrt {3-5 x+x^2+x^3}} \, dx=-\frac {\log \left (\sqrt {x + 3} + 2\right )}{2 \, \mathrm {sgn}\left (x - 1\right )} + \frac {\log \left ({\left | \sqrt {x + 3} - 2 \right |}\right )}{2 \, \mathrm {sgn}\left (x - 1\right )} \]

[In]

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

[Out]

-1/2*log(sqrt(x + 3) + 2)/sgn(x - 1) + 1/2*log(abs(sqrt(x + 3) - 2))/sgn(x - 1)

Mupad [F(-1)]

Timed out. \[ \int \frac {1}{\sqrt {3-5 x+x^2+x^3}} \, dx=\int \frac {1}{\sqrt {x^3+x^2-5\,x+3}} \,d x \]

[In]

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

[Out]

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