\(\int \sqrt {-x} (\sqrt {-x}+x) \, dx\) [693]

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

Optimal result

Integrand size = 17, antiderivative size = 19 \[ \int \sqrt {-x} \left (\sqrt {-x}+x\right ) \, dx=\frac {2}{5} (-x)^{5/2}-\frac {x^2}{2} \]

[Out]

2/5*(-x)^(5/2)-1/2*x^2

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 19, 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.059, Rules used = {14} \[ \int \sqrt {-x} \left (\sqrt {-x}+x\right ) \, dx=\frac {2}{5} (-x)^{5/2}-\frac {x^2}{2} \]

[In]

Int[Sqrt[-x]*(Sqrt[-x] + x),x]

[Out]

(2*(-x)^(5/2))/5 - x^2/2

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

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

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.95 \[ \int \sqrt {-x} \left (\sqrt {-x}+x\right ) \, dx=\frac {1}{10} \left (-5+4 \sqrt {-x}\right ) x^2 \]

[In]

Integrate[Sqrt[-x]*(Sqrt[-x] + x),x]

[Out]

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

Maple [A] (verified)

Time = 0.04 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.74

method result size
derivativedivides \(\frac {2 \left (-x \right )^{\frac {5}{2}}}{5}-\frac {x^{2}}{2}\) \(14\)
default \(\frac {2 \left (-x \right )^{\frac {5}{2}}}{5}-\frac {x^{2}}{2}\) \(14\)
trager \(-\frac {\left (x -1\right ) \left (x +1\right )}{2}+\frac {2 x^{2} \sqrt {-x}}{5}\) \(20\)

[In]

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

[Out]

2/5*(-x)^(5/2)-1/2*x^2

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.84 \[ \int \sqrt {-x} \left (\sqrt {-x}+x\right ) \, dx=\frac {2}{5} \, \sqrt {-x} x^{2} - \frac {1}{2} \, x^{2} \]

[In]

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

[Out]

2/5*sqrt(-x)*x^2 - 1/2*x^2

Sympy [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.89 \[ \int \sqrt {-x} \left (\sqrt {-x}+x\right ) \, dx=\frac {2 x^{2} \sqrt {- x}}{5} - \frac {x^{2}}{2} \]

[In]

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

[Out]

2*x**2*sqrt(-x)/5 - x**2/2

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.68 \[ \int \sqrt {-x} \left (\sqrt {-x}+x\right ) \, dx=\frac {2}{5} \, \left (-x\right )^{\frac {5}{2}} - \frac {1}{2} \, x^{2} \]

[In]

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

[Out]

2/5*(-x)^(5/2) - 1/2*x^2

Giac [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.84 \[ \int \sqrt {-x} \left (\sqrt {-x}+x\right ) \, dx=\frac {2}{5} \, \sqrt {-x} x^{2} - \frac {1}{2} \, x^{2} \]

[In]

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

[Out]

2/5*sqrt(-x)*x^2 - 1/2*x^2

Mupad [B] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.68 \[ \int \sqrt {-x} \left (\sqrt {-x}+x\right ) \, dx=\frac {2\,{\left (-x\right )}^{5/2}}{5}-\frac {x^2}{2} \]

[In]

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

[Out]

(2*(-x)^(5/2))/5 - x^2/2