### 3.314 $$\int \frac{2+x+3 x^2-5 x^3+4 x^4}{(3+2 x+5 x^2)^2} \, dx$$

Optimal. Leaf size=63 $-\frac{423 x+1367}{3500 \left (5 x^2+2 x+3\right )}-\frac{41}{250} \log \left (5 x^2+2 x+3\right )+\frac{4 x}{25}+\frac{1313 \tan ^{-1}\left (\frac{5 x+1}{\sqrt{14}}\right )}{3500 \sqrt{14}}$

[Out]

(4*x)/25 - (1367 + 423*x)/(3500*(3 + 2*x + 5*x^2)) + (1313*ArcTan[(1 + 5*x)/Sqrt[14]])/(3500*Sqrt[14]) - (41*L
og[3 + 2*x + 5*x^2])/250

________________________________________________________________________________________

Rubi [A]  time = 0.0773302, antiderivative size = 63, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 31, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.194, Rules used = {1660, 1657, 634, 618, 204, 628} $-\frac{423 x+1367}{3500 \left (5 x^2+2 x+3\right )}-\frac{41}{250} \log \left (5 x^2+2 x+3\right )+\frac{4 x}{25}+\frac{1313 \tan ^{-1}\left (\frac{5 x+1}{\sqrt{14}}\right )}{3500 \sqrt{14}}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(4*x)/25 - (1367 + 423*x)/(3500*(3 + 2*x + 5*x^2)) + (1313*ArcTan[(1 + 5*x)/Sqrt[14]])/(3500*Sqrt[14]) - (41*L
og[3 + 2*x + 5*x^2])/250

Rule 1660

Int[(Pq_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x + c*
x^2, x], f = Coeff[PolynomialRemainder[Pq, a + b*x + c*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b
*x + c*x^2, x], x, 1]}, Simp[((b*f - 2*a*g + (2*c*f - b*g)*x)*(a + b*x + c*x^2)^(p + 1))/((p + 1)*(b^2 - 4*a*c
)), x] + Dist[1/((p + 1)*(b^2 - 4*a*c)), Int[(a + b*x + c*x^2)^(p + 1)*ExpandToSum[(p + 1)*(b^2 - 4*a*c)*Q - (
2*p + 3)*(2*c*f - b*g), x], x], x]] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1
]

Rule 1657

Int[(Pq_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x + c*x^2)^p, x
], x] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

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{2+x+3 x^2-5 x^3+4 x^4}{\left (3+2 x+5 x^2\right )^2} \, dx &=-\frac{1367+423 x}{3500 \left (3+2 x+5 x^2\right )}+\frac{1}{56} \int \frac{\frac{738}{25}-\frac{1848 x}{25}+\frac{224 x^2}{5}}{3+2 x+5 x^2} \, dx\\ &=-\frac{1367+423 x}{3500 \left (3+2 x+5 x^2\right )}+\frac{1}{56} \int \left (\frac{224}{25}+\frac{2 (33-1148 x)}{25 \left (3+2 x+5 x^2\right )}\right ) \, dx\\ &=\frac{4 x}{25}-\frac{1367+423 x}{3500 \left (3+2 x+5 x^2\right )}+\frac{1}{700} \int \frac{33-1148 x}{3+2 x+5 x^2} \, dx\\ &=\frac{4 x}{25}-\frac{1367+423 x}{3500 \left (3+2 x+5 x^2\right )}-\frac{41}{250} \int \frac{2+10 x}{3+2 x+5 x^2} \, dx+\frac{1313 \int \frac{1}{3+2 x+5 x^2} \, dx}{3500}\\ &=\frac{4 x}{25}-\frac{1367+423 x}{3500 \left (3+2 x+5 x^2\right )}-\frac{41}{250} \log \left (3+2 x+5 x^2\right )-\frac{1313 \operatorname{Subst}\left (\int \frac{1}{-56-x^2} \, dx,x,2+10 x\right )}{1750}\\ &=\frac{4 x}{25}-\frac{1367+423 x}{3500 \left (3+2 x+5 x^2\right )}+\frac{1313 \tan ^{-1}\left (\frac{1+5 x}{\sqrt{14}}\right )}{3500 \sqrt{14}}-\frac{41}{250} \log \left (3+2 x+5 x^2\right )\\ \end{align*}

Mathematica [A]  time = 0.0367986, size = 59, normalized size = 0.94 $\frac{-\frac{14 (423 x+1367)}{5 x^2+2 x+3}-8036 \log \left (5 x^2+2 x+3\right )+7840 x+1313 \sqrt{14} \tan ^{-1}\left (\frac{5 x+1}{\sqrt{14}}\right )}{49000}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(7840*x - (14*(1367 + 423*x))/(3 + 2*x + 5*x^2) + 1313*Sqrt[14]*ArcTan[(1 + 5*x)/Sqrt[14]] - 8036*Log[3 + 2*x
+ 5*x^2])/49000

