3.86 \(\int \cos ^{-1}(\sqrt{\frac{x}{1+x}}) \, dx\)

Optimal. Leaf size=38 \[ (x+1) \left (\sqrt{\frac{1}{x+1}} \sqrt{\frac{x}{x+1}}+\cos ^{-1}\left (\sqrt{\frac{x}{x+1}}\right )\right ) \]

[Out]

(1 + x)*(Sqrt[(1 + x)^(-1)]*Sqrt[x/(1 + x)] + ArcCos[Sqrt[x/(1 + x)]])

________________________________________________________________________________________

Rubi [A]  time = 0.0305641, antiderivative size = 57, normalized size of antiderivative = 1.5, number of steps used = 6, number of rules used = 6, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {4841, 12, 6719, 50, 63, 203} \[ \sqrt{\frac{x}{(x+1)^2}} (x+1)+x \cos ^{-1}\left (\sqrt{\frac{x}{x+1}}\right )-\frac{\sqrt{\frac{x}{(x+1)^2}} (x+1) \tan ^{-1}\left (\sqrt{x}\right )}{\sqrt{x}} \]

Antiderivative was successfully verified.

[In]

Int[ArcCos[Sqrt[x/(1 + x)]],x]

[Out]

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

Rule 4841

Int[ArcCos[u_], x_Symbol] :> Simp[x*ArcCos[u], x] + Int[SimplifyIntegrand[(x*D[u, x])/Sqrt[1 - u^2], x], x] /;
 InverseFunctionFreeQ[u, x] &&  !FunctionOfExponentialQ[u, x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 6719

Int[(u_.)*((a_.)*(v_)^(m_.)*(w_)^(n_.))^(p_), x_Symbol] :> Dist[(a^IntPart[p]*(a*v^m*w^n)^FracPart[p])/(v^(m*F
racPart[p])*w^(n*FracPart[p])), Int[u*v^(m*p)*w^(n*p), x], x] /; FreeQ[{a, m, n, p}, x] &&  !IntegerQ[p] &&  !
FreeQ[v, x] &&  !FreeQ[w, x]

Rule 50

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n)/(b*
(m + n + 1)), x] + Dist[(n*(b*c - a*d))/(b*(m + n + 1)), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 203

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

Rubi steps

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

Mathematica [A]  time = 0.0594106, size = 49, normalized size = 1.29 \[ x \cos ^{-1}\left (\sqrt{\frac{x}{x+1}}\right )+\frac{\sqrt{\frac{x}{(x+1)^2}} (x+1) \left (\sqrt{x}-\tan ^{-1}\left (\sqrt{x}\right )\right )}{\sqrt{x}} \]

Antiderivative was successfully verified.

[In]

Integrate[ArcCos[Sqrt[x/(1 + x)]],x]

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.012, size = 44, normalized size = 1.2 \begin{align*} x\arccos \left ( \sqrt{{\frac{x}{1+x}}} \right ) +{\sqrt{x}\sqrt{ \left ( 1+x \right ) ^{-1}} \left ( \sqrt{x}-\arctan \left ( \sqrt{x} \right ) \right ){\frac{1}{\sqrt{{\frac{x}{1+x}}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x*arccos((x/(1+x))^(1/2))+1/(x/(1+x))^(1/2)*x^(1/2)*(1/(1+x))^(1/2)*(x^(1/2)-arctan(x^(1/2)))

________________________________________________________________________________________

Maxima [B]  time = 1.42552, size = 105, normalized size = 2.76 \begin{align*} -\frac{\arccos \left (\sqrt{\frac{x}{x + 1}}\right )}{\frac{x}{x + 1} - 1} - \frac{\sqrt{-\frac{x}{x + 1} + 1}}{2 \,{\left (\sqrt{\frac{x}{x + 1}} + 1\right )}} - \frac{\sqrt{-\frac{x}{x + 1} + 1}}{2 \,{\left (\sqrt{\frac{x}{x + 1}} - 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-arccos(sqrt(x/(x + 1)))/(x/(x + 1) - 1) - 1/2*sqrt(-x/(x + 1) + 1)/(sqrt(x/(x + 1)) + 1) - 1/2*sqrt(-x/(x + 1
) + 1)/(sqrt(x/(x + 1)) - 1)

________________________________________________________________________________________

Fricas [A]  time = 2.00843, size = 85, normalized size = 2.24 \begin{align*}{\left (x + 1\right )} \arccos \left (\sqrt{\frac{x}{x + 1}}\right ) + \sqrt{x + 1} \sqrt{\frac{x}{x + 1}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x + 1)*arccos(sqrt(x/(x + 1))) + sqrt(x + 1)*sqrt(x/(x + 1))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \operatorname{acos}{\left (\sqrt{\frac{x}{x + 1}} \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(acos(sqrt(x/(x + 1))), x)

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: TypeError