\(\int \frac {\sqrt {-81+27 x+135 x^2-150 x^3+65 x^4-13 x^5+x^6}}{-1+x} \, dx\) [2295]

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

Optimal result

Integrand size = 38, antiderivative size = 175 \[ \int \frac {\sqrt {-81+27 x+135 x^2-150 x^3+65 x^4-13 x^5+x^6}}{-1+x} \, dx=\frac {\left (115-62 x+8 x^2\right ) \sqrt {-81+27 x+135 x^2-150 x^3+65 x^4-13 x^5+x^6}}{24 (-3+x)^2}-8 \arctan \left (\frac {9-6 x+x^2}{-9+15 x-7 x^2+x^3-\sqrt {-81+27 x+135 x^2-150 x^3+65 x^4-13 x^5+x^6}}\right )+\frac {77}{8} \log (-3+x)-\frac {77}{16} \log \left (9-24 x+13 x^2-2 x^3+2 \sqrt {-81+27 x+135 x^2-150 x^3+65 x^4-13 x^5+x^6}\right ) \]

[Out]

1/24*(8*x^2-62*x+115)*(x^6-13*x^5+65*x^4-150*x^3+135*x^2+27*x-81)^(1/2)/(-3+x)^2-8*arctan((x^2-6*x+9)/(-9+15*x
-7*x^2+x^3-(x^6-13*x^5+65*x^4-150*x^3+135*x^2+27*x-81)^(1/2)))+77/8*ln(-3+x)-77/16*ln(9-24*x+13*x^2-2*x^3+2*(x
^6-13*x^5+65*x^4-150*x^3+135*x^2+27*x-81)^(1/2))

Rubi [A] (verified)

Time = 0.19 (sec) , antiderivative size = 208, normalized size of antiderivative = 1.19, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.237, Rules used = {6820, 6851, 1667, 828, 857, 635, 212, 738, 210} \[ \int \frac {\sqrt {-81+27 x+135 x^2-150 x^3+65 x^4-13 x^5+x^6}}{-1+x} \, dx=\frac {4 \sqrt {-(3-x)^4 \left (-x^2+x+1\right )} \arctan \left (\frac {3-x}{2 \sqrt {x^2-x-1}}\right )}{(3-x)^2 \sqrt {x^2-x-1}}-\frac {77 \sqrt {-(3-x)^4 \left (-x^2+x+1\right )} \text {arctanh}\left (\frac {1-2 x}{2 \sqrt {x^2-x-1}}\right )}{16 (3-x)^2 \sqrt {x^2-x-1}}+\frac {\sqrt {-(3-x)^4 \left (-x^2+x+1\right )} (41-18 x)}{8 (3-x)^2}-\frac {\left (-x^2+x+1\right ) \sqrt {-(3-x)^4 \left (-x^2+x+1\right )}}{3 (3-x)^2} \]

[In]

Int[Sqrt[-81 + 27*x + 135*x^2 - 150*x^3 + 65*x^4 - 13*x^5 + x^6]/(-1 + x),x]

[Out]

((41 - 18*x)*Sqrt[-((3 - x)^4*(1 + x - x^2))])/(8*(3 - x)^2) - ((1 + x - x^2)*Sqrt[-((3 - x)^4*(1 + x - x^2))]
)/(3*(3 - x)^2) + (4*Sqrt[-((3 - x)^4*(1 + x - x^2))]*ArcTan[(3 - x)/(2*Sqrt[-1 - x + x^2])])/((3 - x)^2*Sqrt[
-1 - x + x^2]) - (77*Sqrt[-((3 - x)^4*(1 + x - x^2))]*ArcTanh[(1 - 2*x)/(2*Sqrt[-1 - x + x^2])])/(16*(3 - x)^2
*Sqrt[-1 - x + x^2])

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 635

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

Rule 738

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 828

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

Rule 857

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

Rule 1667

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Expon[Pq
, x], f = Coeff[Pq, x, Expon[Pq, x]]}, Simp[f*(d + e*x)^(m + q - 1)*((a + b*x + c*x^2)^(p + 1)/(c*e^(q - 1)*(m
 + q + 2*p + 1))), x] + Dist[1/(c*e^q*(m + q + 2*p + 1)), Int[(d + e*x)^m*(a + b*x + c*x^2)^p*ExpandToSum[c*e^
q*(m + q + 2*p + 1)*Pq - c*f*(m + q + 2*p + 1)*(d + e*x)^q - f*(d + e*x)^(q - 2)*(b*d*e*(p + 1) + a*e^2*(m + q
 - 1) - c*d^2*(m + q + 2*p + 1) - e*(2*c*d - b*e)*(m + q + p)*x), x], x], x] /; GtQ[q, 1] && NeQ[m + q + 2*p +
 1, 0]] /; FreeQ[{a, b, c, d, e, m, p}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2
, 0] &&  !(IGtQ[m, 0] && RationalQ[a, b, c, d, e] && (IntegerQ[p] || ILtQ[p + 1/2, 0]))

