\(\int \frac {(d+e x)^2 (2+x+3 x^2-5 x^3+4 x^4)}{(3+2 x+5 x^2)^2} \, dx\) [147]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [C] (verification not implemented)
Maxima [A] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 38, antiderivative size = 160 \[ \int \frac {(d+e x)^2 \left (2+x+3 x^2-5 x^3+4 x^4\right )}{\left (3+2 x+5 x^2\right )^2} \, dx=\frac {1}{625} \left (100 d^2-410 d e+103 e^2\right ) x+\frac {1}{250} (40 d-41 e) e x^2+\frac {4 e^2 x^3}{75}-\frac {34175 d^2-12690 d e-17967 e^2+\left (10575 d^2+59890 d e-18323 e^2\right ) x}{87500 \left (3+2 x+5 x^2\right )}+\frac {\left (32825 d^2+211710 d e-73881 e^2\right ) \arctan \left (\frac {1+5 x}{\sqrt {14}}\right )}{87500 \sqrt {14}}-\frac {\left (1025 d^2-1030 d e-867 e^2\right ) \log \left (3+2 x+5 x^2\right )}{6250} \] Output:

1/625*(100*d^2-410*d*e+103*e^2)*x+1/250*(40*d-41*e)*e*x^2+4/75*e^2*x^3-(34 
175*d^2-12690*d*e-17967*e^2+(10575*d^2+59890*d*e-18323*e^2)*x)/(437500*x^2 
+175000*x+262500)+1/1225000*(32825*d^2+211710*d*e-73881*e^2)*arctan(1/14*( 
1+5*x)*14^(1/2))*14^(1/2)-1/6250*(1025*d^2-1030*d*e-867*e^2)*ln(5*x^2+2*x+ 
3)
 

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 150, normalized size of antiderivative = 0.94 \[ \int \frac {(d+e x)^2 \left (2+x+3 x^2-5 x^3+4 x^4\right )}{\left (3+2 x+5 x^2\right )^2} \, dx=\frac {5880 \left (100 d^2-410 d e+103 e^2\right ) x+14700 (40 d-41 e) e x^2+196000 e^2 x^3-\frac {42 \left (25 d^2 (1367+423 x)+10 d e (-1269+5989 x)-e^2 (17967+18323 x)\right )}{3+2 x+5 x^2}+3 \sqrt {14} \left (32825 d^2+211710 d e-73881 e^2\right ) \arctan \left (\frac {1+5 x}{\sqrt {14}}\right )+588 \left (-1025 d^2+1030 d e+867 e^2\right ) \log \left (3+2 x+5 x^2\right )}{3675000} \] Input:

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

Output:

(5880*(100*d^2 - 410*d*e + 103*e^2)*x + 14700*(40*d - 41*e)*e*x^2 + 196000 
*e^2*x^3 - (42*(25*d^2*(1367 + 423*x) + 10*d*e*(-1269 + 5989*x) - e^2*(179 
67 + 18323*x)))/(3 + 2*x + 5*x^2) + 3*Sqrt[14]*(32825*d^2 + 211710*d*e - 7 
3881*e^2)*ArcTan[(1 + 5*x)/Sqrt[14]] + 588*(-1025*d^2 + 1030*d*e + 867*e^2 
)*Log[3 + 2*x + 5*x^2])/3675000
 

Rubi [A] (verified)

Time = 0.74 (sec) , antiderivative size = 143, normalized size of antiderivative = 0.89, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2175, 27, 2159, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\left (4 x^4-5 x^3+3 x^2+x+2\right ) (d+e x)^2}{\left (5 x^2+2 x+3\right )^2} \, dx\)

\(\Big \downarrow \) 2175

\(\displaystyle \frac {1}{56} \int \frac {2 (d+e x) \left (2800 e x^3+140 (20 d-33 e) x^2-3 (1540 d-897 e) x+1845 d+2734 e\right )}{125 \left (5 x^2+2 x+3\right )}dx-\frac {(423 x+1367) (d+e x)^2}{3500 \left (5 x^2+2 x+3\right )}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\int \frac {(d+e x) \left (2800 e x^3+140 (20 d-33 e) x^2-3 (1540 d-897 e) x+1845 d+2734 e\right )}{5 x^2+2 x+3}dx}{3500}-\frac {(423 x+1367) (d+e x)^2}{3500 \left (5 x^2+2 x+3\right )}\)

