### 3.586 $$\int \frac{1+x}{\sqrt{4-x^2}} \, dx$$

Optimal. Leaf size=20 $\sin ^{-1}\left (\frac{x}{2}\right )-\sqrt{4-x^2}$

[Out]

-Sqrt[4 - x^2] + ArcSin[x/2]

________________________________________________________________________________________

Rubi [A]  time = 0.0048059, antiderivative size = 20, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 15, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.133, Rules used = {641, 216} $\sin ^{-1}\left (\frac{x}{2}\right )-\sqrt{4-x^2}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

-Sqrt[4 - x^2] + ArcSin[x/2]

Rule 641

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

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]

Rubi steps

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

Mathematica [A]  time = 0.011744, size = 20, normalized size = 1. $\sin ^{-1}\left (\frac{x}{2}\right )-\sqrt{4-x^2}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

-Sqrt[4 - x^2] + ArcSin[x/2]

________________________________________________________________________________________

Maple [A]  time = 0.045, size = 17, normalized size = 0.9 \begin{align*} \arcsin \left ({\frac{x}{2}} \right ) -\sqrt{-{x}^{2}+4} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.72742, size = 22, normalized size = 1.1 \begin{align*} -\sqrt{-x^{2} + 4} + \arcsin \left (\frac{1}{2} \, x\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.82944, size = 70, normalized size = 3.5 \begin{align*} -\sqrt{-x^{2} + 4} - 2 \, \arctan \left (\frac{\sqrt{-x^{2} + 4} - 2}{x}\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.144732, size = 12, normalized size = 0.6 \begin{align*} - \sqrt{4 - x^{2}} + \operatorname{asin}{\left (\frac{x}{2} \right )} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-sqrt(4 - x**2) + asin(x/2)

________________________________________________________________________________________

Giac [A]  time = 1.68049, size = 22, normalized size = 1.1 \begin{align*} -\sqrt{-x^{2} + 4} + \arcsin \left (\frac{1}{2} \, x\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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