3.280 \(\int \frac {\sqrt {4+2 x+x^2}}{(-1+x)^2} \, dx\)

Optimal. Leaf size=62 \[ \frac {\sqrt {x^2+2 x+4}}{1-x}-\frac {2 \tanh ^{-1}\left (\frac {2 x+5}{\sqrt {7} \sqrt {x^2+2 x+4}}\right )}{\sqrt {7}}+\sinh ^{-1}\left (\frac {x+1}{\sqrt {3}}\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {732, 843, 619, 215, 724, 206} \[ \frac {\sqrt {x^2+2 x+4}}{1-x}-\frac {2 \tanh ^{-1}\left (\frac {2 x+5}{\sqrt {7} \sqrt {x^2+2 x+4}}\right )}{\sqrt {7}}+\sinh ^{-1}\left (\frac {x+1}{\sqrt {3}}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

Sqrt[4 + 2*x + x^2]/(1 - x) + ArcSinh[(1 + x)/Sqrt[3]] - (2*ArcTanh[(5 + 2*x)/(Sqrt[7]*Sqrt[4 + 2*x + x^2])])/
Sqrt[7]

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 215

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 619

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 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 732

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

Rule 843

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Dis
t[g/e, Int[(d + e*x)^(m + 1)*(a + b*x + c*x^2)^p, x], x] + Dist[(e*f - d*g)/e, Int[(d + e*x)^m*(a + b*x + c*x^
2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0]
&&  !IGtQ[m, 0]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 61, normalized size = 0.98 \[ -\frac {\sqrt {x^2+2 x+4}}{x-1}-\frac {2 \tanh ^{-1}\left (\frac {2 x+5}{\sqrt {7} \sqrt {x^2+2 x+4}}\right )}{\sqrt {7}}+\sinh ^{-1}\left (\frac {x+1}{\sqrt {3}}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

-(Sqrt[4 + 2*x + x^2]/(-1 + x)) + ArcSinh[(1 + x)/Sqrt[3]] - (2*ArcTanh[(5 + 2*x)/(Sqrt[7]*Sqrt[4 + 2*x + x^2]
)])/Sqrt[7]

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.23, size = 81, normalized size = 1.31 \[ \frac {\sqrt {x^2+2 x+4}}{1-x}-\log \left (\sqrt {x^2+2 x+4}-x-1\right )-\frac {4 \tanh ^{-1}\left (\frac {\sqrt {x^2+2 x+4}}{\sqrt {7}}-\frac {x}{\sqrt {7}}+\frac {1}{\sqrt {7}}\right )}{\sqrt {7}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.57, size = 92, normalized size = 1.48 \[ \frac {2 \, \sqrt {7} {\left (x - 1\right )} \log \left (\frac {\sqrt {7} {\left (2 \, x + 5\right )} + \sqrt {x^{2} + 2 \, x + 4} {\left (2 \, \sqrt {7} - 7\right )} - 4 \, x - 10}{x - 1}\right ) - 7 \, {\left (x - 1\right )} \log \left (-x + \sqrt {x^{2} + 2 \, x + 4} - 1\right ) - 7 \, x - 7 \, \sqrt {x^{2} + 2 \, x + 4} + 7}{7 \, {\left (x - 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/7*(2*sqrt(7)*(x - 1)*log((sqrt(7)*(2*x + 5) + sqrt(x^2 + 2*x + 4)*(2*sqrt(7) - 7) - 4*x - 10)/(x - 1)) - 7*(
x - 1)*log(-x + sqrt(x^2 + 2*x + 4) - 1) - 7*x - 7*sqrt(x^2 + 2*x + 4) + 7)/(x - 1)

________________________________________________________________________________________

giac [A]  time = 0.66, size = 33, normalized size = 0.53 \[ -\sqrt {\frac {4}{x - 1} + \frac {7}{{\left (x - 1\right )}^{2}} + 1} \mathrm {sgn}\left (\frac {1}{x - 1}\right ) + \mathrm {sgn}\left (\frac {1}{x - 1}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.38, size = 56, normalized size = 0.90




method result size



risch \(-\frac {\sqrt {x^{2}+2 x +4}}{-1+x}+\arcsinh \left (\frac {\left (1+x \right ) \sqrt {3}}{3}\right )-\frac {2 \sqrt {7}\, \arctanh \left (\frac {\left (10+4 x \right ) \sqrt {7}}{14 \sqrt {\left (-1+x \right )^{2}+3+4 x}}\right )}{7}\) \(56\)
trager \(-\frac {\sqrt {x^{2}+2 x +4}}{-1+x}+\ln \left (1+x +\sqrt {x^{2}+2 x +4}\right )+\frac {2 \RootOf \left (\textit {\_Z}^{2}-7\right ) \ln \left (-\frac {-2 \RootOf \left (\textit {\_Z}^{2}-7\right ) x +7 \sqrt {x^{2}+2 x +4}-5 \RootOf \left (\textit {\_Z}^{2}-7\right )}{-1+x}\right )}{7}\) \(79\)
default \(-\frac {\left (\left (-1+x \right )^{2}+3+4 x \right )^{\frac {3}{2}}}{7 \left (-1+x \right )}+\frac {2 \sqrt {\left (-1+x \right )^{2}+3+4 x}}{7}+\arcsinh \left (\frac {\left (1+x \right ) \sqrt {3}}{3}\right )-\frac {2 \sqrt {7}\, \arctanh \left (\frac {\left (10+4 x \right ) \sqrt {7}}{14 \sqrt {\left (-1+x \right )^{2}+3+4 x}}\right )}{7}+\frac {\left (2 x +2\right ) \sqrt {\left (-1+x \right )^{2}+3+4 x}}{14}\) \(91\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/(-1+x)*(x^2+2*x+4)^(1/2)+arcsinh(1/3*(1+x)*3^(1/2))-2/7*7^(1/2)*arctanh(1/14*(10+4*x)*7^(1/2)/((-1+x)^2+3+4
*x)^(1/2))

________________________________________________________________________________________

maxima [A]  time = 1.30, size = 61, normalized size = 0.98 \[ -\frac {2}{7} \, \sqrt {7} \operatorname {arsinh}\left (\frac {2 \, \sqrt {3} x}{3 \, {\left | x - 1 \right |}} + \frac {5 \, \sqrt {3}}{3 \, {\left | x - 1 \right |}}\right ) - \frac {\sqrt {x^{2} + 2 \, x + 4}}{x - 1} + \operatorname {arsinh}\left (\frac {1}{3} \, \sqrt {3} x + \frac {1}{3} \, \sqrt {3}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2/7*sqrt(7)*arcsinh(2/3*sqrt(3)*x/abs(x - 1) + 5/3*sqrt(3)/abs(x - 1)) - sqrt(x^2 + 2*x + 4)/(x - 1) + arcsin
h(1/3*sqrt(3)*x + 1/3*sqrt(3))

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________