### 3.171 $$\int \frac{1+16 x}{(5+x)^2 (-3+2 x) (1+x+x^2)} \, dx$$

Optimal. Leaf size=60 $-\frac{481 \log \left (x^2+x+1\right )}{5586}-\frac{79}{273 (x+5)}+\frac{200 \log (3-2 x)}{3211}+\frac{2731 \log (x+5)}{24843}+\frac{451 \tan ^{-1}\left (\frac{2 x+1}{\sqrt{3}}\right )}{2793 \sqrt{3}}$

[Out]

-79/(273*(5 + x)) + (451*ArcTan[(1 + 2*x)/Sqrt[3]])/(2793*Sqrt[3]) + (200*Log[3 - 2*x])/3211 + (2731*Log[5 + x
])/24843 - (481*Log[1 + x + x^2])/5586

________________________________________________________________________________________

Rubi [A]  time = 0.254217, antiderivative size = 60, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 26, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.192, Rules used = {6728, 634, 618, 204, 628} $-\frac{481 \log \left (x^2+x+1\right )}{5586}-\frac{79}{273 (x+5)}+\frac{200 \log (3-2 x)}{3211}+\frac{2731 \log (x+5)}{24843}+\frac{451 \tan ^{-1}\left (\frac{2 x+1}{\sqrt{3}}\right )}{2793 \sqrt{3}}$

Antiderivative was successfully veriﬁed.

[In]

Int[(1 + 16*x)/((5 + x)^2*(-3 + 2*x)*(1 + x + x^2)),x]

[Out]

-79/(273*(5 + x)) + (451*ArcTan[(1 + 2*x)/Sqrt[3]])/(2793*Sqrt[3]) + (200*Log[3 - 2*x])/3211 + (2731*Log[5 + x
])/24843 - (481*Log[1 + x + x^2])/5586

Rule 6728

Int[(u_)/((a_.) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.)), x_Symbol] :> With[{v = RationalFunctionExpand[u/(a +
b*x^n + c*x^(2*n)), x]}, Int[v, x] /; SumQ[v]] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] && IGtQ[n, 0]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

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

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{1+16 x}{(5+x)^2 (-3+2 x) \left (1+x+x^2\right )} \, dx &=\int \left (\frac{79}{273 (5+x)^2}+\frac{2731}{24843 (5+x)}+\frac{400}{3211 (-3+2 x)}+\frac{-15-481 x}{2793 \left (1+x+x^2\right )}\right ) \, dx\\ &=-\frac{79}{273 (5+x)}+\frac{200 \log (3-2 x)}{3211}+\frac{2731 \log (5+x)}{24843}+\frac{\int \frac{-15-481 x}{1+x+x^2} \, dx}{2793}\\ &=-\frac{79}{273 (5+x)}+\frac{200 \log (3-2 x)}{3211}+\frac{2731 \log (5+x)}{24843}+\frac{451 \int \frac{1}{1+x+x^2} \, dx}{5586}-\frac{481 \int \frac{1+2 x}{1+x+x^2} \, dx}{5586}\\ &=-\frac{79}{273 (5+x)}+\frac{200 \log (3-2 x)}{3211}+\frac{2731 \log (5+x)}{24843}-\frac{481 \log \left (1+x+x^2\right )}{5586}-\frac{451 \operatorname{Subst}\left (\int \frac{1}{-3-x^2} \, dx,x,1+2 x\right )}{2793}\\ &=-\frac{79}{273 (5+x)}+\frac{451 \tan ^{-1}\left (\frac{1+2 x}{\sqrt{3}}\right )}{2793 \sqrt{3}}+\frac{200 \log (3-2 x)}{3211}+\frac{2731 \log (5+x)}{24843}-\frac{481 \log \left (1+x+x^2\right )}{5586}\\ \end{align*}

Mathematica [A]  time = 0.0522483, size = 54, normalized size = 0.9 $\frac{-243867 \log \left (x^2+x+1\right )-\frac{819546}{x+5}+176400 \log (3-2 x)+311334 \log (x+5)+152438 \sqrt{3} \tan ^{-1}\left (\frac{2 x+1}{\sqrt{3}}\right )}{2832102}$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(1 + 16*x)/((5 + x)^2*(-3 + 2*x)*(1 + x + x^2)),x]

[Out]

(-819546/(5 + x) + 152438*Sqrt[3]*ArcTan[(1 + 2*x)/Sqrt[3]] + 176400*Log[3 - 2*x] + 311334*Log[5 + x] - 243867
*Log[1 + x + x^2])/2832102

