3.3.87 \(\int \frac {1}{1+\sqrt {2+2 x+x^2}} \, dx\) [287]

Optimal. Leaf size=29 \[ \frac {1}{1+x}-\frac {\sqrt {2+2 x+x^2}}{1+x}+\sinh ^{-1}(1+x) \]

[Out]

1/(1+x)+arcsinh(1+x)-(x^2+2*x+2)^(1/2)/(1+x)

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {6874, 698, 633, 221} \begin {gather*} -\frac {\sqrt {x^2+2 x+2}}{x+1}+\frac {1}{x+1}+\sinh ^{-1}(x+1) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 221

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSinh[Rt[b, 2]*(x/Sqrt[a])]/Rt[b, 2], x] /; FreeQ[{a, b},
 x] && GtQ[a, 0] && PosQ[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 698

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 + 1))), x] - Dist[b*(p/(d*e*(m + 1))), Int[(d + e*x)^(m + 2)*(a + b*x + c*x^2)^(p - 1
), x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[2*c*d - b*e, 0] && NeQ[m + 2*p + 3, 0] &&
 GtQ[p, 0] && LtQ[m, -1] &&  !(IntegerQ[m/2] && LtQ[m + 2*p + 3, 0]) && IntegerQ[2*p]

Rule 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.25, size = 43, normalized size = 1.48 \begin {gather*} -\frac {-1+\sqrt {2+2 x+x^2}+(1+x) \log \left (-1-x+\sqrt {2+2 x+x^2}\right )}{1+x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.05, size = 40, normalized size = 1.38

method result size
default \(-\frac {\left (\left (1+x \right )^{2}+1\right )^{\frac {3}{2}}}{1+x}+\left (1+x \right ) \sqrt {\left (1+x \right )^{2}+1}+\arcsinh \left (1+x \right )+\frac {1}{1+x}\) \(40\)
trager \(-\frac {x}{1+x}-\frac {\sqrt {x^{2}+2 x +2}}{1+x}-\ln \left (\sqrt {x^{2}+2 x +2}-1-x \right )\) \(45\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/(1+x)*((1+x)^2+1)^(3/2)+(1+x)*((1+x)^2+1)^(1/2)+arcsinh(1+x)+1/(1+x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate(1/(sqrt(x^2 + 2*x + 2) + 1), x)

________________________________________________________________________________________

Fricas [A]
time = 1.45, size = 39, normalized size = 1.34 \begin {gather*} -\frac {{\left (x + 1\right )} \log \left (-x + \sqrt {x^{2} + 2 \, x + 2} - 1\right ) + x + \sqrt {x^{2} + 2 \, x + 2}}{x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-((x + 1)*log(-x + sqrt(x^2 + 2*x + 2) - 1) + x + sqrt(x^2 + 2*x + 2))/(x + 1)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\sqrt {x^{2} + 2 x + 2} + 1}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 60 vs. \(2 (27) = 54\).
time = 1.02, size = 60, normalized size = 2.07 \begin {gather*} \frac {2}{{\left (x - \sqrt {x^{2} + 2 \, x + 2}\right )}^{2} + 2 \, x - 2 \, \sqrt {x^{2} + 2 \, x + 2}} + \frac {1}{x + 1} - \log \left (-x + \sqrt {x^{2} + 2 \, x + 2} - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2/((x - sqrt(x^2 + 2*x + 2))^2 + 2*x - 2*sqrt(x^2 + 2*x + 2)) + 1/(x + 1) - log(-x + sqrt(x^2 + 2*x + 2) - 1)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________