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

Optimal. Leaf size=95 \[ -\frac {1}{2} \sqrt {x} \left (-x-\sqrt {x}+1\right )^{3/2}+\frac {5}{12} \left (-x-\sqrt {x}+1\right )^{3/2}+\frac {9}{32} \left (2 \sqrt {x}+1\right ) \sqrt {-x-\sqrt {x}+1}+\frac {45}{64} \sin ^{-1}\left (\frac {2 \sqrt {x}+1}{\sqrt {5}}\right ) \]

[Out]

45/64*arcsin(1/5*(1+2*x^(1/2))*5^(1/2))+5/12*(1-x-x^(1/2))^(3/2)-1/2*(1-x-x^(1/2))^(3/2)*x^(1/2)+9/32*(1+2*x^(
1/2))*(1-x-x^(1/2))^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {1357, 742, 640, 612, 619, 216} \[ -\frac {1}{2} \sqrt {x} \left (-x-\sqrt {x}+1\right )^{3/2}+\frac {5}{12} \left (-x-\sqrt {x}+1\right )^{3/2}+\frac {9}{32} \left (2 \sqrt {x}+1\right ) \sqrt {-x-\sqrt {x}+1}+\frac {45}{64} \sin ^{-1}\left (\frac {2 \sqrt {x}+1}{\sqrt {5}}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[1 - Sqrt[x] - x]*Sqrt[x],x]

[Out]

(9*(1 + 2*Sqrt[x])*Sqrt[1 - Sqrt[x] - x])/32 + (5*(1 - Sqrt[x] - x)^(3/2))/12 - ((1 - Sqrt[x] - x)^(3/2)*Sqrt[
x])/2 + (45*ArcSin[(1 + 2*Sqrt[x])/Sqrt[5]])/64

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 612

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

Rule 619

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[1/(2*c*((-4*c)/(b^2 - 4*a*c))^p), Subst[Int[Si
mp[1 - x^2/(b^2 - 4*a*c), x]^p, x], x, b + 2*c*x], x] /; FreeQ[{a, b, c, p}, x] && GtQ[4*a - b^2/c, 0]

Rule 640

Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(e*(a + b*x + c*x^2)^(p +
 1))/(2*c*(p + 1)), x] + Dist[(2*c*d - b*e)/(2*c), Int[(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, p}
, x] && NeQ[2*c*d - b*e, 0] && NeQ[p, -1]

Rule 742

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(e*(d + e*x)^(m - 1)
*(a + b*x + c*x^2)^(p + 1))/(c*(m + 2*p + 1)), x] + Dist[1/(c*(m + 2*p + 1)), Int[(d + e*x)^(m - 2)*Simp[c*d^2
*(m + 2*p + 1) - e*(a*e*(m - 1) + b*d*(p + 1)) + e*(2*c*d - b*e)*(m + p)*x, x]*(a + b*x + c*x^2)^p, x], x] /;
FreeQ[{a, b, c, d, e, m, p}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && NeQ[2*c*d - b*e, 0]
 && If[RationalQ[m], GtQ[m, 1], SumSimplerQ[m, -2]] && NeQ[m + 2*p + 1, 0] && IntQuadraticQ[a, b, c, d, e, m,
p, x]

Rule 1357

Int[(x_)^(m_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*x + c*x^2)^p, x], x, x^n], x] /; FreeQ[{a, b, c, m, n, p}, x] && EqQ[n2, 2*n] && NeQ[
b^2 - 4*a*c, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rubi steps

\begin {align*} \int \sqrt {1-\sqrt {x}-x} \sqrt {x} \, dx &=2 \operatorname {Subst}\left (\int x^2 \sqrt {1-x-x^2} \, dx,x,\sqrt {x}\right )\\ &=-\frac {1}{2} \left (1-\sqrt {x}-x\right )^{3/2} \sqrt {x}-\frac {1}{2} \operatorname {Subst}\left (\int \left (-1+\frac {5 x}{2}\right ) \sqrt {1-x-x^2} \, dx,x,\sqrt {x}\right )\\ &=\frac {5}{12} \left (1-\sqrt {x}-x\right )^{3/2}-\frac {1}{2} \left (1-\sqrt {x}-x\right )^{3/2} \sqrt {x}+\frac {9}{8} \operatorname {Subst}\left (\int \sqrt {1-x-x^2} \, dx,x,\sqrt {x}\right )\\ &=\frac {9}{32} \left (1+2 \sqrt {x}\right ) \sqrt {1-\sqrt {x}-x}+\frac {5}{12} \left (1-\sqrt {x}-x\right )^{3/2}-\frac {1}{2} \left (1-\sqrt {x}-x\right )^{3/2} \sqrt {x}+\frac {45}{64} \operatorname {Subst}\left (\int \frac {1}{\sqrt {1-x-x^2}} \, dx,x,\sqrt {x}\right )\\ &=\frac {9}{32} \left (1+2 \sqrt {x}\right ) \sqrt {1-\sqrt {x}-x}+\frac {5}{12} \left (1-\sqrt {x}-x\right )^{3/2}-\frac {1}{2} \left (1-\sqrt {x}-x\right )^{3/2} \sqrt {x}-\frac {1}{64} \left (9 \sqrt {5}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {1-\frac {x^2}{5}}} \, dx,x,-1-2 \sqrt {x}\right )\\ &=\frac {9}{32} \left (1+2 \sqrt {x}\right ) \sqrt {1-\sqrt {x}-x}+\frac {5}{12} \left (1-\sqrt {x}-x\right )^{3/2}-\frac {1}{2} \left (1-\sqrt {x}-x\right )^{3/2} \sqrt {x}+\frac {45}{64} \sin ^{-1}\left (\frac {1+2 \sqrt {x}}{\sqrt {5}}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 60, normalized size = 0.63 \[ \frac {1}{96} \sqrt {-x-\sqrt {x}+1} \left (48 x^{3/2}+8 x-34 \sqrt {x}+67\right )-\frac {45}{64} \sin ^{-1}\left (\frac {-2 \sqrt {x}-1}{\sqrt {5}}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[1 - Sqrt[x] - x]*Sqrt[x],x]

[Out]

(Sqrt[1 - Sqrt[x] - x]*(67 - 34*Sqrt[x] + 8*x + 48*x^(3/2)))/96 - (45*ArcSin[(-1 - 2*Sqrt[x])/Sqrt[5]])/64

________________________________________________________________________________________

fricas [A]  time = 2.32, size = 89, normalized size = 0.94 \[ \frac {1}{96} \, {\left (2 \, {\left (24 \, x - 17\right )} \sqrt {x} + 8 \, x + 67\right )} \sqrt {-x - \sqrt {x} + 1} - \frac {45}{128} \, \arctan \left (-\frac {{\left (8 \, x^{2} - {\left (16 \, x^{2} - 38 \, x + 11\right )} \sqrt {x} - 9 \, x + 3\right )} \sqrt {-x - \sqrt {x} + 1}}{4 \, {\left (4 \, x^{3} - 13 \, x^{2} + 7 \, x - 1\right )}}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/96*(2*(24*x - 17)*sqrt(x) + 8*x + 67)*sqrt(-x - sqrt(x) + 1) - 45/128*arctan(-1/4*(8*x^2 - (16*x^2 - 38*x +
11)*sqrt(x) - 9*x + 3)*sqrt(-x - sqrt(x) + 1)/(4*x^3 - 13*x^2 + 7*x - 1))

________________________________________________________________________________________

giac [A]  time = 0.39, size = 51, normalized size = 0.54 \[ \frac {1}{96} \, {\left (2 \, {\left (4 \, \sqrt {x} {\left (6 \, \sqrt {x} + 1\right )} - 17\right )} \sqrt {x} + 67\right )} \sqrt {-x - \sqrt {x} + 1} + \frac {45}{64} \, \arcsin \left (\frac {1}{5} \, \sqrt {5} {\left (2 \, \sqrt {x} + 1\right )}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/96*(2*(4*sqrt(x)*(6*sqrt(x) + 1) - 17)*sqrt(x) + 67)*sqrt(-x - sqrt(x) + 1) + 45/64*arcsin(1/5*sqrt(5)*(2*sq
rt(x) + 1))

________________________________________________________________________________________

maple [A]  time = 0.01, size = 67, normalized size = 0.71 \[ \frac {45 \arcsin \left (\frac {2 \sqrt {5}\, \left (\sqrt {x}+\frac {1}{2}\right )}{5}\right )}{64}-\frac {\left (-x -\sqrt {x}+1\right )^{\frac {3}{2}} \sqrt {x}}{2}+\frac {5 \left (-x -\sqrt {x}+1\right )^{\frac {3}{2}}}{12}-\frac {9 \left (-2 \sqrt {x}-1\right ) \sqrt {-x -\sqrt {x}+1}}{32} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*(-x-x^(1/2)+1)^(3/2)*x^(1/2)+5/12*(-x-x^(1/2)+1)^(3/2)-9/32*(-2*x^(1/2)-1)*(-x-x^(1/2)+1)^(1/2)+45/64*arc
sin(2/5*5^(1/2)*(x^(1/2)+1/2))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {x} \sqrt {-x - \sqrt {x} + 1}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate(sqrt(x)*sqrt(-x - sqrt(x) + 1), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \sqrt {x}\,\sqrt {1-\sqrt {x}-x} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {x} \sqrt {- \sqrt {x} - x + 1}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(sqrt(x)*sqrt(-sqrt(x) - x + 1), x)

________________________________________________________________________________________