Rule 6820

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

Rule 6851

Int[(u_.)*((a_.)*(v_)^(m_.)*(w_)^(n_.))^(p_), x_Symbol] :> Dist[a^IntPart[p]*((a*v^m*w^n)^FracPart[p]/(v^(m*Fr
acPart[p])*w^(n*FracPart[p]))), Int[u*v^(m*p)*w^(n*p), x], x] /; FreeQ[{a, m, n, p}, x] &&  !IntegerQ[p] &&  !
FreeQ[v, x] &&  !FreeQ[w, x]

Rubi steps \begin{align*} \text {integral}& = \int \frac {\sqrt {(-3+x)^4 \left (-1-x+x^2\right )}}{-1+x} \, dx \\ & = \frac {\sqrt {(-3+x)^4 \left (-1-x+x^2\right )} \int \frac {(-3+x)^2 \sqrt {-1-x+x^2}}{-1+x} \, dx}{(-3+x)^2 \sqrt {-1-x+x^2}} \\ & = -\frac {\left (1+x-x^2\right ) \sqrt {-(3-x)^4 \left (1+x-x^2\right )}}{3 (3-x)^2}+\frac {\sqrt {(-3+x)^4 \left (-1-x+x^2\right )} \int \frac {\left (\frac {51}{2}-\frac {27 x}{2}\right ) \sqrt {-1-x+x^2}}{-1+x} \, dx}{3 (-3+x)^2 \sqrt {-1-x+x^2}} \\ & = \frac {(41-18 x) \sqrt {-(3-x)^4 \left (1+x-x^2\right )}}{8 (3-x)^2}-\frac {\left (1+x-x^2\right ) \sqrt {-(3-x)^4 \left (1+x-x^2\right )}}{3 (3-x)^2}-\frac {\sqrt {(-3+x)^4 \left (-1-x+x^2\right )} \int \frac {\frac {423}{4}-\frac {231 x}{4}}{(-1+x) \sqrt {-1-x+x^2}} \, dx}{12 (-3+x)^2 \sqrt {-1-x+x^2}} \\ & = \frac {(41-18 x) \sqrt {-(3-x)^4 \left (1+x-x^2\right )}}{8 (3-x)^2}-\frac {\left (1+x-x^2\right ) \sqrt {-(3-x)^4 \left (1+x-x^2\right )}}{3 (3-x)^2}-\frac {\left (4 \sqrt {(-3+x)^4 \left (-1-x+x^2\right )}\right ) \int \frac {1}{(-1+x) \sqrt {-1-x+x^2}} \, dx}{(-3+x)^2 \sqrt {-1-x+x^2}}+\frac {\left (77 \sqrt {(-3+x)^4 \left (-1-x+x^2\right )}\right ) \int \frac {1}{\sqrt {-1-x+x^2}} \, dx}{16 (-3+x)^2 \sqrt {-1-x+x^2}} \\ & = \frac {(41-18 x) \sqrt {-(3-x)^4 \left (1+x-x^2\right )}}{8 (3-x)^2}-\frac {\left (1+x-x^2\right ) \sqrt {-(3-x)^4 \left (1+x-x^2\right )}}{3 (3-x)^2}+\frac {\left (8 \sqrt {(-3+x)^4 \left (-1-x+x^2\right )}\right ) \text {Subst}\left (\int \frac {1}{-4-x^2} \, dx,x,\frac {-3+x}{\sqrt {-1-x+x^2}}\right )}{(-3+x)^2 \sqrt {-1-x+x^2}}+\frac {\left (77 \sqrt {(-3+x)^4 \left (-1-x+x^2\right )}\right ) \text {Subst}\left (\int \frac {1}{4-x^2} \, dx,x,\frac {-1+2 x}{\sqrt {-1-x+x^2}}\right )}{8 (-3+x)^2 \sqrt {-1-x+x^2}} \\ & = \frac {(41-18 x) \sqrt {-(3-x)^4 \left (1+x-x^2\right )}}{8 (3-x)^2}-\frac {\left (1+x-x^2\right ) \sqrt {-(3-x)^4 \left (1+x-x^2\right )}}{3 (3-x)^2}+\frac {4 \sqrt {-(3-x)^4 \left (1+x-x^2\right )} \arctan \left (\frac {3-x}{2 \sqrt {-1-x+x^2}}\right )}{(3-x)^2 \sqrt {-1-x+x^2}}-\frac {77 \sqrt {-(3-x)^4 \left (1+x-x^2\right )} \text {arctanh}\left (\frac {1-2 x}{2 \sqrt {-1-x+x^2}}\right )}{16 (3-x)^2 \sqrt {-1-x+x^2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.17 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.61 \[ \int \frac {\sqrt {-81+27 x+135 x^2-150 x^3+65 x^4-13 x^5+x^6}}{-1+x} \, dx=\frac {(-3+x)^2 \sqrt {-1-x+x^2} \left (2 \sqrt {-1-x+x^2} \left (115-62 x+8 x^2\right )-384 \arctan \left (1-x+\sqrt {-1-x+x^2}\right )-231 \log \left (1-2 x+2 \sqrt {-1-x+x^2}\right )\right )}{48 \sqrt {(-3+x)^4 \left (-1-x+x^2\right )}} \]

[In]

Integrate[Sqrt[-81 + 27*x + 135*x^2 - 150*x^3 + 65*x^4 - 13*x^5 + x^6]/(-1 + x),x]

[Out]

((-3 + x)^2*Sqrt[-1 - x + x^2]*(2*Sqrt[-1 - x + x^2]*(115 - 62*x + 8*x^2) - 384*ArcTan[1 - x + Sqrt[-1 - x + x
^2]] - 231*Log[1 - 2*x + 2*Sqrt[-1 - x + x^2]]))/(48*Sqrt[(-3 + x)^4*(-1 - x + x^2)])

Maple [A] (verified)

Time = 3.20 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.58

method result size
risch \(\frac {\left (8 x^{2}-62 x +115\right ) \sqrt {\left (x^{2}-x -1\right ) \left (-3+x \right )^{4}}}{24 \left (-3+x \right )^{2}}+\frac {\left (\frac {77 \ln \left (-\frac {1}{2}+x +\sqrt {x^{2}-x -1}\right )}{16}-4 \arctan \left (\frac {-3+x}{2 \sqrt {\left (-1+x \right )^{2}-2+x}}\right )\right ) \sqrt {\left (x^{2}-x -1\right ) \left (-3+x \right )^{4}}}{\left (-3+x \right )^{2} \sqrt {x^{2}-x -1}}\) \(102\)
default \(\frac {\sqrt {x^{6}-13 x^{5}+65 x^{4}-150 x^{3}+135 x^{2}+27 x -81}\, \left (16 \left (x^{2}-x -1\right )^{\frac {3}{2}}-108 x \sqrt {x^{2}-x -1}+246 \sqrt {x^{2}-x -1}+231 \ln \left (-\frac {1}{2}+x +\sqrt {x^{2}-x -1}\right )-192 \arctan \left (\frac {-3+x}{2 \sqrt {x^{2}-x -1}}\right )\right )}{48 \left (-3+x \right )^{2} \sqrt {x^{2}-x -1}}\) \(120\)
trager \(\frac {\left (8 x^{2}-62 x +115\right ) \sqrt {x^{6}-13 x^{5}+65 x^{4}-150 x^{3}+135 x^{2}+27 x -81}}{24 \left (-3+x \right )^{2}}-\frac {77 \ln \left (\frac {9-24 x +13 x^{2}-2 x^{3}+2 \sqrt {x^{6}-13 x^{5}+65 x^{4}-150 x^{3}+135 x^{2}+27 x -81}}{\left (-3+x \right )^{2}}\right )}{16}-4 \operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) \ln \left (-\frac {-\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) x^{3}+9 \operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) x^{2}-27 \operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) x +2 \sqrt {x^{6}-13 x^{5}+65 x^{4}-150 x^{3}+135 x^{2}+27 x -81}+27 \operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right )}{\left (-1+x \right ) \left (-3+x \right )^{2}}\right )\) \(198\)

