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

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

Optimal result

Integrand size = 11, antiderivative size = 32 \[ \int \frac {x^2}{\sqrt {-1+x}} \, dx=2 \sqrt {-1+x}+\frac {4}{3} (-1+x)^{3/2}+\frac {2}{5} (-1+x)^{5/2} \]

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {45} \[ \int \frac {x^2}{\sqrt {-1+x}} \, dx=\frac {2}{5} (x-1)^{5/2}+\frac {4}{3} (x-1)^{3/2}+2 \sqrt {x-1} \]

[In]

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

[Out]

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

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {1}{\sqrt {-1+x}}+2 \sqrt {-1+x}+(-1+x)^{3/2}\right ) \, dx \\ & = 2 \sqrt {-1+x}+\frac {4}{3} (-1+x)^{3/2}+\frac {2}{5} (-1+x)^{5/2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.66 \[ \int \frac {x^2}{\sqrt {-1+x}} \, dx=\frac {2}{15} \sqrt {-1+x} \left (8+4 x+3 x^2\right ) \]

[In]

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

[Out]

(2*Sqrt[-1 + x]*(8 + 4*x + 3*x^2))/15

Maple [A] (verified)

Time = 0.15 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.53

method result size
trager \(\left (\frac {2}{5} x^{2}+\frac {8}{15} x +\frac {16}{15}\right ) \sqrt {-1+x}\) \(17\)
gosper \(\frac {2 \sqrt {-1+x}\, \left (3 x^{2}+4 x +8\right )}{15}\) \(18\)
risch \(\frac {2 \sqrt {-1+x}\, \left (3 x^{2}+4 x +8\right )}{15}\) \(18\)
derivativedivides \(\frac {4 \left (-1+x \right )^{\frac {3}{2}}}{3}+\frac {2 \left (-1+x \right )^{\frac {5}{2}}}{5}+2 \sqrt {-1+x}\) \(23\)
default \(\frac {4 \left (-1+x \right )^{\frac {3}{2}}}{3}+\frac {2 \left (-1+x \right )^{\frac {5}{2}}}{5}+2 \sqrt {-1+x}\) \(23\)
meijerg \(-\frac {\sqrt {-\operatorname {signum}\left (-1+x \right )}\, \left (-\frac {16 \sqrt {\pi }}{15}+\frac {\sqrt {\pi }\, \left (6 x^{2}+8 x +16\right ) \sqrt {1-x}}{15}\right )}{\sqrt {\pi }\, \sqrt {\operatorname {signum}\left (-1+x \right )}}\) \(48\)

[In]

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

[Out]

(2/5*x^2+8/15*x+16/15)*(-1+x)^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.53 \[ \int \frac {x^2}{\sqrt {-1+x}} \, dx=\frac {2}{15} \, {\left (3 \, x^{2} + 4 \, x + 8\right )} \sqrt {x - 1} \]

[In]

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

[Out]

2/15*(3*x^2 + 4*x + 8)*sqrt(x - 1)

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.73 (sec) , antiderivative size = 76, normalized size of antiderivative = 2.38 \[ \int \frac {x^2}{\sqrt {-1+x}} \, dx=\begin {cases} \frac {2 x^{2} \sqrt {x - 1}}{5} + \frac {8 x \sqrt {x - 1}}{15} + \frac {16 \sqrt {x - 1}}{15} & \text {for}\: \left |{x}\right | > 1 \\\frac {2 i x^{2} \sqrt {1 - x}}{5} + \frac {8 i x \sqrt {1 - x}}{15} + \frac {16 i \sqrt {1 - x}}{15} & \text {otherwise} \end {cases} \]

[In]

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

[Out]

Piecewise((2*x**2*sqrt(x - 1)/5 + 8*x*sqrt(x - 1)/15 + 16*sqrt(x - 1)/15, Abs(x) > 1), (2*I*x**2*sqrt(1 - x)/5
 + 8*I*x*sqrt(1 - x)/15 + 16*I*sqrt(1 - x)/15, True))

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.69 \[ \int \frac {x^2}{\sqrt {-1+x}} \, dx=\frac {2}{5} \, {\left (x - 1\right )}^{\frac {5}{2}} + \frac {4}{3} \, {\left (x - 1\right )}^{\frac {3}{2}} + 2 \, \sqrt {x - 1} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.59 \[ \int \frac {x^2}{\sqrt {-1+x}} \, dx=\frac {2\,\sqrt {x-1}\,\left (10\,x+3\,{\left (x-1\right )}^2+5\right )}{15} \]

[In]

int(x^2/(x - 1)^(1/2),x)

[Out]

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