\(\int (a+b x+c x^2)^2 ((4 b^2-2 a c) d+(4 b^2-2 a c) e x-7 c (2 c d-b e) x^2) \, dx\) [26]

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

Optimal result

Integrand size = 54, antiderivative size = 37 \[ \int \left (a+b x+c x^2\right )^2 \left (\left (4 b^2-2 a c\right ) d+\left (4 b^2-2 a c\right ) e x-7 c (2 c d-b e) x^2\right ) \, dx=\frac {1}{3} (4 b d-a e-3 (2 c d-b e) x) \left (a+b x+c x^2\right )^3 \] Output:

1/3*(4*b*d-a*e-3*(-b*e+2*c*d)*x)*(c*x^2+b*x+a)^3
                                                                                    
                                                                                    
 

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(110\) vs. \(2(37)=74\).

Time = 0.06 (sec) , antiderivative size = 110, normalized size of antiderivative = 2.97 \[ \int \left (a+b x+c x^2\right )^2 \left (\left (4 b^2-2 a c\right ) d+\left (4 b^2-2 a c\right ) e x-7 c (2 c d-b e) x^2\right ) \, dx=\frac {1}{3} x \left (-3 a^3 c (2 d+e x)+x^2 (b+c x)^3 (4 b d-6 c d x+3 b e x)+3 a^2 (b+c x) (2 b (2 d+e x)-c x (6 d+e x))+a x (b+c x)^2 (-c x (18 d+e x)+4 b (3 d+2 e x))\right ) \] Input:

Integrate[(a + b*x + c*x^2)^2*((4*b^2 - 2*a*c)*d + (4*b^2 - 2*a*c)*e*x - 7 
*c*(2*c*d - b*e)*x^2),x]
 

Output:

(x*(-3*a^3*c*(2*d + e*x) + x^2*(b + c*x)^3*(4*b*d - 6*c*d*x + 3*b*e*x) + 3 
*a^2*(b + c*x)*(2*b*(2*d + e*x) - c*x*(6*d + e*x)) + a*x*(b + c*x)^2*(-(c* 
x*(18*d + e*x)) + 4*b*(3*d + 2*e*x))))/3
 

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(205\) vs. \(2(37)=74\).

Time = 0.54 (sec) , antiderivative size = 205, normalized size of antiderivative = 5.54, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.037, Rules used = {2188, 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 \left (a+b x+c x^2\right )^2 \left (d \left (4 b^2-2 a c\right )+e x \left (4 b^2-2 a c\right )-7 c x^2 (2 c d-b e)\right ) \, dx\)

\(\Big \downarrow \) 2188