\(\Big \downarrow \) 2159

\(\displaystyle \frac {\int \left (560 e^2 x^2+28 (40 d-41 e) e x+\frac {1}{5} \left (2800 d^2-11480 e d+3307 e^2\right )+\frac {825 d^2+48110 e d-9921 e^2-28 \left (1025 d^2-1030 e d-867 e^2\right ) x}{5 \left (5 x^2+2 x+3\right )}\right )dx}{3500}-\frac {(423 x+1367) (d+e x)^2}{3500 \left (5 x^2+2 x+3\right )}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\frac {\arctan \left (\frac {5 x+1}{\sqrt {14}}\right ) \left (32825 d^2+211710 d e-73881 e^2\right )}{25 \sqrt {14}}-\frac {14}{25} \left (1025 d^2-1030 d e-867 e^2\right ) \log \left (5 x^2+2 x+3\right )+\frac {1}{5} x \left (2800 d^2-11480 d e+3307 e^2\right )+14 e x^2 (40 d-41 e)+\frac {560 e^2 x^3}{3}}{3500}-\frac {(423 x+1367) (d+e x)^2}{3500 \left (5 x^2+2 x+3\right )}\)

Input:

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

Output:

-1/3500*((1367 + 423*x)*(d + e*x)^2)/(3 + 2*x + 5*x^2) + (((2800*d^2 - 114 
80*d*e + 3307*e^2)*x)/5 + 14*(40*d - 41*e)*e*x^2 + (560*e^2*x^3)/3 + ((328 
25*d^2 + 211710*d*e - 73881*e^2)*ArcTan[(1 + 5*x)/Sqrt[14]])/(25*Sqrt[14]) 
 - (14*(1025*d^2 - 1030*d*e - 867*e^2)*Log[3 + 2*x + 5*x^2])/25)/3500
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2159
Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p 
_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*Pq*(a + b*x + c*x^2)^p, x 
], x] /; FreeQ[{a, b, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]
 

rule 2175
Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p 
_), x_Symbol] :> With[{Qx = PolynomialQuotient[Pq, a + b*x + c*x^2, x], R = 
 Coeff[PolynomialRemainder[Pq, a + b*x + c*x^2, x], x, 0], S = Coeff[Polyno 
mialRemainder[Pq, a + b*x + c*x^2, x], x, 1]}, Simp[(d + e*x)^m*(a + b*x + 
c*x^2)^(p + 1)*((R*b - 2*a*S + (2*c*R - b*S)*x)/((p + 1)*(b^2 - 4*a*c))), x 
] + Simp[1/((p + 1)*(b^2 - 4*a*c))   Int[(d + e*x)^(m - 1)*(a + b*x + c*x^2 
)^(p + 1)*ExpandToSum[(p + 1)*(b^2 - 4*a*c)*(d + e*x)*Qx + S*(2*a*e*m + b*d 
*(2*p + 3)) - R*(b*e*m + 2*c*d*(2*p + 3)) - e*(2*c*R - b*S)*(m + 2*p + 3)*x 
, x], x], x]] /; FreeQ[{a, b, c, d, e}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a 
*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && LtQ[p, -1] && GtQ[m, 0] && (Inte 
gerQ[p] ||  !IntegerQ[m] ||  !RationalQ[a, b, c, d, e]) &&  !(IGtQ[m, 0] && 
 RationalQ[a, b, c, d, e] && (IntegerQ[p] || ILtQ[p + 1/2, 0]))
 
Maple [A] (verified)

Time = 0.15 (sec) , antiderivative size = 145, normalized size of antiderivative = 0.91

method result size
default \(\frac {4 e^{2} x^{3}}{75}+\frac {4 x^{2} d e}{25}-\frac {41 e^{2} x^{2}}{250}+\frac {4 d^{2} x}{25}-\frac {82 d e x}{125}+\frac {103 e^{2} x}{625}-\frac {\left (\frac {423}{28} d^{2}+\frac {5989}{70} d e -\frac {18323}{700} e^{2}\right ) x +\frac {1367 d^{2}}{28}-\frac {1269 d e}{70}-\frac {17967 e^{2}}{700}}{625 \left (x^{2}+\frac {2}{5} x +\frac {3}{5}\right )}-\frac {\left (28700 d^{2}-28840 d e -24276 e^{2}\right ) \ln \left (5 x^{2}+2 x +3\right )}{175000}-\frac {\left (-6565 d^{2}-42342 d e +\frac {73881}{5} e^{2}\right ) \sqrt {14}\, \arctan \left (\frac {\left (10 x +2\right ) \sqrt {14}}{28}\right )}{245000}\) \(145\)
risch \(\frac {4 d^{2} x}{25}+\frac {103 e^{2} x}{625}+\frac {4 e^{2} x^{3}}{75}+\frac {4 x^{2} d e}{25}+\frac {21171 \sqrt {14}\, d e \arctan \left (\frac {5 \sqrt {14}\, x}{14}+\frac {\sqrt {14}}{14}\right )}{122500}-\frac {82 d e x}{125}-\frac {41 d^{2} \ln \left (350 x^{2}+140 x +210\right )}{250}+\frac {867 e^{2} \ln \left (350 x^{2}+140 x +210\right )}{6250}+\frac {\frac {\left (-\frac {423}{28} d^{2}-\frac {5989}{70} d e +\frac {18323}{700} e^{2}\right ) x}{625}-\frac {1367 d^{2}}{17500}+\frac {1269 d e}{43750}+\frac {17967 e^{2}}{437500}}{x^{2}+\frac {2}{5} x +\frac {3}{5}}+\frac {103 d e \ln \left (350 x^{2}+140 x +210\right )}{625}+\frac {1313 \sqrt {14}\, d^{2} \arctan \left (\frac {5 \sqrt {14}\, x}{14}+\frac {\sqrt {14}}{14}\right )}{49000}-\frac {73881 \sqrt {14}\, e^{2} \arctan \left (\frac {5 \sqrt {14}\, x}{14}+\frac {\sqrt {14}}{14}\right )}{1225000}-\frac {41 e^{2} x^{2}}{250}\) \(195\)

Input:

int((e*x+d)^2*(4*x^4-5*x^3+3*x^2+x+2)/(5*x^2+2*x+3)^2,x,method=_RETURNVERB 
OSE)
 

Output:

4/75*e^2*x^3+4/25*x^2*d*e-41/250*e^2*x^2+4/25*d^2*x-82/125*d*e*x+103/625*e 
^2*x-1/625*((423/28*d^2+5989/70*d*e-18323/700*e^2)*x+1367/28*d^2-1269/70*d 
*e-17967/700*e^2)/(x^2+2/5*x+3/5)-1/175000*(28700*d^2-28840*d*e-24276*e^2) 
*ln(5*x^2+2*x+3)-1/245000*(-6565*d^2-42342*d*e+73881/5*e^2)*14^(1/2)*arcta 
n(1/28*(10*x+2)*14^(1/2))
 

Fricas [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 245, normalized size of antiderivative = 1.53 \[ \int \frac {(d+e x)^2 \left (2+x+3 x^2-5 x^3+4 x^4\right )}{\left (3+2 x+5 x^2\right )^2} \, dx=\frac {980000 \, e^{2} x^{5} + 24500 \, {\left (120 \, d e - 107 \, e^{2}\right )} x^{4} + 58800 \, {\left (50 \, d^{2} - 185 \, d e + 41 \, e^{2}\right )} x^{3} + 2940 \, {\left (400 \, d^{2} - 1040 \, d e - 203 \, e^{2}\right )} x^{2} + 3 \, \sqrt {14} {\left (5 \, {\left (32825 \, d^{2} + 211710 \, d e - 73881 \, e^{2}\right )} x^{2} + 98475 \, d^{2} + 635130 \, d e - 221643 \, e^{2} + 2 \, {\left (32825 \, d^{2} + 211710 \, d e - 73881 \, e^{2}\right )} x\right )} \arctan \left (\frac {1}{14} \, \sqrt {14} {\left (5 \, x + 1\right )}\right ) - 1435350 \, d^{2} + 532980 \, d e + 754614 \, e^{2} + 42 \, {\left (31425 \, d^{2} - 232090 \, d e + 61583 \, e^{2}\right )} x - 588 \, {\left (5 \, {\left (1025 \, d^{2} - 1030 \, d e - 867 \, e^{2}\right )} x^{2} + 3075 \, d^{2} - 3090 \, d e - 2601 \, e^{2} + 2 \, {\left (1025 \, d^{2} - 1030 \, d e - 867 \, e^{2}\right )} x\right )} \log \left (5 \, x^{2} + 2 \, x + 3\right )}{3675000 \, {\left (5 \, x^{2} + 2 \, x + 3\right )}} \] Input:

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

Output:

1/3675000*(980000*e^2*x^5 + 24500*(120*d*e - 107*e^2)*x^4 + 58800*(50*d^2 
- 185*d*e + 41*e^2)*x^3 + 2940*(400*d^2 - 1040*d*e - 203*e^2)*x^2 + 3*sqrt 
(14)*(5*(32825*d^2 + 211710*d*e - 73881*e^2)*x^2 + 98475*d^2 + 635130*d*e 
- 221643*e^2 + 2*(32825*d^2 + 211710*d*e - 73881*e^2)*x)*arctan(1/14*sqrt( 
14)*(5*x + 1)) - 1435350*d^2 + 532980*d*e + 754614*e^2 + 42*(31425*d^2 - 2 
32090*d*e + 61583*e^2)*x - 588*(5*(1025*d^2 - 1030*d*e - 867*e^2)*x^2 + 30 
75*d^2 - 3090*d*e - 2601*e^2 + 2*(1025*d^2 - 1030*d*e - 867*e^2)*x)*log(5* 
x^2 + 2*x + 3))/(5*x^2 + 2*x + 3)
 

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.95 (sec) , antiderivative size = 298, normalized size of antiderivative = 1.86 \[ \int \frac {(d+e x)^2 \left (2+x+3 x^2-5 x^3+4 x^4\right )}{\left (3+2 x+5 x^2\right )^2} \, dx=\frac {4 e^{2} x^{3}}{75} + x^{2} \cdot \left (\frac {4 d e}{25} - \frac {41 e^{2}}{250}\right ) + x \left (\frac {4 d^{2}}{25} - \frac {82 d e}{125} + \frac {103 e^{2}}{625}\right ) + \left (- \frac {41 d^{2}}{250} + \frac {103 d e}{625} + \frac {867 e^{2}}{6250} - \frac {\sqrt {14} i \left (32825 d^{2} + 211710 d e - 73881 e^{2}\right )}{2450000}\right ) \log {\left (x + \frac {6565 d^{2} + 42342 d e - \frac {73881 e^{2}}{5} - \frac {\sqrt {14} i \left (32825 d^{2} + 211710 d e - 73881 e^{2}\right )}{5}}{32825 d^{2} + 211710 d e - 73881 e^{2}} \right )} + \left (- \frac {41 d^{2}}{250} + \frac {103 d e}{625} + \frac {867 e^{2}}{6250} + \frac {\sqrt {14} i \left (32825 d^{2} + 211710 d e - 73881 e^{2}\right )}{2450000}\right ) \log {\left (x + \frac {6565 d^{2} + 42342 d e - \frac {73881 e^{2}}{5} + \frac {\sqrt {14} i \left (32825 d^{2} + 211710 d e - 73881 e^{2}\right )}{5}}{32825 d^{2} + 211710 d e - 73881 e^{2}} \right )} + \frac {- 34175 d^{2} + 12690 d e + 17967 e^{2} + x \left (- 10575 d^{2} - 59890 d e + 18323 e^{2}\right )}{437500 x^{2} + 175000 x + 262500} \] Input:

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

Output:

4*e**2*x**3/75 + x**2*(4*d*e/25 - 41*e**2/250) + x*(4*d**2/25 - 82*d*e/125 
 + 103*e**2/625) + (-41*d**2/250 + 103*d*e/625 + 867*e**2/6250 - sqrt(14)* 
I*(32825*d**2 + 211710*d*e - 73881*e**2)/2450000)*log(x + (6565*d**2 + 423 
42*d*e - 73881*e**2/5 - sqrt(14)*I*(32825*d**2 + 211710*d*e - 73881*e**2)/ 
5)/(32825*d**2 + 211710*d*e - 73881*e**2)) + (-41*d**2/250 + 103*d*e/625 + 
 867*e**2/6250 + sqrt(14)*I*(32825*d**2 + 211710*d*e - 73881*e**2)/2450000 
)*log(x + (6565*d**2 + 42342*d*e - 73881*e**2/5 + sqrt(14)*I*(32825*d**2 + 
 211710*d*e - 73881*e**2)/5)/(32825*d**2 + 211710*d*e - 73881*e**2)) + (-3 
4175*d**2 + 12690*d*e + 17967*e**2 + x*(-10575*d**2 - 59890*d*e + 18323*e* 
*2))/(437500*x**2 + 175000*x + 262500)
 

Maxima [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 147, normalized size of antiderivative = 0.92 \[ \int \frac {(d+e x)^2 \left (2+x+3 x^2-5 x^3+4 x^4\right )}{\left (3+2 x+5 x^2\right )^2} \, dx=\frac {4}{75} \, e^{2} x^{3} + \frac {1}{250} \, {\left (40 \, d e - 41 \, e^{2}\right )} x^{2} + \frac {1}{1225000} \, \sqrt {14} {\left (32825 \, d^{2} + 211710 \, d e - 73881 \, e^{2}\right )} \arctan \left (\frac {1}{14} \, \sqrt {14} {\left (5 \, x + 1\right )}\right ) + \frac {1}{625} \, {\left (100 \, d^{2} - 410 \, d e + 103 \, e^{2}\right )} x - \frac {1}{6250} \, {\left (1025 \, d^{2} - 1030 \, d e - 867 \, e^{2}\right )} \log \left (5 \, x^{2} + 2 \, x + 3\right ) - \frac {34175 \, d^{2} - 12690 \, d e - 17967 \, e^{2} + {\left (10575 \, d^{2} + 59890 \, d e - 18323 \, e^{2}\right )} x}{87500 \, {\left (5 \, x^{2} + 2 \, x + 3\right )}} \] Input:

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

Output:

4/75*e^2*x^3 + 1/250*(40*d*e - 41*e^2)*x^2 + 1/1225000*sqrt(14)*(32825*d^2 
 + 211710*d*e - 73881*e^2)*arctan(1/14*sqrt(14)*(5*x + 1)) + 1/625*(100*d^ 
2 - 410*d*e + 103*e^2)*x - 1/6250*(1025*d^2 - 1030*d*e - 867*e^2)*log(5*x^ 
2 + 2*x + 3) - 1/87500*(34175*d^2 - 12690*d*e - 17967*e^2 + (10575*d^2 + 5 
9890*d*e - 18323*e^2)*x)/(5*x^2 + 2*x + 3)
 

Giac [A] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 146, normalized size of antiderivative = 0.91 \[ \int \frac {(d+e x)^2 \left (2+x+3 x^2-5 x^3+4 x^4\right )}{\left (3+2 x+5 x^2\right )^2} \, dx=\frac {4}{75} \, e^{2} x^{3} + \frac {4}{25} \, d e x^{2} - \frac {41}{250} \, e^{2} x^{2} + \frac {4}{25} \, d^{2} x - \frac {82}{125} \, d e x + \frac {103}{625} \, e^{2} x + \frac {1}{1225000} \, \sqrt {14} {\left (32825 \, d^{2} + 211710 \, d e - 73881 \, e^{2}\right )} \arctan \left (\frac {1}{14} \, \sqrt {14} {\left (5 \, x + 1\right )}\right ) - \frac {1}{6250} \, {\left (1025 \, d^{2} - 1030 \, d e - 867 \, e^{2}\right )} \log \left (5 \, x^{2} + 2 \, x + 3\right ) - \frac {34175 \, d^{2} - 12690 \, d e - 17967 \, e^{2} + {\left (10575 \, d^{2} + 59890 \, d e - 18323 \, e^{2}\right )} x}{87500 \, {\left (5 \, x^{2} + 2 \, x + 3\right )}} \] Input:

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

Output:

4/75*e^2*x^3 + 4/25*d*e*x^2 - 41/250*e^2*x^2 + 4/25*d^2*x - 82/125*d*e*x + 
 103/625*e^2*x + 1/1225000*sqrt(14)*(32825*d^2 + 211710*d*e - 73881*e^2)*a 
rctan(1/14*sqrt(14)*(5*x + 1)) - 1/6250*(1025*d^2 - 1030*d*e - 867*e^2)*lo 
g(5*x^2 + 2*x + 3) - 1/87500*(34175*d^2 - 12690*d*e - 17967*e^2 + (10575*d 
^2 + 59890*d*e - 18323*e^2)*x)/(5*x^2 + 2*x + 3)
 

Mupad [B] (verification not implemented)

Time = 16.53 (sec) , antiderivative size = 211, normalized size of antiderivative = 1.32 \[ \int \frac {(d+e x)^2 \left (2+x+3 x^2-5 x^3+4 x^4\right )}{\left (3+2 x+5 x^2\right )^2} \, dx=\ln \left (5\,x^2+2\,x+3\right )\,\left (-\frac {41\,d^2}{250}+\frac {103\,d\,e}{625}+\frac {867\,e^2}{6250}\right )-x\,\left (\frac {2\,d\,e}{5}+\frac {4\,e\,\left (8\,d-5\,e\right )}{125}-\frac {4\,d^2}{25}-\frac {3\,e^2}{625}\right )+x^2\,\left (\frac {e\,\left (8\,d-5\,e\right )}{50}-\frac {8\,e^2}{125}\right )+\frac {\frac {1269\,d\,e}{14}-x\,\left (\frac {2115\,d^2}{28}+\frac {5989\,d\,e}{14}-\frac {18323\,e^2}{140}\right )-\frac {6835\,d^2}{28}+\frac {17967\,e^2}{140}}{3125\,x^2+1250\,x+1875}+\frac {4\,e^2\,x^3}{75}+\frac {\sqrt {14}\,\mathrm {atan}\left (\frac {\frac {\sqrt {14}\,\left (32825\,d^2+211710\,d\,e-73881\,e^2\right )}{1225000}+\frac {\sqrt {14}\,x\,\left (32825\,d^2+211710\,d\,e-73881\,e^2\right )}{245000}}{\frac {1313\,d^2}{3500}+\frac {21171\,d\,e}{8750}-\frac {73881\,e^2}{87500}}\right )\,\left (32825\,d^2+211710\,d\,e-73881\,e^2\right )}{1225000} \] Input:

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

Output:

log(2*x + 5*x^2 + 3)*((103*d*e)/625 - (41*d^2)/250 + (867*e^2)/6250) - x*( 
(2*d*e)/5 + (4*e*(8*d - 5*e))/125 - (4*d^2)/25 - (3*e^2)/625) + x^2*((e*(8 
*d - 5*e))/50 - (8*e^2)/125) + ((1269*d*e)/14 - x*((5989*d*e)/14 + (2115*d 
^2)/28 - (18323*e^2)/140) - (6835*d^2)/28 + (17967*e^2)/140)/(1250*x + 312 
5*x^2 + 1875) + (4*e^2*x^3)/75 + (14^(1/2)*atan(((14^(1/2)*(211710*d*e + 3 
2825*d^2 - 73881*e^2))/1225000 + (14^(1/2)*x*(211710*d*e + 32825*d^2 - 738 
81*e^2))/245000)/((21171*d*e)/8750 + (1313*d^2)/3500 - (73881*e^2)/87500)) 
*(211710*d*e + 32825*d^2 - 73881*e^2))/1225000
 

Reduce [B] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 421, normalized size of antiderivative = 2.63 \[ \int \frac {(d+e x)^2 \left (2+x+3 x^2-5 x^3+4 x^4\right )}{\left (3+2 x+5 x^2\right )^2} \, dx=\frac {2940000 d^{2} x^{3}+980000 e^{2} x^{5}-2621500 e^{2} x^{4}+2410800 e^{2} x^{3}-7063035 e^{2} x^{2}+295425 \sqrt {14}\, \mathit {atan} \left (\frac {5 x +1}{\sqrt {14}}\right ) d^{2}-664929 \sqrt {14}\, \mathit {atan} \left (\frac {5 x +1}{\sqrt {14}}\right ) e^{2}+1816920 \,\mathrm {log}\left (5 x^{2}+2 x +3\right ) d e -3013500 \,\mathrm {log}\left (5 x^{2}+2 x +3\right ) d^{2} x^{2}-1205400 \,\mathrm {log}\left (5 x^{2}+2 x +3\right ) d^{2} x +2548980 \,\mathrm {log}\left (5 x^{2}+2 x +3\right ) e^{2} x^{2}+1019592 \,\mathrm {log}\left (5 x^{2}+2 x +3\right ) e^{2} x +2940000 d e \,x^{4}-10878000 d e \,x^{3}+21311850 d e \,x^{2}-1808100 \,\mathrm {log}\left (5 x^{2}+2 x +3\right ) d^{2}+1529388 \,\mathrm {log}\left (5 x^{2}+2 x +3\right ) e^{2}+3175650 \sqrt {14}\, \mathit {atan} \left (\frac {5 x +1}{\sqrt {14}}\right ) d e \,x^{2}+1270260 \sqrt {14}\, \mathit {atan} \left (\frac {5 x +1}{\sqrt {14}}\right ) d e x -2123625 d^{2} x^{2}-3415125 d^{2}+1905390 \sqrt {14}\, \mathit {atan} \left (\frac {5 x +1}{\sqrt {14}}\right ) d e +15154650 d e +492375 \sqrt {14}\, \mathit {atan} \left (\frac {5 x +1}{\sqrt {14}}\right ) d^{2} x^{2}+196950 \sqrt {14}\, \mathit {atan} \left (\frac {5 x +1}{\sqrt {14}}\right ) d^{2} x -1108215 \sqrt {14}\, \mathit {atan} \left (\frac {5 x +1}{\sqrt {14}}\right ) e^{2} x^{2}-443286 \sqrt {14}\, \mathit {atan} \left (\frac {5 x +1}{\sqrt {14}}\right ) e^{2} x +3028200 \,\mathrm {log}\left (5 x^{2}+2 x +3\right ) d e \,x^{2}+1211280 \,\mathrm {log}\left (5 x^{2}+2 x +3\right ) d e x -3125115 e^{2}}{18375000 x^{2}+7350000 x +11025000} \] Input:

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

Output:

(492375*sqrt(14)*atan((5*x + 1)/sqrt(14))*d**2*x**2 + 196950*sqrt(14)*atan 
((5*x + 1)/sqrt(14))*d**2*x + 295425*sqrt(14)*atan((5*x + 1)/sqrt(14))*d** 
2 + 3175650*sqrt(14)*atan((5*x + 1)/sqrt(14))*d*e*x**2 + 1270260*sqrt(14)* 
atan((5*x + 1)/sqrt(14))*d*e*x + 1905390*sqrt(14)*atan((5*x + 1)/sqrt(14)) 
*d*e - 1108215*sqrt(14)*atan((5*x + 1)/sqrt(14))*e**2*x**2 - 443286*sqrt(1 
4)*atan((5*x + 1)/sqrt(14))*e**2*x - 664929*sqrt(14)*atan((5*x + 1)/sqrt(1 
4))*e**2 - 3013500*log(5*x**2 + 2*x + 3)*d**2*x**2 - 1205400*log(5*x**2 + 
2*x + 3)*d**2*x - 1808100*log(5*x**2 + 2*x + 3)*d**2 + 3028200*log(5*x**2 
+ 2*x + 3)*d*e*x**2 + 1211280*log(5*x**2 + 2*x + 3)*d*e*x + 1816920*log(5* 
x**2 + 2*x + 3)*d*e + 2548980*log(5*x**2 + 2*x + 3)*e**2*x**2 + 1019592*lo 
g(5*x**2 + 2*x + 3)*e**2*x + 1529388*log(5*x**2 + 2*x + 3)*e**2 + 2940000* 
d**2*x**3 - 2123625*d**2*x**2 - 3415125*d**2 + 2940000*d*e*x**4 - 10878000 
*d*e*x**3 + 21311850*d*e*x**2 + 15154650*d*e + 980000*e**2*x**5 - 2621500* 
e**2*x**4 + 2410800*e**2*x**3 - 7063035*e**2*x**2 - 3125115*e**2)/(3675000 
*(5*x**2 + 2*x + 3))