### 3.217 $$\int \frac{-32+5 x-27 x^2+4 x^3}{-70-299 x-286 x^2+50 x^3-13 x^4+30 x^5} \, dx$$

Optimal. Leaf size=63 $\frac{11049 \log \left (x^2+x+5\right )}{260015}-\frac{3146 \log (7-3 x)}{80155}-\frac{334}{323} \log (2 x+1)+\frac{4822 \log (5 x+2)}{4879}+\frac{3988 \tan ^{-1}\left (\frac{2 x+1}{\sqrt{19}}\right )}{13685 \sqrt{19}}$

[Out]

(3988*ArcTan[(1 + 2*x)/Sqrt[19]])/(13685*Sqrt[19]) - (3146*Log[7 - 3*x])/80155 - (334*Log[1 + 2*x])/323 + (482
2*Log[2 + 5*x])/4879 + (11049*Log[5 + x + x^2])/260015

________________________________________________________________________________________

Rubi [A]  time = 0.0867445, antiderivative size = 63, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 43, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.116, Rules used = {2074, 634, 618, 204, 628} $\frac{11049 \log \left (x^2+x+5\right )}{260015}-\frac{3146 \log (7-3 x)}{80155}-\frac{334}{323} \log (2 x+1)+\frac{4822 \log (5 x+2)}{4879}+\frac{3988 \tan ^{-1}\left (\frac{2 x+1}{\sqrt{19}}\right )}{13685 \sqrt{19}}$

Antiderivative was successfully veriﬁed.

[In]

Int[(-32 + 5*x - 27*x^2 + 4*x^3)/(-70 - 299*x - 286*x^2 + 50*x^3 - 13*x^4 + 30*x^5),x]

[Out]

(3988*ArcTan[(1 + 2*x)/Sqrt[19]])/(13685*Sqrt[19]) - (3146*Log[7 - 3*x])/80155 - (334*Log[1 + 2*x])/323 + (482
2*Log[2 + 5*x])/4879 + (11049*Log[5 + x + x^2])/260015

Rule 2074

Int[(P_)^(p_)*(Q_)^(q_.), x_Symbol] :> With[{PP = Factor[P]}, Int[ExpandIntegrand[PP^p*Q^q, x], x] /;  !SumQ[N
onfreeFactors[PP, x]]] /; FreeQ[q, x] && PolyQ[P, x] && PolyQ[Q, x] && IntegerQ[p] && NeQ[P, x]

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{-32+5 x-27 x^2+4 x^3}{-70-299 x-286 x^2+50 x^3-13 x^4+30 x^5} \, dx &=\int \left (-\frac{668}{323 (1+2 x)}-\frac{9438}{80155 (-7+3 x)}+\frac{24110}{4879 (2+5 x)}+\frac{48935+22098 x}{260015 \left (5+x+x^2\right )}\right ) \, dx\\ &=-\frac{3146 \log (7-3 x)}{80155}-\frac{334}{323} \log (1+2 x)+\frac{4822 \log (2+5 x)}{4879}+\frac{\int \frac{48935+22098 x}{5+x+x^2} \, dx}{260015}\\ &=-\frac{3146 \log (7-3 x)}{80155}-\frac{334}{323} \log (1+2 x)+\frac{4822 \log (2+5 x)}{4879}+\frac{11049 \int \frac{1+2 x}{5+x+x^2} \, dx}{260015}+\frac{1994 \int \frac{1}{5+x+x^2} \, dx}{13685}\\ &=-\frac{3146 \log (7-3 x)}{80155}-\frac{334}{323} \log (1+2 x)+\frac{4822 \log (2+5 x)}{4879}+\frac{11049 \log \left (5+x+x^2\right )}{260015}-\frac{3988 \operatorname{Subst}\left (\int \frac{1}{-19-x^2} \, dx,x,1+2 x\right )}{13685}\\ &=\frac{3988 \tan ^{-1}\left (\frac{1+2 x}{\sqrt{19}}\right )}{13685 \sqrt{19}}-\frac{3146 \log (7-3 x)}{80155}-\frac{334}{323} \log (1+2 x)+\frac{4822 \log (2+5 x)}{4879}+\frac{11049 \log \left (5+x+x^2\right )}{260015}\\ \end{align*}

Mathematica [A]  time = 0.0265904, size = 57, normalized size = 0.9 $\frac{453009 \log \left (x^2+x+5\right )-418418 \log (7-3 x)-11023670 \log (2 x+1)+10536070 \log (5 x+2)+163508 \sqrt{19} \tan ^{-1}\left (\frac{2 x+1}{\sqrt{19}}\right )}{10660615}$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(-32 + 5*x - 27*x^2 + 4*x^3)/(-70 - 299*x - 286*x^2 + 50*x^3 - 13*x^4 + 30*x^5),x]

[Out]

(163508*Sqrt[19]*ArcTan[(1 + 2*x)/Sqrt[19]] - 418418*Log[7 - 3*x] - 11023670*Log[1 + 2*x] + 10536070*Log[2 + 5
*x] + 453009*Log[5 + x + x^2])/10660615

________________________________________________________________________________________

