3.3.47 \(\int \frac {1+2 x}{\sqrt {-1+6 x+x^2} (4+4 x+3 x^2)} \, dx\) [247]

Optimal. Leaf size=70 \[ -\frac {5 \tan ^{-1}\left (\frac {\sqrt {\frac {7}{2}} (2-x)}{2 \sqrt {-1+6 x+x^2}}\right )}{6 \sqrt {14}}-\frac {\tanh ^{-1}\left (\frac {\sqrt {7} (1+x)}{\sqrt {-1+6 x+x^2}}\right )}{3 \sqrt {7}} \]

[Out]

-1/21*arctanh((1+x)*7^(1/2)/(x^2+6*x-1)^(1/2))*7^(1/2)-5/84*arctan(1/4*(2-x)*7^(1/2)*2^(1/2)/(x^2+6*x-1)^(1/2)
)*14^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 70, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {1049, 1043, 213, 209} \begin {gather*} -\frac {5 \text {ArcTan}\left (\frac {\sqrt {\frac {7}{2}} (2-x)}{2 \sqrt {x^2+6 x-1}}\right )}{6 \sqrt {14}}-\frac {\tanh ^{-1}\left (\frac {\sqrt {7} (x+1)}{\sqrt {x^2+6 x-1}}\right )}{3 \sqrt {7}} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-5*ArcTan[(Sqrt[7/2]*(2 - x))/(2*Sqrt[-1 + 6*x + x^2])])/(6*Sqrt[14]) - ArcTanh[(Sqrt[7]*(1 + x))/Sqrt[-1 + 6
*x + x^2]]/(3*Sqrt[7])

Rule 209

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

Rule 213

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

Rule 1043

