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

Optimal. Leaf size=21 \[ \frac{2}{3} \left (1-x^2\right )^{3/2}-x^2 \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.11288, antiderivative size = 21, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 40, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.075, Rules used = {6688, 6742, 261} \[ \frac{2}{3} \left (1-x^2\right )^{3/2}-x^2 \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 6688

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

Rule 6742

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

Rule 261

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a + b*x^n)^(p + 1)/(b*n*(p + 1)), x] /; FreeQ
[{a, b, m, n, p}, x] && EqQ[m, n - 1] && NeQ[p, -1]

Rubi steps

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

Mathematica [A]  time = 0.0175248, size = 21, normalized size = 1. \[ \frac{2}{3} \left (1-x^2\right )^{3/2}-x^2 \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.002, size = 26, normalized size = 1.2 \begin{align*} -{x}^{2}-{\frac{2\,{x}^{2}-2}{3}\sqrt{1-x}\sqrt{1+x}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.53081, size = 23, normalized size = 1.1 \begin{align*} -x^{2} + \frac{2}{3} \,{\left (-x^{2} + 1\right )}^{\frac{3}{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 0.945034, size = 63, normalized size = 3. \begin{align*} -x^{2} - \frac{2}{3} \,{\left (x^{2} - 1\right )} \sqrt{x + 1} \sqrt{-x + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 76.971, size = 110, normalized size = 5.24 \begin{align*} \frac{x^{3}}{3} + x - \frac{\left (x + 1\right )^{3}}{3} + 4 \left (\begin{cases} \frac{x \sqrt{1 - x} \sqrt{x + 1}}{4} + \frac{\operatorname{asin}{\left (\frac{\sqrt{2} \sqrt{x + 1}}{2} \right )}}{2} & \text{for}\: x \geq -1 \wedge x < 1 \end{cases}\right ) - 4 \left (\begin{cases} \frac{x \sqrt{1 - x} \sqrt{x + 1}}{4} - \frac{\left (1 - x\right )^{\frac{3}{2}} \left (x + 1\right )^{\frac{3}{2}}}{6} + \frac{\operatorname{asin}{\left (\frac{\sqrt{2} \sqrt{x + 1}}{2} \right )}}{2} & \text{for}\: x \geq -1 \wedge x < 1 \end{cases}\right ) + 1 \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x**3/3 + x - (x + 1)**3/3 + 4*Piecewise((x*sqrt(1 - x)*sqrt(x + 1)/4 + asin(sqrt(2)*sqrt(x + 1)/2)/2, (x >= -1
) & (x < 1))) - 4*Piecewise((x*sqrt(1 - x)*sqrt(x + 1)/4 - (1 - x)**(3/2)*(x + 1)**(3/2)/6 + asin(sqrt(2)*sqrt
(x + 1)/2)/2, (x >= -1) & (x < 1))) + 1

________________________________________________________________________________________

Giac [A]  time = 1.11091, size = 39, normalized size = 1.86 \begin{align*} -\frac{2}{3} \,{\left (x + 1\right )}^{\frac{3}{2}}{\left (x - 1\right )} \sqrt{-x + 1} -{\left (x + 1\right )}^{2} + 2 \, x + 2 \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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