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

Optimal. Leaf size=54 \[ \sqrt{x-x^2}+\sqrt{2} \tan ^{-1}\left (\frac{1-3 x}{2 \sqrt{2} \sqrt{x-x^2}}\right )-\frac{3}{2} \sin ^{-1}(1-2 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])]

________________________________________________________________________________________

Rubi [A]  time = 0.039589, antiderivative size = 54, normalized size of antiderivative = 1., 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 = {734, 843, 619, 216, 724, 204} \[ \sqrt{x-x^2}+\sqrt{2} \tan ^{-1}\left (\frac{1-3 x}{2 \sqrt{2} \sqrt{x-x^2}}\right )-\frac{3}{2} \sin ^{-1}(1-2 x) \]

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 734

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 843

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]

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

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 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 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} \operatorname{Subst}\left (\int \frac{1}{\sqrt{1-x^2}} \, dx,x,1-2 x\right )+4 \operatorname{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.0576623, size = 95, normalized size = 1.76 \[ \sqrt{-(x-1) x}-\frac{3 \sqrt{-(x-1) x} \sin ^{-1}\left (\sqrt{1-x}\right )}{\sqrt{1-x} \sqrt{x}}+\frac{2 \sqrt{2} \sqrt{-(x-1) x} \tanh ^{-1}\left (\frac{\sqrt{x-1}}{\sqrt{2} \sqrt{x}}\right )}{\sqrt{x-1} \sqrt{x}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.007, size = 54, normalized size = 1. \begin{align*} \sqrt{- \left ( 1+x \right ) ^{2}+3\,x+1}+{\frac{3\,\arcsin \left ( 2\,x-1 \right ) }{2}}-\sqrt{2}\arctan \left ({\frac{ \left ( 3\,x-1 \right ) \sqrt{2}}{4}{\frac{1}{\sqrt{- \left ( 1+x \right ) ^{2}+3\,x+1}}}} \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.60678, size = 57, normalized size = 1.06 \begin{align*} -\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{align*}

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 = 1.50108, size = 127, normalized size = 2.35 \begin{align*} 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{align*}

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., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{- x \left (x - 1\right )}}{x + 1}\, dx \end{align*}

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 = 1.13924, size = 72, normalized size = 1.33 \begin{align*} 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{align*}

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)