________________________________________________________________________________________

Maple [A]  time = 0.048, size = 51, normalized size = 0.8 \begin{align*}{\frac{4\,x}{25}}-{\frac{1}{25} \left ({\frac{423\,x}{700}}+{\frac{1367}{700}} \right ) \left ({x}^{2}+{\frac{2\,x}{5}}+{\frac{3}{5}} \right ) ^{-1}}-{\frac{41\,\ln \left ( 5\,{x}^{2}+2\,x+3 \right ) }{250}}+{\frac{1313\,\sqrt{14}}{49000}\arctan \left ({\frac{ \left ( 10\,x+2 \right ) \sqrt{14}}{28}} \right ) } \end{align*}

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

[In]

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

[Out]

4/25*x-1/25*(423/700*x+1367/700)/(x^2+2/5*x+3/5)-41/250*ln(5*x^2+2*x+3)+1313/49000*14^(1/2)*arctan(1/28*(10*x+
2)*14^(1/2))

________________________________________________________________________________________

Maxima [A]  time = 1.50011, size = 70, normalized size = 1.11 \begin{align*} \frac{1313}{49000} \, \sqrt{14} \arctan \left (\frac{1}{14} \, \sqrt{14}{\left (5 \, x + 1\right )}\right ) + \frac{4}{25} \, x - \frac{423 \, x + 1367}{3500 \,{\left (5 \, x^{2} + 2 \, x + 3\right )}} - \frac{41}{250} \, \log \left (5 \, x^{2} + 2 \, x + 3\right ) \end{align*}

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

[In]

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

[Out]

1313/49000*sqrt(14)*arctan(1/14*sqrt(14)*(5*x + 1)) + 4/25*x - 1/3500*(423*x + 1367)/(5*x^2 + 2*x + 3) - 41/25
0*log(5*x^2 + 2*x + 3)

________________________________________________________________________________________

Fricas [A]  time = 1.23975, size = 244, normalized size = 3.87 \begin{align*} \frac{39200 \, x^{3} + 1313 \, \sqrt{14}{\left (5 \, x^{2} + 2 \, x + 3\right )} \arctan \left (\frac{1}{14} \, \sqrt{14}{\left (5 \, x + 1\right )}\right ) + 15680 \, x^{2} - 8036 \,{\left (5 \, x^{2} + 2 \, x + 3\right )} \log \left (5 \, x^{2} + 2 \, x + 3\right ) + 17598 \, x - 19138}{49000 \,{\left (5 \, x^{2} + 2 \, x + 3\right )}} \end{align*}

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

[In]

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

[Out]

1/49000*(39200*x^3 + 1313*sqrt(14)*(5*x^2 + 2*x + 3)*arctan(1/14*sqrt(14)*(5*x + 1)) + 15680*x^2 - 8036*(5*x^2
+ 2*x + 3)*log(5*x^2 + 2*x + 3) + 17598*x - 19138)/(5*x^2 + 2*x + 3)

________________________________________________________________________________________

Sympy [A]  time = 0.171049, size = 63, normalized size = 1. \begin{align*} \frac{4 x}{25} - \frac{423 x + 1367}{17500 x^{2} + 7000 x + 10500} - \frac{41 \log{\left (x^{2} + \frac{2 x}{5} + \frac{3}{5} \right )}}{250} + \frac{1313 \sqrt{14} \operatorname{atan}{\left (\frac{5 \sqrt{14} x}{14} + \frac{\sqrt{14}}{14} \right )}}{49000} \end{align*}

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

[In]

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

[Out]

4*x/25 - (423*x + 1367)/(17500*x**2 + 7000*x + 10500) - 41*log(x**2 + 2*x/5 + 3/5)/250 + 1313*sqrt(14)*atan(5*
sqrt(14)*x/14 + sqrt(14)/14)/49000

________________________________________________________________________________________

Giac [A]  time = 1.16164, size = 70, normalized size = 1.11 \begin{align*} \frac{1313}{49000} \, \sqrt{14} \arctan \left (\frac{1}{14} \, \sqrt{14}{\left (5 \, x + 1\right )}\right ) + \frac{4}{25} \, x - \frac{423 \, x + 1367}{3500 \,{\left (5 \, x^{2} + 2 \, x + 3\right )}} - \frac{41}{250} \, \log \left (5 \, x^{2} + 2 \, x + 3\right ) \end{align*}

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

[In]

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

[Out]

1313/49000*sqrt(14)*arctan(1/14*sqrt(14)*(5*x + 1)) + 4/25*x - 1/3500*(423*x + 1367)/(5*x^2 + 2*x + 3) - 41/25
0*log(5*x^2 + 2*x + 3)