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

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

-(Sqrt[1 + x + x^2]/x) + ArcTanh[(2 + x)/(2*Sqrt[1 + x + x^2])]/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]

Rule 730

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(e*(d + e*x)^(m + 1)
*(a + b*x + c*x^2)^(p + 1))/((m + 1)*(c*d^2 - b*d*e + a*e^2)), x] + Dist[(2*c*d - b*e)/(2*(c*d^2 - b*d*e + a*e
^2)), Int[(d + e*x)^(m + 1)*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m, p}, 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] && EqQ[m + 2*p + 3, 0]

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.08, size = 33, normalized size = 0.87 \[ -\frac {\sqrt {x^2+x+1}}{x}-\tanh ^{-1}\left (x-\sqrt {x^2+x+1}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.68, size = 52, normalized size = 1.37 \[ \frac {x \log \left (-x + \sqrt {x^{2} + x + 1} + 1\right ) - x \log \left (-x + \sqrt {x^{2} + x + 1} - 1\right ) - 2 \, x - 2 \, \sqrt {x^{2} + x + 1}}{2 \, x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.65, size = 67, normalized size = 1.76 \[ \frac {x - \sqrt {x^{2} + x + 1} + 2}{{\left (x - \sqrt {x^{2} + x + 1}\right )}^{2} - 1} + \frac {1}{2} \, \log \left ({\left | -x + \sqrt {x^{2} + x + 1} + 1 \right |}\right ) - \frac {1}{2} \, \log \left ({\left | -x + \sqrt {x^{2} + x + 1} - 1 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.35, size = 31, normalized size = 0.82




method result size



default \(\frac {\arctanh \left (\frac {2+x}{2 \sqrt {x^{2}+x +1}}\right )}{2}-\frac {\sqrt {x^{2}+x +1}}{x}\) \(31\)
risch \(\frac {\arctanh \left (\frac {2+x}{2 \sqrt {x^{2}+x +1}}\right )}{2}-\frac {\sqrt {x^{2}+x +1}}{x}\) \(31\)
trager \(-\frac {\sqrt {x^{2}+x +1}}{x}+\frac {\ln \left (\frac {2 \sqrt {x^{2}+x +1}+2+x}{x}\right )}{2}\) \(35\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 1.03, size = 37, normalized size = 0.97 \[ -\frac {\sqrt {x^{2} + x + 1}}{x} + \frac {1}{2} \, \operatorname {arsinh}\left (\frac {\sqrt {3} x}{3 \, {\left | x \right |}} + \frac {2 \, \sqrt {3}}{3 \, {\left | x \right |}}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.03, size = 31, normalized size = 0.82 \[ \frac {\mathrm {atanh}\left (\frac {\frac {x}{2}+1}{\sqrt {x^2+x+1}}\right )}{2}-\frac {\sqrt {x^2+x+1}}{x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

atanh((x/2 + 1)/(x + x^2 + 1)^(1/2))/2 - (x + x^2 + 1)^(1/2)/x

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________