________________________________________________________________________________________

Maple [A]  time = 0.009, size = 48, normalized size = 0.8 \begin{align*} -{\frac{79}{1365+273\,x}}+{\frac{2731\,\ln \left ( 5+x \right ) }{24843}}+{\frac{200\,\ln \left ( -3+2\,x \right ) }{3211}}-{\frac{481\,\ln \left ({x}^{2}+x+1 \right ) }{5586}}+{\frac{451\,\sqrt{3}}{8379}\arctan \left ({\frac{ \left ( 1+2\,x \right ) \sqrt{3}}{3}} \right ) } \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int((1+16*x)/(5+x)^2/(-3+2*x)/(x^2+x+1),x)

[Out]

-79/273/(5+x)+2731/24843*ln(5+x)+200/3211*ln(-3+2*x)-481/5586*ln(x^2+x+1)+451/8379*arctan(1/3*(1+2*x)*3^(1/2))
*3^(1/2)

________________________________________________________________________________________

Maxima [A]  time = 1.41567, size = 63, normalized size = 1.05 \begin{align*} \frac{451}{8379} \, \sqrt{3} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x + 1\right )}\right ) - \frac{79}{273 \,{\left (x + 5\right )}} - \frac{481}{5586} \, \log \left (x^{2} + x + 1\right ) + \frac{200}{3211} \, \log \left (2 \, x - 3\right ) + \frac{2731}{24843} \, \log \left (x + 5\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

451/8379*sqrt(3)*arctan(1/3*sqrt(3)*(2*x + 1)) - 79/273/(x + 5) - 481/5586*log(x^2 + x + 1) + 200/3211*log(2*x
- 3) + 2731/24843*log(x + 5)

________________________________________________________________________________________

Fricas [A]  time = 2.00764, size = 236, normalized size = 3.93 \begin{align*} \frac{152438 \, \sqrt{3}{\left (x + 5\right )} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x + 1\right )}\right ) - 243867 \,{\left (x + 5\right )} \log \left (x^{2} + x + 1\right ) + 176400 \,{\left (x + 5\right )} \log \left (2 \, x - 3\right ) + 311334 \,{\left (x + 5\right )} \log \left (x + 5\right ) - 819546}{2832102 \,{\left (x + 5\right )}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2832102*(152438*sqrt(3)*(x + 5)*arctan(1/3*sqrt(3)*(2*x + 1)) - 243867*(x + 5)*log(x^2 + x + 1) + 176400*(x
+ 5)*log(2*x - 3) + 311334*(x + 5)*log(x + 5) - 819546)/(x + 5)

________________________________________________________________________________________

Sympy [A]  time = 0.227584, size = 63, normalized size = 1.05 \begin{align*} \frac{200 \log{\left (x - \frac{3}{2} \right )}}{3211} + \frac{2731 \log{\left (x + 5 \right )}}{24843} - \frac{481 \log{\left (x^{2} + x + 1 \right )}}{5586} + \frac{451 \sqrt{3} \operatorname{atan}{\left (\frac{2 \sqrt{3} x}{3} + \frac{\sqrt{3}}{3} \right )}}{8379} - \frac{79}{273 x + 1365} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+16*x)/(5+x)**2/(-3+2*x)/(x**2+x+1),x)

[Out]

200*log(x - 3/2)/3211 + 2731*log(x + 5)/24843 - 481*log(x**2 + x + 1)/5586 + 451*sqrt(3)*atan(2*sqrt(3)*x/3 +
sqrt(3)/3)/8379 - 79/(273*x + 1365)

________________________________________________________________________________________

Giac [A]  time = 1.0654, size = 81, normalized size = 1.35 \begin{align*} \frac{451}{8379} \, \sqrt{3} \arctan \left (-\sqrt{3}{\left (\frac{14}{x + 5} - 3\right )}\right ) - \frac{79}{273 \,{\left (x + 5\right )}} - \frac{481}{5586} \, \log \left (-\frac{9}{x + 5} + \frac{21}{{\left (x + 5\right )}^{2}} + 1\right ) + \frac{200}{3211} \, \log \left ({\left | -\frac{13}{x + 5} + 2 \right |}\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

451/8379*sqrt(3)*arctan(-sqrt(3)*(14/(x + 5) - 3)) - 79/273/(x + 5) - 481/5586*log(-9/(x + 5) + 21/(x + 5)^2 +
1) + 200/3211*log(abs(-13/(x + 5) + 2))