[In]

int((x^6-13*x^5+65*x^4-150*x^3+135*x^2+27*x-81)^(1/2)/(-1+x),x,method=_RETURNVERBOSE)

[Out]

1/24*(8*x^2-62*x+115)*((x^2-x-1)*(-3+x)^4)^(1/2)/(-3+x)^2+(77/16*ln(-1/2+x+(x^2-x-1)^(1/2))-4*arctan(1/2*(-3+x
)/((-1+x)^2-2+x)^(1/2)))*((x^2-x-1)*(-3+x)^4)^(1/2)/(-3+x)^2/(x^2-x-1)^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 202, normalized size of antiderivative = 1.15 \[ \int \frac {\sqrt {-81+27 x+135 x^2-150 x^3+65 x^4-13 x^5+x^6}}{-1+x} \, dx=-\frac {205 \, x^{2} + 1536 \, {\left (x^{2} - 6 \, x + 9\right )} \arctan \left (-\frac {x^{3} - 7 \, x^{2} + 15 \, x - \sqrt {x^{6} - 13 \, x^{5} + 65 \, x^{4} - 150 \, x^{3} + 135 \, x^{2} + 27 \, x - 81} - 9}{x^{2} - 6 \, x + 9}\right ) + 924 \, {\left (x^{2} - 6 \, x + 9\right )} \log \left (-\frac {2 \, x^{3} - 13 \, x^{2} + 24 \, x - 2 \, \sqrt {x^{6} - 13 \, x^{5} + 65 \, x^{4} - 150 \, x^{3} + 135 \, x^{2} + 27 \, x - 81} - 9}{x^{2} - 6 \, x + 9}\right ) - 8 \, \sqrt {x^{6} - 13 \, x^{5} + 65 \, x^{4} - 150 \, x^{3} + 135 \, x^{2} + 27 \, x - 81} {\left (8 \, x^{2} - 62 \, x + 115\right )} - 1230 \, x + 1845}{192 \, {\left (x^{2} - 6 \, x + 9\right )}} \]

