3.693 \(\int \sqrt{-x} (\sqrt{-x}+x) \, dx\)

Optimal. Leaf size=19 \[ \frac{2}{5} (-x)^{5/2}-\frac{x^2}{2} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0047248, antiderivative size = 19, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.059, Rules used = {14} \[ \frac{2}{5} (-x)^{5/2}-\frac{x^2}{2} \]

Antiderivative was successfully verified.

[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*} \int \sqrt{-x} \left (\sqrt{-x}+x\right ) \, dx &=\int \left (-(-x)^{3/2}-x\right ) \, dx\\ &=\frac{2}{5} (-x)^{5/2}-\frac{x^2}{2}\\ \end{align*}

Mathematica [A]  time = 0.0077638, size = 19, normalized size = 1. \[ \frac{2}{5} (-x)^{5/2}-\frac{x^2}{2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.002, size = 14, normalized size = 0.7 \begin{align*}{\frac{2}{5} \left ( -x \right ) ^{{\frac{5}{2}}}}-{\frac{{x}^{2}}{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.08456, size = 18, normalized size = 0.95 \begin{align*} \frac{2}{5} \, \left (-x\right )^{\frac{5}{2}} - \frac{1}{2} \, x^{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.39263, size = 38, normalized size = 2. \begin{align*} \frac{2}{5} \, \sqrt{-x} x^{2} - \frac{1}{2} \, x^{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [C]  time = 0.18352, size = 14, normalized size = 0.74 \begin{align*} \frac{2 i x^{\frac{5}{2}}}{5} - \frac{x^{2}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.10963, size = 22, normalized size = 1.16 \begin{align*} \frac{2}{5} \, \sqrt{-x} x^{2} - \frac{1}{2} \, x^{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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