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

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

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {724, 206} \[ -\tanh ^{-1}\left (\frac {1-x}{2 \sqrt {x^2+x+1}}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 206

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

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]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 22, normalized size = 1.00 \[ -\tanh ^{-1}\left (\frac {1-x}{2 \sqrt {x^2+x+1}}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.14, size = 18, normalized size = 0.82 \[ 2 \tanh ^{-1}\left (-\sqrt {x^2+x+1}+x+1\right ) \]

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[1/((1 + x)*Sqrt[1 + x + x^2]),x]

[Out]

2*ArcTanh[1 + x - Sqrt[1 + x + x^2]]

________________________________________________________________________________________

fricas [A]  time = 0.61, size = 30, normalized size = 1.36 \[ -\log \left (-x + \sqrt {x^{2} + x + 1}\right ) + \log \left (-x + \sqrt {x^{2} + x + 1} - 2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.66, size = 32, normalized size = 1.45 \[ -\log \left ({\left | -x + \sqrt {x^{2} + x + 1} \right |}\right ) + \log \left ({\left | -x + \sqrt {x^{2} + x + 1} - 2 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-log(abs(-x + sqrt(x^2 + x + 1))) + log(abs(-x + sqrt(x^2 + x + 1) - 2))

________________________________________________________________________________________

maple [A]  time = 0.36, size = 22, normalized size = 1.00




method result size



default \(-\arctanh \left (\frac {1-x}{2 \sqrt {\left (1+x \right )^{2}-x}}\right )\) \(22\)
trager \(-\ln \left (\frac {2 \sqrt {x^{2}+x +1}+1-x}{1+x}\right )\) \(25\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 1.24, size = 25, normalized size = 1.14 \[ \operatorname {arsinh}\left (\frac {\sqrt {3} x}{3 \, {\left | x + 1 \right |}} - \frac {\sqrt {3}}{3 \, {\left | x + 1 \right |}}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

arcsinh(1/3*sqrt(3)*x/abs(x + 1) - 1/3*sqrt(3)/abs(x + 1))

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.05 \[ \int \frac {1}{\left (x+1\right )\,\sqrt {x^2+x+1}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\left (x + 1\right ) \sqrt {x^{2} + x + 1}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________