[In]

integrate((x^6-13*x^5+65*x^4-150*x^3+135*x^2+27*x-81)^(1/2)/(-1+x),x, algorithm="fricas")

[Out]

-1/192*(205*x^2 + 1536*(x^2 - 6*x + 9)*arctan(-(x^3 - 7*x^2 + 15*x - sqrt(x^6 - 13*x^5 + 65*x^4 - 150*x^3 + 13
5*x^2 + 27*x - 81) - 9)/(x^2 - 6*x + 9)) + 924*(x^2 - 6*x + 9)*log(-(2*x^3 - 13*x^2 + 24*x - 2*sqrt(x^6 - 13*x
^5 + 65*x^4 - 150*x^3 + 135*x^2 + 27*x - 81) - 9)/(x^2 - 6*x + 9)) - 8*sqrt(x^6 - 13*x^5 + 65*x^4 - 150*x^3 +
135*x^2 + 27*x - 81)*(8*x^2 - 62*x + 115) - 1230*x + 1845)/(x^2 - 6*x + 9)

Sympy [F]

\[ \int \frac {\sqrt {-81+27 x+135 x^2-150 x^3+65 x^4-13 x^5+x^6}}{-1+x} \, dx=\int \frac {\sqrt {\left (x - 3\right )^{4} \left (x^{2} - x - 1\right )}}{x - 1}\, dx \]

[In]

integrate((x**6-13*x**5+65*x**4-150*x**3+135*x**2+27*x-81)**(1/2)/(-1+x),x)

[Out]

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

Maxima [F]

\[ \int \frac {\sqrt {-81+27 x+135 x^2-150 x^3+65 x^4-13 x^5+x^6}}{-1+x} \, dx=\int { \frac {\sqrt {x^{6} - 13 \, x^{5} + 65 \, x^{4} - 150 \, x^{3} + 135 \, x^{2} + 27 \, x - 81}}{x - 1} \,d x } \]

[In]

integrate((x^6-13*x^5+65*x^4-150*x^3+135*x^2+27*x-81)^(1/2)/(-1+x),x, algorithm="maxima")

[Out]

integrate(sqrt(x^6 - 13*x^5 + 65*x^4 - 150*x^3 + 135*x^2 + 27*x - 81)/(x - 1), x)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.35 \[ \int \frac {\sqrt {-81+27 x+135 x^2-150 x^3+65 x^4-13 x^5+x^6}}{-1+x} \, dx=\frac {1}{24} \, {\left (2 \, {\left (4 \, x - 31\right )} x + 115\right )} \sqrt {x^{2} - x - 1} - 8 \, \arctan \left (-x + \sqrt {x^{2} - x - 1} + 1\right ) - \frac {77}{16} \, \log \left ({\left | -2 \, x + 2 \, \sqrt {x^{2} - x - 1} + 1 \right |}\right ) \]

[In]

integrate((x^6-13*x^5+65*x^4-150*x^3+135*x^2+27*x-81)^(1/2)/(-1+x),x, algorithm="giac")

[Out]

1/24*(2*(4*x - 31)*x + 115)*sqrt(x^2 - x - 1) - 8*arctan(-x + sqrt(x^2 - x - 1) + 1) - 77/16*log(abs(-2*x + 2*
sqrt(x^2 - x - 1) + 1))

Mupad [F(-1)]

Timed out. \[ \int \frac {\sqrt {-81+27 x+135 x^2-150 x^3+65 x^4-13 x^5+x^6}}{-1+x} \, dx=\int \frac {\sqrt {x^6-13\,x^5+65\,x^4-150\,x^3+135\,x^2+27\,x-81}}{x-1} \,d x \]

[In]

int((27*x + 135*x^2 - 150*x^3 + 65*x^4 - 13*x^5 + x^6 - 81)^(1/2)/(x - 1),x)

[Out]

int((27*x + 135*x^2 - 150*x^3 + 65*x^4 - 13*x^5 + x^6 - 81)^(1/2)/(x - 1), x)