3.10.29 \(\int \frac {\sqrt {x-x^2}}{1+x} \, dx\) [929]

Optimal. Leaf size=54 \[ \sqrt {x-x^2}-\frac {3}{2} \sin ^{-1}(1-2 x)+\sqrt {2} \tan ^{-1}\left (\frac {1-3 x}{2 \sqrt {2} \sqrt {x-x^2}}\right ) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.353, Rules used = {748, 857, 633, 222, 738, 210} \begin {gather*} -\frac {3}{2} \text {ArcSin}(1-2 x)+\sqrt {2} \text {ArcTan}\left (\frac {1-3 x}{2 \sqrt {2} \sqrt {x-x^2}}\right )+\sqrt {x-x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 210

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^(-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])
], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 222

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 633

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 738

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

Rule 748

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(d + e*x)^(m + 1)*((
a + b*x + c*x^2)^p/(e*(m + 2*p + 1))), x] - Dist[p/(e*(m + 2*p + 1)), Int[(d + e*x)^m*Simp[b*d - 2*a*e + (2*c*
d - b*e)*x, x]*(a + b*x + c*x^2)^(p - 1), x], x] /; FreeQ[{a, b, c, d, e, m}, 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] && GtQ[p, 0] && NeQ[m + 2*p + 1, 0] && ( !RationalQ[m] || Lt
Q[m, 1]) &&  !ILtQ[m + 2*p, 0] && IntQuadraticQ[a, b, c, d, e, m, p, x]

Rule 857

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Dis
t[g/e, Int[(d + e*x)^(m + 1)*(a + b*x + c*x^2)^p, x], x] + Dist[(e*f - d*g)/e, Int[(d + e*x)^m*(a + b*x + c*x^
2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0]
&&  !IGtQ[m, 0]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.10, size = 82, normalized size = 1.52 \begin {gather*} \frac {\sqrt {-((-1+x) x)} \left (\sqrt {-1+x} \sqrt {x}-6 \tanh ^{-1}\left (\frac {\sqrt {-1+x}}{-1+\sqrt {x}}\right )+2 \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {2}}{\sqrt {\frac {-1+x}{x}}}\right )\right )}{\sqrt {-1+x} \sqrt {x}} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(Sqrt[-((-1 + x)*x)]*(Sqrt[-1 + x]*Sqrt[x] - 6*ArcTanh[Sqrt[-1 + x]/(-1 + Sqrt[x])] + 2*Sqrt[2]*ArcTanh[Sqrt[2
]/Sqrt[(-1 + x)/x]]))/(Sqrt[-1 + x]*Sqrt[x])

________________________________________________________________________________________

Maple [A]
time = 0.26, size = 54, normalized size = 1.00

method result size
default \(\sqrt {-\left (1+x \right )^{2}+1+3 x}+\frac {3 \arcsin \left (2 x -1\right )}{2}-\sqrt {2}\, \arctan \left (\frac {\left (-1+3 x \right ) \sqrt {2}}{4 \sqrt {-\left (1+x \right )^{2}+1+3 x}}\right )\) \(54\)
risch \(-\frac {x \left (-1+x \right )}{\sqrt {-x \left (-1+x \right )}}+\frac {3 \arcsin \left (2 x -1\right )}{2}-\sqrt {2}\, \arctan \left (\frac {\left (-1+3 x \right ) \sqrt {2}}{4 \sqrt {-\left (1+x \right )^{2}+1+3 x}}\right )\) \(54\)
trager \(\sqrt {-x^{2}+x}+\RootOf \left (\textit {\_Z}^{2}+2\right ) \ln \left (\frac {3 \RootOf \left (\textit {\_Z}^{2}+2\right ) x -\RootOf \left (\textit {\_Z}^{2}+2\right )+4 \sqrt {-x^{2}+x}}{1+x}\right )-\frac {3 \RootOf \left (\textit {\_Z}^{2}+1\right ) \ln \left (2 x \RootOf \left (\textit {\_Z}^{2}+1\right )-\RootOf \left (\textit {\_Z}^{2}+1\right )+2 \sqrt {-x^{2}+x}\right )}{2}\) \(92\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.52, size = 42, normalized size = 0.78 \begin {gather*} -\sqrt {2} \arcsin \left (\frac {3 \, x}{{\left | x + 1 \right |}} - \frac {1}{{\left | x + 1 \right |}}\right ) + \sqrt {-x^{2} + x} + \frac {3}{2} \, \arcsin \left (2 \, x - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 49, normalized size = 0.91 \begin {gather*} 2 \, \sqrt {2} \arctan \left (\frac {\sqrt {2} \sqrt {-x^{2} + x}}{2 \, x}\right ) + \sqrt {-x^{2} + x} - 3 \, \arctan \left (\frac {\sqrt {-x^{2} + x}}{x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {- x \left (x - 1\right )}}{x + 1}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 5.06, size = 53, normalized size = 0.98 \begin {gather*} 2 \, \sqrt {2} \arctan \left (\frac {1}{4} \, \sqrt {2} {\left (\frac {3 \, {\left (2 \, \sqrt {-x^{2} + x} - 1\right )}}{2 \, x - 1} - 1\right )}\right ) + \sqrt {-x^{2} + x} + \frac {3}{2} \, \arcsin \left (2 \, x - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {\sqrt {x-x^2}}{x+1} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________