Int[((g_.) + (h_.)*(x_))/(((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Symb
ol] :> Dist[-2*g*(g*b - 2*a*h), Subst[Int[1/Simp[g*(g*b - 2*a*h)*(b^2 - 4*a*c) - (b*d - a*e)*x^2, x], x], x, S
imp[g*b - 2*a*h - (b*h - 2*g*c)*x, x]/Sqrt[d + e*x + f*x^2]], x] /; FreeQ[{a, b, c, d, e, f, g, h}, x] && NeQ[
b^2 - 4*a*c, 0] && NeQ[e^2 - 4*d*f, 0] && NeQ[b*d - a*e, 0] && EqQ[h^2*(b*d - a*e) - 2*g*h*(c*d - a*f) + g^2*(
c*e - b*f), 0]

Rule 1049

Int[((g_.) + (h_.)*(x_))/(((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Symb
ol] :> With[{q = Rt[(c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f), 2]}, Dist[1/(2*q), Int[Simp[h*(b*d - a*e) - g*(c*
d - a*f - q) - (g*(c*e - b*f) - h*(c*d - a*f + q))*x, x]/((a + b*x + c*x^2)*Sqrt[d + e*x + f*x^2]), x], x] - D
ist[1/(2*q), Int[Simp[h*(b*d - a*e) - g*(c*d - a*f + q) - (g*(c*e - b*f) - h*(c*d - a*f - q))*x, x]/((a + b*x
+ c*x^2)*Sqrt[d + e*x + f*x^2]), x], x]] /; FreeQ[{a, b, c, d, e, f, g, h}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[e
^2 - 4*d*f, 0] && NeQ[b*d - a*e, 0] && NegQ[b^2 - 4*a*c]

Rubi steps

\begin {align*} \int \frac {1+2 x}{\sqrt {-1+6 x+x^2} \left (4+4 x+3 x^2\right )} \, dx &=-\left (\frac {1}{42} \int \frac {-70-70 x}{\sqrt {-1+6 x+x^2} \left (4+4 x+3 x^2\right )} \, dx\right )+\frac {1}{42} \int \frac {-28+14 x}{\sqrt {-1+6 x+x^2} \left (4+4 x+3 x^2\right )} \, dx\\ &=-\left (\frac {896}{3} \text {Subst}\left (\int \frac {1}{-200704+28 x^2} \, dx,x,\frac {-224-224 x}{\sqrt {-1+6 x+x^2}}\right )\right )-\frac {2800}{3} \text {Subst}\left (\int \frac {1}{627200+28 x^2} \, dx,x,\frac {280-140 x}{\sqrt {-1+6 x+x^2}}\right )\\ &=-\frac {5 \tan ^{-1}\left (\frac {\sqrt {\frac {7}{2}} (2-x)}{2 \sqrt {-1+6 x+x^2}}\right )}{6 \sqrt {14}}-\frac {\tanh ^{-1}\left (\frac {\sqrt {7} (1+x)}{\sqrt {-1+6 x+x^2}}\right )}{3 \sqrt {7}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
time = 0.18, size = 123, normalized size = 1.76 \begin {gather*} \text {RootSum}\left [171-104 \text {$\#$1}+46 \text {$\#$1}^2-8 \text {$\#$1}^3+3 \text {$\#$1}^4\&,\frac {4 \log \left (-x+\sqrt {-1+6 x+x^2}-\text {$\#$1}\right )-\log \left (-x+\sqrt {-1+6 x+x^2}-\text {$\#$1}\right ) \text {$\#$1}+\log \left (-x+\sqrt {-1+6 x+x^2}-\text {$\#$1}\right ) \text {$\#$1}^2}{-26+23 \text {$\#$1}-6 \text {$\#$1}^2+3 \text {$\#$1}^3}\&\right ] \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

RootSum[171 - 104*#1 + 46*#1^2 - 8*#1^3 + 3*#1^4 & , (4*Log[-x + Sqrt[-1 + 6*x + x^2] - #1] - Log[-x + Sqrt[-1
 + 6*x + x^2] - #1]*#1 + Log[-x + Sqrt[-1 + 6*x + x^2] - #1]*#1^2)/(-26 + 23*#1 - 6*#1^2 + 3*#1^3) & ]

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(157\) vs. \(2(53)=106\).
time = 0.63, size = 158, normalized size = 2.26

method result size
default \(-\frac {\sqrt {-\frac {6 \left (-2+x \right )^{2}}{\left (-1-x \right )^{2}}+15}\, \left (4 \sqrt {7}\, \arctanh \left (\frac {\sqrt {-\frac {6 \left (-2+x \right )^{2}}{\left (-1-x \right )^{2}}+15}\, \sqrt {7}}{21}\right )-5 \sqrt {14}\, \arctan \left (\frac {\sqrt {14}\, \sqrt {-\frac {6 \left (-2+x \right )^{2}}{\left (-1-x \right )^{2}}+15}\, \left (-2+x \right )}{4 \left (\frac {2 \left (-2+x \right )^{2}}{\left (-1-x \right )^{2}}-5\right ) \left (-1-x \right )}\right )\right )}{84 \sqrt {-\frac {3 \left (\frac {2 \left (-2+x \right )^{2}}{\left (-1-x \right )^{2}}-5\right )}{\left (\frac {-2+x}{-1-x}+1\right )^{2}}}\, \left (\frac {-2+x}{-1-x}+1\right )}\) \(158\)
trager \(-\RootOf \left (451584 \textit {\_Z}^{4}+7616 \textit {\_Z}^{2}+121\right ) \ln \left (\frac {1568802816 x \RootOf \left (451584 \textit {\_Z}^{4}+7616 \textit {\_Z}^{2}+121\right )^{5}+6019776 \RootOf \left (451584 \textit {\_Z}^{4}+7616 \textit {\_Z}^{2}+121\right )^{3} x +39686976 \RootOf \left (451584 \textit {\_Z}^{4}+7616 \textit {\_Z}^{2}+121\right )^{3}-3171168 \RootOf \left (451584 \textit {\_Z}^{4}+7616 \textit {\_Z}^{2}+121\right )^{2} \sqrt {x^{2}+6 x -1}+5768 \RootOf \left (451584 \textit {\_Z}^{4}+7616 \textit {\_Z}^{2}+121\right ) x +73542 \RootOf \left (451584 \textit {\_Z}^{4}+7616 \textit {\_Z}^{2}+121\right )-50611 \sqrt {x^{2}+6 x -1}}{2016 x \RootOf \left (451584 \textit {\_Z}^{4}+7616 \textit {\_Z}^{2}+121\right )^{2}-3 x -40}\right )+\frac {672 \ln \left (-\frac {159860736 x \RootOf \left (451584 \textit {\_Z}^{4}+7616 \textit {\_Z}^{2}+121\right )^{5}+2221632 \RootOf \left (451584 \textit {\_Z}^{4}+7616 \textit {\_Z}^{2}+121\right )^{3} x -4044096 \RootOf \left (451584 \textit {\_Z}^{4}+7616 \textit {\_Z}^{2}+121\right )^{3}-352352 \RootOf \left (451584 \textit {\_Z}^{4}+7616 \textit {\_Z}^{2}+121\right )^{2} \sqrt {x^{2}+6 x -1}-2340 \RootOf \left (451584 \textit {\_Z}^{4}+7616 \textit {\_Z}^{2}+121\right ) x +3978 \RootOf \left (451584 \textit {\_Z}^{4}+7616 \textit {\_Z}^{2}+121\right )-319 \sqrt {x^{2}+6 x -1}}{2016 x \RootOf \left (451584 \textit {\_Z}^{4}+7616 \textit {\_Z}^{2}+121\right )^{2}+37 x +40}\right ) \RootOf \left (451584 \textit {\_Z}^{4}+7616 \textit {\_Z}^{2}+121\right )^{3}}{11}+\frac {34 \ln \left (-\frac {159860736 x \RootOf \left (451584 \textit {\_Z}^{4}+7616 \textit {\_Z}^{2}+121\right )^{5}+2221632 \RootOf \left (451584 \textit {\_Z}^{4}+7616 \textit {\_Z}^{2}+121\right )^{3} x -4044096 \RootOf \left (451584 \textit {\_Z}^{4}+7616 \textit {\_Z}^{2}+121\right )^{3}-352352 \RootOf \left (451584 \textit {\_Z}^{4}+7616 \textit {\_Z}^{2}+121\right )^{2} \sqrt {x^{2}+6 x -1}-2340 \RootOf \left (451584 \textit {\_Z}^{4}+7616 \textit {\_Z}^{2}+121\right ) x +3978 \RootOf \left (451584 \textit {\_Z}^{4}+7616 \textit {\_Z}^{2}+121\right )-319 \sqrt {x^{2}+6 x -1}}{2016 x \RootOf \left (451584 \textit {\_Z}^{4}+7616 \textit {\_Z}^{2}+121\right )^{2}+37 x +40}\right ) \RootOf \left (451584 \textit {\_Z}^{4}+7616 \textit {\_Z}^{2}+121\right )}{33}\) \(504\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/84*(-6*(-2+x)^2/(-1-x)^2+15)^(1/2)*(4*7^(1/2)*arctanh(1/21*(-6*(-2+x)^2/(-1-x)^2+15)^(1/2)*7^(1/2))-5*14^(1
/2)*arctan(1/4*14^(1/2)*(-6*(-2+x)^2/(-1-x)^2+15)^(1/2)/(2*(-2+x)^2/(-1-x)^2-5)*(-2+x)/(-1-x)))/(-3*(2*(-2+x)^
2/(-1-x)^2-5)/((-2+x)/(-1-x)+1)^2)^(1/2)/((-2+x)/(-1-x)+1)

________________________________________________________________________________________

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+2*x)/(3*x^2+4*x+4)/(x^2+6*x-1)^(1/2),x, algorithm="maxima")

[Out]

integrate((2*x + 1)/((3*x^2 + 4*x + 4)*sqrt(x^2 + 6*x - 1)), x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 311 vs. \(2 (51) = 102\).
time = 0.42, size = 311, normalized size = 4.44 \begin {gather*} \frac {1}{84} \, \sqrt {14} \sqrt {2} \log \left (13068 \, \sqrt {14} \sqrt {2} {\left (x - 2\right )} + 78408 \, x^{2} - 13068 \, \sqrt {x^{2} + 6 \, x - 1} {\left (\sqrt {14} \sqrt {2} + 6 \, x + 4\right )} + 287496 \, x + 287496\right ) - \frac {1}{84} \, \sqrt {14} \sqrt {2} \log \left (-13068 \, \sqrt {14} \sqrt {2} {\left (x - 2\right )} + 78408 \, x^{2} + 13068 \, \sqrt {x^{2} + 6 \, x - 1} {\left (\sqrt {14} \sqrt {2} - 6 \, x - 4\right )} + 287496 \, x + 287496\right ) - \frac {5}{42} \, \sqrt {14} \arctan \left (\frac {1}{24} \, \sqrt {3} \sqrt {\sqrt {14} \sqrt {2} {\left (x - 2\right )} + 6 \, x^{2} - \sqrt {x^{2} + 6 \, x - 1} {\left (\sqrt {14} \sqrt {2} + 6 \, x + 4\right )} + 22 \, x + 22} {\left (\sqrt {14} + \sqrt {2}\right )} + \frac {1}{8} \, \sqrt {2} {\left (x + 3\right )} + \frac {1}{8} \, \sqrt {14} {\left (x + 1\right )} - \frac {1}{8} \, \sqrt {x^{2} + 6 \, x - 1} {\left (\sqrt {14} + \sqrt {2}\right )}\right ) - \frac {5}{42} \, \sqrt {14} \arctan \left (-\frac {1}{8} \, \sqrt {2} {\left (x + 3\right )} + \frac {1}{8} \, \sqrt {14} {\left (x + 1\right )} + \frac {1}{1584} \, \sqrt {-13068 \, \sqrt {14} \sqrt {2} {\left (x - 2\right )} + 78408 \, x^{2} + 13068 \, \sqrt {x^{2} + 6 \, x - 1} {\left (\sqrt {14} \sqrt {2} - 6 \, x - 4\right )} + 287496 \, x + 287496} {\left (\sqrt {14} - \sqrt {2}\right )} - \frac {1}{8} \, \sqrt {x^{2} + 6 \, x - 1} {\left (\sqrt {14} - \sqrt {2}\right )}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/84*sqrt(14)*sqrt(2)*log(13068*sqrt(14)*sqrt(2)*(x - 2) + 78408*x^2 - 13068*sqrt(x^2 + 6*x - 1)*(sqrt(14)*sqr
t(2) + 6*x + 4) + 287496*x + 287496) - 1/84*sqrt(14)*sqrt(2)*log(-13068*sqrt(14)*sqrt(2)*(x - 2) + 78408*x^2 +
 13068*sqrt(x^2 + 6*x - 1)*(sqrt(14)*sqrt(2) - 6*x - 4) + 287496*x + 287496) - 5/42*sqrt(14)*arctan(1/24*sqrt(
3)*sqrt(sqrt(14)*sqrt(2)*(x - 2) + 6*x^2 - sqrt(x^2 + 6*x - 1)*(sqrt(14)*sqrt(2) + 6*x + 4) + 22*x + 22)*(sqrt
(14) + sqrt(2)) + 1/8*sqrt(2)*(x + 3) + 1/8*sqrt(14)*(x + 1) - 1/8*sqrt(x^2 + 6*x - 1)*(sqrt(14) + sqrt(2))) -
 5/42*sqrt(14)*arctan(-1/8*sqrt(2)*(x + 3) + 1/8*sqrt(14)*(x + 1) + 1/1584*sqrt(-13068*sqrt(14)*sqrt(2)*(x - 2
) + 78408*x^2 + 13068*sqrt(x^2 + 6*x - 1)*(sqrt(14)*sqrt(2) - 6*x - 4) + 287496*x + 287496)*(sqrt(14) - sqrt(2
)) - 1/8*sqrt(x^2 + 6*x - 1)*(sqrt(14) - sqrt(2)))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {2 x + 1}{\sqrt {x^{2} + 6 x - 1} \cdot \left (3 x^{2} + 4 x + 4\right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 257 vs. \(2 (51) = 102\).
time = 0.55, size = 257, normalized size = 3.67 \begin {gather*} -\frac {5}{84} \, \sqrt {7} \sqrt {2} {\left (\arctan \left (2\right ) + \arctan \left (\frac {1}{8} \, {\left (x - \sqrt {x^{2} + 6 \, x - 1}\right )} {\left (\sqrt {14} + \sqrt {2}\right )} + \frac {1}{8} \, \sqrt {14} + \frac {3}{8} \, \sqrt {2}\right )\right )} + \frac {5}{84} \, \sqrt {7} \sqrt {2} {\left (\arctan \left (\frac {1}{2}\right ) + \arctan \left (-\frac {1}{8} \, {\left (x - \sqrt {x^{2} + 6 \, x - 1}\right )} {\left (\sqrt {14} - \sqrt {2}\right )} - \frac {1}{8} \, \sqrt {14} + \frac {3}{8} \, \sqrt {2}\right )\right )} + \frac {1}{42} \, \sqrt {7} \log \left (4 \, {\left (4 \, \sqrt {7} \sqrt {2} + 3 \, x + \sqrt {7} - 4 \, \sqrt {2} - 3 \, \sqrt {x^{2} + 6 \, x - 1} + 2\right )}^{2} + 16 \, {\left (\sqrt {7} \sqrt {2} - 3 \, x - \sqrt {7} - \sqrt {2} + 3 \, \sqrt {x^{2} + 6 \, x - 1} - 2\right )}^{2}\right ) - \frac {1}{42} \, \sqrt {7} \log \left (4 \, {\left (4 \, \sqrt {7} \sqrt {2} + 3 \, x - \sqrt {7} + 4 \, \sqrt {2} - 3 \, \sqrt {x^{2} + 6 \, x - 1} + 2\right )}^{2} + 16 \, {\left (\sqrt {7} \sqrt {2} - 3 \, x + \sqrt {7} + \sqrt {2} + 3 \, \sqrt {x^{2} + 6 \, x - 1} - 2\right )}^{2}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-5/84*sqrt(7)*sqrt(2)*(arctan(2) + arctan(1/8*(x - sqrt(x^2 + 6*x - 1))*(sqrt(14) + sqrt(2)) + 1/8*sqrt(14) +
3/8*sqrt(2))) + 5/84*sqrt(7)*sqrt(2)*(arctan(1/2) + arctan(-1/8*(x - sqrt(x^2 + 6*x - 1))*(sqrt(14) - sqrt(2))
 - 1/8*sqrt(14) + 3/8*sqrt(2))) + 1/42*sqrt(7)*log(4*(4*sqrt(7)*sqrt(2) + 3*x + sqrt(7) - 4*sqrt(2) - 3*sqrt(x
^2 + 6*x - 1) + 2)^2 + 16*(sqrt(7)*sqrt(2) - 3*x - sqrt(7) - sqrt(2) + 3*sqrt(x^2 + 6*x - 1) - 2)^2) - 1/42*sq
rt(7)*log(4*(4*sqrt(7)*sqrt(2) + 3*x - sqrt(7) + 4*sqrt(2) - 3*sqrt(x^2 + 6*x - 1) + 2)^2 + 16*(sqrt(7)*sqrt(2
) - 3*x + sqrt(7) + sqrt(2) + 3*sqrt(x^2 + 6*x - 1) - 2)^2)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________