3.445 \(\int x^2 (-\sqrt {1-x}-\sqrt {1+x}) (\sqrt {1-x}+\sqrt {1+x}) \, dx\)

Optimal. Leaf size=48 \[ -\frac {2 x^3}{3}+\frac {1}{4} \sqrt {1-x^2} x-\frac {1}{2} \sqrt {1-x^2} x^3-\frac {1}{4} \sin ^{-1}(x) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.24, antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 42, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.119, Rules used = {6688, 6742, 279, 321, 216} \[ -\frac {1}{2} \sqrt {1-x^2} x^3-\frac {2 x^3}{3}+\frac {1}{4} \sqrt {1-x^2} x-\frac {1}{4} \sin ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 216

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[(Rt[-b, 2]*x)/Sqrt[a]]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 279

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

Rule 321

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

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]]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 43, normalized size = 0.90 \[ \frac {1}{12} \left (3 \sqrt {1-x^2} x-\left (\left (6 \sqrt {1-x^2}+8\right ) x^3\right )-3 \sin ^{-1}(x)\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

(3*x*Sqrt[1 - x^2] - x^3*(8 + 6*Sqrt[1 - x^2]) - 3*ArcSin[x])/12

________________________________________________________________________________________

fricas [A]  time = 0.42, size = 51, normalized size = 1.06 \[ -\frac {2}{3} \, x^{3} - \frac {1}{4} \, {\left (2 \, x^{3} - x\right )} \sqrt {x + 1} \sqrt {-x + 1} + \frac {1}{2} \, \arctan \left (\frac {\sqrt {x + 1} \sqrt {-x + 1} - 1}{x}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.47, size = 76, normalized size = 1.58 \[ -\frac {2}{3} \, x^{3} - \frac {1}{12} \, {\left ({\left (2 \, {\left (3 \, x - 10\right )} {\left (x + 1\right )} + 43\right )} {\left (x + 1\right )} - 39\right )} \sqrt {x + 1} \sqrt {-x + 1} - \frac {1}{3} \, {\left ({\left (2 \, x - 5\right )} {\left (x + 1\right )} + 9\right )} \sqrt {x + 1} \sqrt {-x + 1} - \frac {1}{2} \, \arcsin \left (\frac {1}{2} \, \sqrt {2} \sqrt {x + 1}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2/3*x^3 - 1/12*((2*(3*x - 10)*(x + 1) + 43)*(x + 1) - 39)*sqrt(x + 1)*sqrt(-x + 1) - 1/3*((2*x - 5)*(x + 1) +
 9)*sqrt(x + 1)*sqrt(-x + 1) - 1/2*arcsin(1/2*sqrt(2)*sqrt(x + 1))

________________________________________________________________________________________

maple [A]  time = 0.00, size = 59, normalized size = 1.23 \[ -\frac {2 x^{3}}{3}-\frac {\sqrt {x +1}\, \sqrt {-x +1}\, \left (2 \sqrt {-x^{2}+1}\, x^{3}-\sqrt {-x^{2}+1}\, x +\arcsin \relax (x )\right )}{4 \sqrt {-x^{2}+1}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 1.50, size = 34, normalized size = 0.71 \[ -\frac {2}{3} \, x^{3} + \frac {1}{2} \, {\left (-x^{2} + 1\right )}^{\frac {3}{2}} x - \frac {1}{4} \, \sqrt {-x^{2} + 1} x - \frac {1}{4} \, \arcsin \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 10.39, size = 381, normalized size = 7.94 \[ \mathrm {atan}\left (\frac {\sqrt {1-x}-1}{\sqrt {x+1}-1}\right )-\frac {\frac {\sqrt {1-x}-1}{\sqrt {x+1}-1}-\frac {35\,{\left (\sqrt {1-x}-1\right )}^3}{{\left (\sqrt {x+1}-1\right )}^3}+\frac {273\,{\left (\sqrt {1-x}-1\right )}^5}{{\left (\sqrt {x+1}-1\right )}^5}-\frac {715\,{\left (\sqrt {1-x}-1\right )}^7}{{\left (\sqrt {x+1}-1\right )}^7}+\frac {715\,{\left (\sqrt {1-x}-1\right )}^9}{{\left (\sqrt {x+1}-1\right )}^9}-\frac {273\,{\left (\sqrt {1-x}-1\right )}^{11}}{{\left (\sqrt {x+1}-1\right )}^{11}}+\frac {35\,{\left (\sqrt {1-x}-1\right )}^{13}}{{\left (\sqrt {x+1}-1\right )}^{13}}-\frac {{\left (\sqrt {1-x}-1\right )}^{15}}{{\left (\sqrt {x+1}-1\right )}^{15}}}{\frac {8\,{\left (\sqrt {1-x}-1\right )}^2}{{\left (\sqrt {x+1}-1\right )}^2}+\frac {28\,{\left (\sqrt {1-x}-1\right )}^4}{{\left (\sqrt {x+1}-1\right )}^4}+\frac {56\,{\left (\sqrt {1-x}-1\right )}^6}{{\left (\sqrt {x+1}-1\right )}^6}+\frac {70\,{\left (\sqrt {1-x}-1\right )}^8}{{\left (\sqrt {x+1}-1\right )}^8}+\frac {56\,{\left (\sqrt {1-x}-1\right )}^{10}}{{\left (\sqrt {x+1}-1\right )}^{10}}+\frac {28\,{\left (\sqrt {1-x}-1\right )}^{12}}{{\left (\sqrt {x+1}-1\right )}^{12}}+\frac {8\,{\left (\sqrt {1-x}-1\right )}^{14}}{{\left (\sqrt {x+1}-1\right )}^{14}}+\frac {{\left (\sqrt {1-x}-1\right )}^{16}}{{\left (\sqrt {x+1}-1\right )}^{16}}+1}-\frac {2\,x^3}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

atan(((1 - x)^(1/2) - 1)/((x + 1)^(1/2) - 1)) - (((1 - x)^(1/2) - 1)/((x + 1)^(1/2) - 1) - (35*((1 - x)^(1/2)
- 1)^3)/((x + 1)^(1/2) - 1)^3 + (273*((1 - x)^(1/2) - 1)^5)/((x + 1)^(1/2) - 1)^5 - (715*((1 - x)^(1/2) - 1)^7
)/((x + 1)^(1/2) - 1)^7 + (715*((1 - x)^(1/2) - 1)^9)/((x + 1)^(1/2) - 1)^9 - (273*((1 - x)^(1/2) - 1)^11)/((x
 + 1)^(1/2) - 1)^11 + (35*((1 - x)^(1/2) - 1)^13)/((x + 1)^(1/2) - 1)^13 - ((1 - x)^(1/2) - 1)^15/((x + 1)^(1/
2) - 1)^15)/((8*((1 - x)^(1/2) - 1)^2)/((x + 1)^(1/2) - 1)^2 + (28*((1 - x)^(1/2) - 1)^4)/((x + 1)^(1/2) - 1)^
4 + (56*((1 - x)^(1/2) - 1)^6)/((x + 1)^(1/2) - 1)^6 + (70*((1 - x)^(1/2) - 1)^8)/((x + 1)^(1/2) - 1)^8 + (56*
((1 - x)^(1/2) - 1)^10)/((x + 1)^(1/2) - 1)^10 + (28*((1 - x)^(1/2) - 1)^12)/((x + 1)^(1/2) - 1)^12 + (8*((1 -
 x)^(1/2) - 1)^14)/((x + 1)^(1/2) - 1)^14 + ((1 - x)^(1/2) - 1)^16/((x + 1)^(1/2) - 1)^16 + 1) - (2*x^3)/3

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________