Maple [A]  time = 0.012, size = 51, normalized size = 0.8 \begin{align*}{\frac{4822\,\ln \left ( 2+5\,x \right ) }{4879}}-{\frac{3146\,\ln \left ( 3\,x-7 \right ) }{80155}}-{\frac{334\,\ln \left ( 1+2\,x \right ) }{323}}+{\frac{11049\,\ln \left ({x}^{2}+x+5 \right ) }{260015}}+{\frac{3988\,\sqrt{19}}{260015}\arctan \left ({\frac{ \left ( 1+2\,x \right ) \sqrt{19}}{19}} \right ) } \end{align*}

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

[In]

int((4*x^3-27*x^2+5*x-32)/(30*x^5-13*x^4+50*x^3-286*x^2-299*x-70),x)

[Out]

4822/4879*ln(2+5*x)-3146/80155*ln(3*x-7)-334/323*ln(1+2*x)+11049/260015*ln(x^2+x+5)+3988/260015*arctan(1/19*(1
+2*x)*19^(1/2))*19^(1/2)

________________________________________________________________________________________

Maxima [A]  time = 1.41807, size = 68, normalized size = 1.08 \begin{align*} \frac{3988}{260015} \, \sqrt{19} \arctan \left (\frac{1}{19} \, \sqrt{19}{\left (2 \, x + 1\right )}\right ) + \frac{11049}{260015} \, \log \left (x^{2} + x + 5\right ) + \frac{4822}{4879} \, \log \left (5 \, x + 2\right ) - \frac{3146}{80155} \, \log \left (3 \, x - 7\right ) - \frac{334}{323} \, \log \left (2 \, x + 1\right ) \end{align*}

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

[In]

integrate((4*x^3-27*x^2+5*x-32)/(30*x^5-13*x^4+50*x^3-286*x^2-299*x-70),x, algorithm="maxima")

[Out]

3988/260015*sqrt(19)*arctan(1/19*sqrt(19)*(2*x + 1)) + 11049/260015*log(x^2 + x + 5) + 4822/4879*log(5*x + 2)
- 3146/80155*log(3*x - 7) - 334/323*log(2*x + 1)

________________________________________________________________________________________

Fricas [A]  time = 1.90173, size = 216, normalized size = 3.43 \begin{align*} \frac{3988}{260015} \, \sqrt{19} \arctan \left (\frac{1}{19} \, \sqrt{19}{\left (2 \, x + 1\right )}\right ) + \frac{11049}{260015} \, \log \left (x^{2} + x + 5\right ) + \frac{4822}{4879} \, \log \left (5 \, x + 2\right ) - \frac{3146}{80155} \, \log \left (3 \, x - 7\right ) - \frac{334}{323} \, \log \left (2 \, x + 1\right ) \end{align*}

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

[In]

integrate((4*x^3-27*x^2+5*x-32)/(30*x^5-13*x^4+50*x^3-286*x^2-299*x-70),x, algorithm="fricas")

[Out]

3988/260015*sqrt(19)*arctan(1/19*sqrt(19)*(2*x + 1)) + 11049/260015*log(x^2 + x + 5) + 4822/4879*log(5*x + 2)
- 3146/80155*log(3*x - 7) - 334/323*log(2*x + 1)

________________________________________________________________________________________

Sympy [A]  time = 0.317007, size = 68, normalized size = 1.08 \begin{align*} - \frac{3146 \log{\left (x - \frac{7}{3} \right )}}{80155} + \frac{4822 \log{\left (x + \frac{2}{5} \right )}}{4879} - \frac{334 \log{\left (x + \frac{1}{2} \right )}}{323} + \frac{11049 \log{\left (x^{2} + x + 5 \right )}}{260015} + \frac{3988 \sqrt{19} \operatorname{atan}{\left (\frac{2 \sqrt{19} x}{19} + \frac{\sqrt{19}}{19} \right )}}{260015} \end{align*}

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

[In]

integrate((4*x**3-27*x**2+5*x-32)/(30*x**5-13*x**4+50*x**3-286*x**2-299*x-70),x)

[Out]

-3146*log(x - 7/3)/80155 + 4822*log(x + 2/5)/4879 - 334*log(x + 1/2)/323 + 11049*log(x**2 + x + 5)/260015 + 39
88*sqrt(19)*atan(2*sqrt(19)*x/19 + sqrt(19)/19)/260015

________________________________________________________________________________________

Giac [A]  time = 1.06043, size = 72, normalized size = 1.14 \begin{align*} \frac{3988}{260015} \, \sqrt{19} \arctan \left (\frac{1}{19} \, \sqrt{19}{\left (2 \, x + 1\right )}\right ) + \frac{11049}{260015} \, \log \left (x^{2} + x + 5\right ) + \frac{4822}{4879} \, \log \left ({\left | 5 \, x + 2 \right |}\right ) - \frac{3146}{80155} \, \log \left ({\left | 3 \, x - 7 \right |}\right ) - \frac{334}{323} \, \log \left ({\left | 2 \, x + 1 \right |}\right ) \end{align*}

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

[In]

integrate((4*x^3-27*x^2+5*x-32)/(30*x^5-13*x^4+50*x^3-286*x^2-299*x-70),x, algorithm="giac")

[Out]

3988/260015*sqrt(19)*arctan(1/19*sqrt(19)*(2*x + 1)) + 11049/260015*log(x^2 + x + 5) + 4822/4879*log(abs(5*x +
2)) - 3146/80155*log(abs(3*x - 7)) - 334/323*log(abs(2*x + 1))