\(\displaystyle \int \left (-2 a^2 d \left (a c-2 b^2\right )+4 x^3 \left (-a^2 c^2 e+5 a b^2 c e-8 a b c^2 d+b^4 e+2 b^3 c d\right )+x^2 \left (3 a^2 b c e-18 a^2 c^2 d+8 a b^3 e+6 a b^2 c d+4 b^4 d\right )-2 c^2 x^5 \left (a c e-9 b^2 e+14 b c d\right )-2 a x \left (a c-2 b^2\right ) (a e+2 b d)-5 c x^4 \left (-2 a b c e+6 a c^2 d-3 b^3 e+2 b^2 c d\right )-7 c^3 x^6 (2 c d-b e)\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle 2 a^2 d x \left (2 b^2-a c\right )+x^4 \left (-a^2 c^2 e+5 a b^2 c e-8 a b c^2 d+b^4 e+2 b^3 c d\right )+\frac {1}{3} x^3 \left (3 a^2 b c e-18 a^2 c^2 d+8 a b^3 e+6 a b^2 c d+4 b^4 d\right )-\frac {1}{3} c^2 x^6 \left (a c e-9 b^2 e+14 b c d\right )+a x^2 \left (2 b^2-a c\right ) (a e+2 b d)-c x^5 \left (-2 a b c e+6 a c^2 d-3 b^3 e+2 b^2 c d\right )-c^3 x^7 (2 c d-b e)\)

Input:

Int[(a + b*x + c*x^2)^2*((4*b^2 - 2*a*c)*d + (4*b^2 - 2*a*c)*e*x - 7*c*(2* 
c*d - b*e)*x^2),x]
 

Output:

2*a^2*(2*b^2 - a*c)*d*x + a*(2*b^2 - a*c)*(2*b*d + a*e)*x^2 + ((4*b^4*d + 
6*a*b^2*c*d - 18*a^2*c^2*d + 8*a*b^3*e + 3*a^2*b*c*e)*x^3)/3 + (2*b^3*c*d 
- 8*a*b*c^2*d + b^4*e + 5*a*b^2*c*e - a^2*c^2*e)*x^4 - c*(2*b^2*c*d + 6*a* 
c^2*d - 3*b^3*e - 2*a*b*c*e)*x^5 - (c^2*(14*b*c*d - 9*b^2*e + a*c*e)*x^6)/ 
3 - c^3*(2*c*d - b*e)*x^7
 

Defintions of rubi rules used

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

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

Leaf count of result is larger than twice the leaf count of optimal. \(221\) vs. \(2(35)=70\).

Time = 1.30 (sec) , antiderivative size = 222, normalized size of antiderivative = 6.00

method result size
norman \(\left (-\frac {1}{3} c^{3} a e +3 b^{2} c^{2} e -\frac {14}{3} b \,c^{3} d \right ) x^{6}+\left (a^{2} b c e -6 a^{2} c^{2} d +\frac {8}{3} a \,b^{3} e +2 c d a \,b^{2}+\frac {4}{3} b^{4} d \right ) x^{3}+\left (-2 a^{3} d c +4 a^{2} d \,b^{2}\right ) x +\left (b e \,c^{3}-2 c^{4} d \right ) x^{7}+\left (2 a b \,c^{2} e -6 a \,c^{3} d +3 b^{3} c e -2 b^{2} c^{2} d \right ) x^{5}+\left (-c e \,a^{3}+2 a^{2} b^{2} e -2 a^{2} b c d +4 a \,b^{3} d \right ) x^{2}+\left (-a^{2} c^{2} e +5 a \,b^{2} c e -8 a b \,c^{2} d +b^{4} e +2 b^{3} c d \right ) x^{4}\) \(222\)
gosper \(-\frac {x \left (-3 b \,c^{3} e \,x^{6}+6 c^{4} d \,x^{6}+x^{5} c^{3} a e -9 x^{5} b^{2} c^{2} e +14 b \,c^{3} d \,x^{5}-6 a b \,c^{2} e \,x^{4}+18 a \,c^{3} d \,x^{4}-9 b^{3} c e \,x^{4}+6 b^{2} c^{2} d \,x^{4}+3 a^{2} c^{2} e \,x^{3}-15 a \,b^{2} c e \,x^{3}+24 a b d \,x^{3} c^{2}-3 b^{4} e \,x^{3}-6 b^{3} c d \,x^{3}-3 x^{2} a^{2} b c e +18 a^{2} c^{2} d \,x^{2}-8 x^{2} a \,b^{3} e -6 c \,x^{2} a \,b^{2} d -4 x^{2} b^{4} d +3 a^{3} c e x -6 a^{2} b^{2} e x +6 a^{2} x b c d -12 a \,b^{3} d x +6 a^{3} d c -12 a^{2} d \,b^{2}\right )}{3}\) \(255\)
risch \(-8 a b \,c^{2} d \,x^{4}+4 a^{2} b^{2} d x +2 b^{3} c d \,x^{4}+2 a \,b^{2} c d \,x^{3}+5 a \,b^{2} c e \,x^{4}-6 a \,c^{3} d \,x^{5}-2 b^{2} c^{2} d \,x^{5}-2 x^{2} a^{2} b c d -\frac {14}{3} b \,c^{3} d \,x^{6}-6 a^{2} c^{2} d \,x^{3}+3 x^{6} b^{2} c^{2} e +b \,c^{3} e \,x^{7}+3 b^{3} c e \,x^{5}-2 a^{3} c d x +\frac {8}{3} a \,b^{3} e \,x^{3}+2 a^{2} b^{2} e \,x^{2}-\frac {1}{3} c^{3} a e \,x^{6}-a^{2} c^{2} e \,x^{4}-c e \,a^{3} x^{2}+4 a \,b^{3} d \,x^{2}+\frac {4}{3} x^{3} d \,b^{4}+2 a b \,c^{2} e \,x^{5}+x^{3} a^{2} b c e +b^{4} e \,x^{4}-2 c^{4} d \,x^{7}\) \(260\)
parallelrisch \(-8 a b \,c^{2} d \,x^{4}+4 a^{2} b^{2} d x +2 b^{3} c d \,x^{4}+2 a \,b^{2} c d \,x^{3}+5 a \,b^{2} c e \,x^{4}-6 a \,c^{3} d \,x^{5}-2 b^{2} c^{2} d \,x^{5}-2 x^{2} a^{2} b c d -\frac {14}{3} b \,c^{3} d \,x^{6}-6 a^{2} c^{2} d \,x^{3}+3 x^{6} b^{2} c^{2} e +b \,c^{3} e \,x^{7}+3 b^{3} c e \,x^{5}-2 a^{3} c d x +\frac {8}{3} a \,b^{3} e \,x^{3}+2 a^{2} b^{2} e \,x^{2}-\frac {1}{3} c^{3} a e \,x^{6}-a^{2} c^{2} e \,x^{4}-c e \,a^{3} x^{2}+4 a \,b^{3} d \,x^{2}+\frac {4}{3} x^{3} d \,b^{4}+2 a b \,c^{2} e \,x^{5}+x^{3} a^{2} b c e +b^{4} e \,x^{4}-2 c^{4} d \,x^{7}\) \(260\)
default \(-c^{3} \left (-b e +2 c d \right ) x^{7}+\frac {\left (-14 b \,c^{2} \left (-b e +2 c d \right )+c^{2} \left (-2 a c +4 b^{2}\right ) e \right ) x^{6}}{6}+\frac {\left (-7 \left (2 a c +b^{2}\right ) c \left (-b e +2 c d \right )+2 b c \left (-2 a c +4 b^{2}\right ) e +c^{2} \left (-2 a c +4 b^{2}\right ) d \right ) x^{5}}{5}+\frac {\left (-14 a b c \left (-b e +2 c d \right )+\left (2 a c +b^{2}\right ) \left (-2 a c +4 b^{2}\right ) e +2 b c \left (-2 a c +4 b^{2}\right ) d \right ) x^{4}}{4}+\frac {\left (-7 a^{2} c \left (-b e +2 c d \right )+2 a b \left (-2 a c +4 b^{2}\right ) e +\left (2 a c +b^{2}\right ) \left (-2 a c +4 b^{2}\right ) d \right ) x^{3}}{3}+\frac {\left (a^{2} \left (-2 a c +4 b^{2}\right ) e +2 a b \left (-2 a c +4 b^{2}\right ) d \right ) x^{2}}{2}+a^{2} \left (-2 a c +4 b^{2}\right ) d x\) \(274\)
orering \(\frac {x \left (-3 b \,c^{3} e \,x^{6}+6 c^{4} d \,x^{6}+x^{5} c^{3} a e -9 x^{5} b^{2} c^{2} e +14 b \,c^{3} d \,x^{5}-6 a b \,c^{2} e \,x^{4}+18 a \,c^{3} d \,x^{4}-9 b^{3} c e \,x^{4}+6 b^{2} c^{2} d \,x^{4}+3 a^{2} c^{2} e \,x^{3}-15 a \,b^{2} c e \,x^{3}+24 a b d \,x^{3} c^{2}-3 b^{4} e \,x^{3}-6 b^{3} c d \,x^{3}-3 x^{2} a^{2} b c e +18 a^{2} c^{2} d \,x^{2}-8 x^{2} a \,b^{3} e -6 c \,x^{2} a \,b^{2} d -4 x^{2} b^{4} d +3 a^{3} c e x -6 a^{2} b^{2} e x +6 a^{2} x b c d -12 a \,b^{3} d x +6 a^{3} d c -12 a^{2} d \,b^{2}\right ) \left (\left (-2 a c +4 b^{2}\right ) d +\left (-2 a c +4 b^{2}\right ) e x -7 c \left (-b e +2 c d \right ) x^{2}\right )}{-21 b c e \,x^{2}+42 c^{2} d \,x^{2}+6 a c e x -12 b^{2} e x +6 a c d -12 b^{2} d}\) \(340\)

Input:

int((c*x^2+b*x+a)^2*((-2*a*c+4*b^2)*d+(-2*a*c+4*b^2)*e*x-7*c*(-b*e+2*c*d)* 
x^2),x,method=_RETURNVERBOSE)
 

Output:

(-1/3*c^3*a*e+3*b^2*c^2*e-14/3*b*c^3*d)*x^6+(a^2*b*c*e-6*a^2*c^2*d+8/3*a*b 
^3*e+2*c*d*a*b^2+4/3*b^4*d)*x^3+(-2*a^3*c*d+4*a^2*b^2*d)*x+(b*c^3*e-2*c^4* 
d)*x^7+(2*a*b*c^2*e-6*a*c^3*d+3*b^3*c*e-2*b^2*c^2*d)*x^5+(-a^3*c*e+2*a^2*b 
^2*e-2*a^2*b*c*d+4*a*b^3*d)*x^2+(-a^2*c^2*e+5*a*b^2*c*e-8*a*b*c^2*d+b^4*e+ 
2*b^3*c*d)*x^4
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 237 vs. \(2 (35) = 70\).

Time = 0.06 (sec) , antiderivative size = 237, normalized size of antiderivative = 6.41 \[ \int \left (a+b x+c x^2\right )^2 \left (\left (4 b^2-2 a c\right ) d+\left (4 b^2-2 a c\right ) e x-7 c (2 c d-b e) x^2\right ) \, dx=-{\left (2 \, c^{4} d - b c^{3} e\right )} x^{7} - \frac {1}{3} \, {\left (14 \, b c^{3} d - {\left (9 \, b^{2} c^{2} - a c^{3}\right )} e\right )} x^{6} - {\left (2 \, {\left (b^{2} c^{2} + 3 \, a c^{3}\right )} d - {\left (3 \, b^{3} c + 2 \, a b c^{2}\right )} e\right )} x^{5} + {\left (2 \, {\left (b^{3} c - 4 \, a b c^{2}\right )} d + {\left (b^{4} + 5 \, a b^{2} c - a^{2} c^{2}\right )} e\right )} x^{4} + \frac {1}{3} \, {\left (2 \, {\left (2 \, b^{4} + 3 \, a b^{2} c - 9 \, a^{2} c^{2}\right )} d + {\left (8 \, a b^{3} + 3 \, a^{2} b c\right )} e\right )} x^{3} + 2 \, {\left (2 \, a^{2} b^{2} - a^{3} c\right )} d x + {\left (2 \, {\left (2 \, a b^{3} - a^{2} b c\right )} d + {\left (2 \, a^{2} b^{2} - a^{3} c\right )} e\right )} x^{2} \] Input:

integrate((c*x^2+b*x+a)^2*((-2*a*c+4*b^2)*d+(-2*a*c+4*b^2)*e*x-7*c*(-b*e+2 
*c*d)*x^2),x, algorithm="fricas")
 

Output:

-(2*c^4*d - b*c^3*e)*x^7 - 1/3*(14*b*c^3*d - (9*b^2*c^2 - a*c^3)*e)*x^6 - 
(2*(b^2*c^2 + 3*a*c^3)*d - (3*b^3*c + 2*a*b*c^2)*e)*x^5 + (2*(b^3*c - 4*a* 
b*c^2)*d + (b^4 + 5*a*b^2*c - a^2*c^2)*e)*x^4 + 1/3*(2*(2*b^4 + 3*a*b^2*c 
- 9*a^2*c^2)*d + (8*a*b^3 + 3*a^2*b*c)*e)*x^3 + 2*(2*a^2*b^2 - a^3*c)*d*x 
+ (2*(2*a*b^3 - a^2*b*c)*d + (2*a^2*b^2 - a^3*c)*e)*x^2
                                                                                    
                                                                                    
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 245 vs. \(2 (36) = 72\).

Time = 0.05 (sec) , antiderivative size = 245, normalized size of antiderivative = 6.62 \[ \int \left (a+b x+c x^2\right )^2 \left (\left (4 b^2-2 a c\right ) d+\left (4 b^2-2 a c\right ) e x-7 c (2 c d-b e) x^2\right ) \, dx=x^{7} \left (b c^{3} e - 2 c^{4} d\right ) + x^{6} \left (- \frac {a c^{3} e}{3} + 3 b^{2} c^{2} e - \frac {14 b c^{3} d}{3}\right ) + x^{5} \cdot \left (2 a b c^{2} e - 6 a c^{3} d + 3 b^{3} c e - 2 b^{2} c^{2} d\right ) + x^{4} \left (- a^{2} c^{2} e + 5 a b^{2} c e - 8 a b c^{2} d + b^{4} e + 2 b^{3} c d\right ) + x^{3} \left (a^{2} b c e - 6 a^{2} c^{2} d + \frac {8 a b^{3} e}{3} + 2 a b^{2} c d + \frac {4 b^{4} d}{3}\right ) + x^{2} \left (- a^{3} c e + 2 a^{2} b^{2} e - 2 a^{2} b c d + 4 a b^{3} d\right ) + x \left (- 2 a^{3} c d + 4 a^{2} b^{2} d\right ) \] Input:

integrate((c*x**2+b*x+a)**2*((-2*a*c+4*b**2)*d+(-2*a*c+4*b**2)*e*x-7*c*(-b 
*e+2*c*d)*x**2),x)
 

Output:

x**7*(b*c**3*e - 2*c**4*d) + x**6*(-a*c**3*e/3 + 3*b**2*c**2*e - 14*b*c**3 
*d/3) + x**5*(2*a*b*c**2*e - 6*a*c**3*d + 3*b**3*c*e - 2*b**2*c**2*d) + x* 
*4*(-a**2*c**2*e + 5*a*b**2*c*e - 8*a*b*c**2*d + b**4*e + 2*b**3*c*d) + x* 
*3*(a**2*b*c*e - 6*a**2*c**2*d + 8*a*b**3*e/3 + 2*a*b**2*c*d + 4*b**4*d/3) 
 + x**2*(-a**3*c*e + 2*a**2*b**2*e - 2*a**2*b*c*d + 4*a*b**3*d) + x*(-2*a* 
*3*c*d + 4*a**2*b**2*d)
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 237 vs. \(2 (35) = 70\).

Time = 0.03 (sec) , antiderivative size = 237, normalized size of antiderivative = 6.41 \[ \int \left (a+b x+c x^2\right )^2 \left (\left (4 b^2-2 a c\right ) d+\left (4 b^2-2 a c\right ) e x-7 c (2 c d-b e) x^2\right ) \, dx=-{\left (2 \, c^{4} d - b c^{3} e\right )} x^{7} - \frac {1}{3} \, {\left (14 \, b c^{3} d - {\left (9 \, b^{2} c^{2} - a c^{3}\right )} e\right )} x^{6} - {\left (2 \, {\left (b^{2} c^{2} + 3 \, a c^{3}\right )} d - {\left (3 \, b^{3} c + 2 \, a b c^{2}\right )} e\right )} x^{5} + {\left (2 \, {\left (b^{3} c - 4 \, a b c^{2}\right )} d + {\left (b^{4} + 5 \, a b^{2} c - a^{2} c^{2}\right )} e\right )} x^{4} + \frac {1}{3} \, {\left (2 \, {\left (2 \, b^{4} + 3 \, a b^{2} c - 9 \, a^{2} c^{2}\right )} d + {\left (8 \, a b^{3} + 3 \, a^{2} b c\right )} e\right )} x^{3} + 2 \, {\left (2 \, a^{2} b^{2} - a^{3} c\right )} d x + {\left (2 \, {\left (2 \, a b^{3} - a^{2} b c\right )} d + {\left (2 \, a^{2} b^{2} - a^{3} c\right )} e\right )} x^{2} \] Input:

integrate((c*x^2+b*x+a)^2*((-2*a*c+4*b^2)*d+(-2*a*c+4*b^2)*e*x-7*c*(-b*e+2 
*c*d)*x^2),x, algorithm="maxima")
 

Output:

-(2*c^4*d - b*c^3*e)*x^7 - 1/3*(14*b*c^3*d - (9*b^2*c^2 - a*c^3)*e)*x^6 - 
(2*(b^2*c^2 + 3*a*c^3)*d - (3*b^3*c + 2*a*b*c^2)*e)*x^5 + (2*(b^3*c - 4*a* 
b*c^2)*d + (b^4 + 5*a*b^2*c - a^2*c^2)*e)*x^4 + 1/3*(2*(2*b^4 + 3*a*b^2*c 
- 9*a^2*c^2)*d + (8*a*b^3 + 3*a^2*b*c)*e)*x^3 + 2*(2*a^2*b^2 - a^3*c)*d*x 
+ (2*(2*a*b^3 - a^2*b*c)*d + (2*a^2*b^2 - a^3*c)*e)*x^2
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 259 vs. \(2 (35) = 70\).

Time = 0.11 (sec) , antiderivative size = 259, normalized size of antiderivative = 7.00 \[ \int \left (a+b x+c x^2\right )^2 \left (\left (4 b^2-2 a c\right ) d+\left (4 b^2-2 a c\right ) e x-7 c (2 c d-b e) x^2\right ) \, dx=-2 \, c^{4} d x^{7} + b c^{3} e x^{7} - \frac {14}{3} \, b c^{3} d x^{6} + 3 \, b^{2} c^{2} e x^{6} - \frac {1}{3} \, a c^{3} e x^{6} - 2 \, b^{2} c^{2} d x^{5} - 6 \, a c^{3} d x^{5} + 3 \, b^{3} c e x^{5} + 2 \, a b c^{2} e x^{5} + 2 \, b^{3} c d x^{4} - 8 \, a b c^{2} d x^{4} + b^{4} e x^{4} + 5 \, a b^{2} c e x^{4} - a^{2} c^{2} e x^{4} + \frac {4}{3} \, b^{4} d x^{3} + 2 \, a b^{2} c d x^{3} - 6 \, a^{2} c^{2} d x^{3} + \frac {8}{3} \, a b^{3} e x^{3} + a^{2} b c e x^{3} + 4 \, a b^{3} d x^{2} - 2 \, a^{2} b c d x^{2} + 2 \, a^{2} b^{2} e x^{2} - a^{3} c e x^{2} + 4 \, a^{2} b^{2} d x - 2 \, a^{3} c d x \] Input:

integrate((c*x^2+b*x+a)^2*((-2*a*c+4*b^2)*d+(-2*a*c+4*b^2)*e*x-7*c*(-b*e+2 
*c*d)*x^2),x, algorithm="giac")
 

Output:

-2*c^4*d*x^7 + b*c^3*e*x^7 - 14/3*b*c^3*d*x^6 + 3*b^2*c^2*e*x^6 - 1/3*a*c^ 
3*e*x^6 - 2*b^2*c^2*d*x^5 - 6*a*c^3*d*x^5 + 3*b^3*c*e*x^5 + 2*a*b*c^2*e*x^ 
5 + 2*b^3*c*d*x^4 - 8*a*b*c^2*d*x^4 + b^4*e*x^4 + 5*a*b^2*c*e*x^4 - a^2*c^ 
2*e*x^4 + 4/3*b^4*d*x^3 + 2*a*b^2*c*d*x^3 - 6*a^2*c^2*d*x^3 + 8/3*a*b^3*e* 
x^3 + a^2*b*c*e*x^3 + 4*a*b^3*d*x^2 - 2*a^2*b*c*d*x^2 + 2*a^2*b^2*e*x^2 - 
a^3*c*e*x^2 + 4*a^2*b^2*d*x - 2*a^3*c*d*x
 

Mupad [B] (verification not implemented)

Time = 15.62 (sec) , antiderivative size = 209, normalized size of antiderivative = 5.65 \[ \int \left (a+b x+c x^2\right )^2 \left (\left (4 b^2-2 a c\right ) d+\left (4 b^2-2 a c\right ) e x-7 c (2 c d-b e) x^2\right ) \, dx=x^3\,\left (e\,a^2\,b\,c-6\,d\,a^2\,c^2+\frac {8\,e\,a\,b^3}{3}+2\,d\,a\,b^2\,c+\frac {4\,d\,b^4}{3}\right )-x^6\,\left (-3\,e\,b^2\,c^2+\frac {14\,d\,b\,c^3}{3}+\frac {a\,e\,c^3}{3}\right )-x^7\,\left (2\,c^4\,d-b\,c^3\,e\right )+x^4\,\left (-e\,a^2\,c^2+5\,e\,a\,b^2\,c-8\,d\,a\,b\,c^2+e\,b^4+2\,d\,b^3\,c\right )-x^5\,\left (-3\,e\,b^3\,c+2\,d\,b^2\,c^2-2\,a\,e\,b\,c^2+6\,a\,d\,c^3\right )-2\,a^2\,d\,x\,\left (a\,c-2\,b^2\right )-a\,x^2\,\left (a\,c-2\,b^2\right )\,\left (a\,e+2\,b\,d\right ) \] Input:

int(-(a + b*x + c*x^2)^2*(d*(2*a*c - 4*b^2) - 7*c*x^2*(b*e - 2*c*d) + e*x* 
(2*a*c - 4*b^2)),x)
 

Output:

x^3*((4*b^4*d)/3 - 6*a^2*c^2*d + (8*a*b^3*e)/3 + 2*a*b^2*c*d + a^2*b*c*e) 
- x^6*((a*c^3*e)/3 - 3*b^2*c^2*e + (14*b*c^3*d)/3) - x^7*(2*c^4*d - b*c^3* 
e) + x^4*(b^4*e - a^2*c^2*e + 2*b^3*c*d - 8*a*b*c^2*d + 5*a*b^2*c*e) - x^5 
*(2*b^2*c^2*d + 6*a*c^3*d - 3*b^3*c*e - 2*a*b*c^2*e) - 2*a^2*d*x*(a*c - 2* 
b^2) - a*x^2*(a*c - 2*b^2)*(a*e + 2*b*d)
                                                                                    
                                                                                    
 

Reduce [B] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 255, normalized size of antiderivative = 6.89 \[ \int \left (a+b x+c x^2\right )^2 \left (\left (4 b^2-2 a c\right ) d+\left (4 b^2-2 a c\right ) e x-7 c (2 c d-b e) x^2\right ) \, dx=\frac {x \left (3 b \,c^{3} e \,x^{6}-6 c^{4} d \,x^{6}-a \,c^{3} e \,x^{5}+9 b^{2} c^{2} e \,x^{5}-14 b \,c^{3} d \,x^{5}+6 a b \,c^{2} e \,x^{4}-18 a \,c^{3} d \,x^{4}+9 b^{3} c e \,x^{4}-6 b^{2} c^{2} d \,x^{4}-3 a^{2} c^{2} e \,x^{3}+15 a \,b^{2} c e \,x^{3}-24 a b \,c^{2} d \,x^{3}+3 b^{4} e \,x^{3}+6 b^{3} c d \,x^{3}+3 a^{2} b c e \,x^{2}-18 a^{2} c^{2} d \,x^{2}+8 a \,b^{3} e \,x^{2}+6 a \,b^{2} c d \,x^{2}+4 b^{4} d \,x^{2}-3 a^{3} c e x +6 a^{2} b^{2} e x -6 a^{2} b c d x +12 a \,b^{3} d x -6 a^{3} c d +12 a^{2} b^{2} d \right )}{3} \] Input:

int((c*x^2+b*x+a)^2*((-2*a*c+4*b^2)*d+(-2*a*c+4*b^2)*e*x-7*c*(-b*e+2*c*d)* 
x^2),x)
 

Output:

(x*( - 6*a**3*c*d - 3*a**3*c*e*x + 12*a**2*b**2*d + 6*a**2*b**2*e*x - 6*a* 
*2*b*c*d*x + 3*a**2*b*c*e*x**2 - 18*a**2*c**2*d*x**2 - 3*a**2*c**2*e*x**3 
+ 12*a*b**3*d*x + 8*a*b**3*e*x**2 + 6*a*b**2*c*d*x**2 + 15*a*b**2*c*e*x**3 
 - 24*a*b*c**2*d*x**3 + 6*a*b*c**2*e*x**4 - 18*a*c**3*d*x**4 - a*c**3*e*x* 
*5 + 4*b**4*d*x**2 + 3*b**4*e*x**3 + 6*b**3*c*d*x**3 + 9*b**3*c*e*x**4 - 6 
*b**2*c**2*d*x**4 + 9*b**2*c**2*e*x**5 - 14*b*c**3*d*x**5 + 3*b*c**3*e*x** 
6 - 6*c**4*d*x**6))/3