\(\int (a+b x+c x^2)^3 (d+e x+f x^2)^q \, dx\) [166]

Optimal result
Mathematica [C] (warning: unable to verify)
Rubi [A] (warning: unable to verify)
Maple [F]
Fricas [F]
Sympy [F(-1)]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 25, antiderivative size = 1520 \[ \int \left (a+b x+c x^2\right )^3 \left (d+e x+f x^2\right )^q \, dx =\text {Too large to display} \] Output:

-1/8*(c^3*e*(4+q)*(12*d^2*f^2*(11*q^2+46*q+45)-4*d*e^2*f*(7*q^3+68*q^2+201 
*q+180)+e^4*(q^4+16*q^3+91*q^2+216*q+180))+2*b*f^3*(4*q^3+36*q^2+107*q+105 
)*(6*a*b*e*f*(2+q)^2-6*a^2*f^2*(2*q^2+7*q+6)+b^2*(2*d*f*(3+2*q)-e^2*(q^2+5 
*q+6)))+6*c*f^2*(2*q^2+13*q+21)*(2*a^2*e*f^2*(2+q)^2*(5+2*q)+2*a*b*f*(5+2* 
q)*(2*d*f*(3+2*q)-e^2*(q^2+5*q+6))-b^2*e*(3+q)*(2*d*f*(8+5*q)-e^2*(q^2+6*q 
+8)))-3*c^2*f*(7+2*q)*(2*a*e*f*(3+q)^2*(2*d*f*(8+5*q)-e^2*(q^2+6*q+8))+b*( 
8*d^2*f^2*(4*q^2+16*q+15)-6*d*e^2*f*(3*q^3+26*q^2+71*q+60)+e^4*(q^4+14*q^3 
+71*q^2+154*q+120))))*(f*x^2+e*x+d)^(1+q)/f^6/(1+q)/(2+q)/(3+q)/(3+2*q)/(5 
+2*q)/(7+2*q)+1/4*(2*b^2*f^3*(4*q^3+36*q^2+107*q+105)*(6*a*f*(2+q)-b*e*(3+ 
q))+c^3*(60*d^2*f^2*(q^2+5*q+6)-6*d*e^2*f*(4*q^3+45*q^2+161*q+180)+e^4*(q^ 
4+18*q^3+119*q^2+342*q+360))+6*c*f^2*(2*q^2+13*q+21)*(2*a^2*f^2*(2*q^2+9*q 
+10)-2*a*b*e*f*(2*q^2+11*q+15)-b^2*(6*d*f*(2+q)-e^2*(q^2+7*q+12)))-3*c^2*f 
*(7+2*q)*(2*a*f*(3+q)*(6*d*f*(2+q)-e^2*(q^2+7*q+12))-b*e*(4+q)*(2*d*f*(15+ 
7*q)-e^2*(q^2+8*q+15))))*x*(f*x^2+e*x+d)^(1+q)/f^5/(2+q)/(3+q)/(3+2*q)/(5+ 
2*q)/(7+2*q)+1/4*(2*b^3*f^3*(4*q^3+36*q^2+107*q+105)-6*b*c*f^2*(2*q^2+13*q 
+21)*(b*e*(4+q)-2*a*f*(5+2*q))-3*c^2*f*(7+2*q)*(4*b*d*f*(5+2*q)+2*a*e*f*(q 
^2+7*q+12)-b*e^2*(q^2+9*q+20))+c^3*e*(5+q)*(6*d*f*(8+3*q)-e^2*(q^2+10*q+24 
)))*x^2*(f*x^2+e*x+d)^(1+q)/f^4/(2+q)/(3+q)/(5+2*q)/(7+2*q)+1/2*c*(6*b^2*f 
^2*(2*q^2+13*q+21)+3*c*f*(7+2*q)*(2*a*f*(3+q)-b*e*(5+q))-c^2*(10*d*f*(3+q) 
-e^2*(q^2+11*q+30)))*x^3*(f*x^2+e*x+d)^(1+q)/f^3/(3+q)/(5+2*q)/(7+2*q)-...
 

Mathematica [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 6 vs. order 5 in optimal.

Time = 4.54 (sec) , antiderivative size = 1884, normalized size of antiderivative = 1.24 \[ \int \left (a+b x+c x^2\right )^3 \left (d+e x+f x^2\right )^q \, dx =\text {Too large to display} \] Input:

Integrate[(a + b*x + c*x^2)^3*(d + e*x + f*x^2)^q,x]
 

Output:

((d + x*(e + f*x))^q*(210*a^2*b*f*(1 + q)*x^2*((e + Sqrt[e^2 - 4*d*f] + 2* 
f*x)/Sqrt[e^2 - 4*d*f])^q*AppellF1[2, -q, -q, 3, (-2*f*x)/(e + Sqrt[e^2 - 
4*d*f]), (2*f*x)/(-e + Sqrt[e^2 - 4*d*f])] + 140*a*(b^2 + a*c)*f*(1 + q)*x 
^3*((e + Sqrt[e^2 - 4*d*f] + 2*f*x)/Sqrt[e^2 - 4*d*f])^q*AppellF1[3, -q, - 
q, 4, (-2*f*x)/(e + Sqrt[e^2 - 4*d*f]), (2*f*x)/(-e + Sqrt[e^2 - 4*d*f])] 
+ 35*b^3*f*x^4*((e + Sqrt[e^2 - 4*d*f] + 2*f*x)/Sqrt[e^2 - 4*d*f])^q*Appel 
lF1[4, -q, -q, 5, (-2*f*x)/(e + Sqrt[e^2 - 4*d*f]), (2*f*x)/(-e + Sqrt[e^2 
 - 4*d*f])] + 210*a*b*c*f*x^4*((e + Sqrt[e^2 - 4*d*f] + 2*f*x)/Sqrt[e^2 - 
4*d*f])^q*AppellF1[4, -q, -q, 5, (-2*f*x)/(e + Sqrt[e^2 - 4*d*f]), (2*f*x) 
/(-e + Sqrt[e^2 - 4*d*f])] + 35*b^3*f*q*x^4*((e + Sqrt[e^2 - 4*d*f] + 2*f* 
x)/Sqrt[e^2 - 4*d*f])^q*AppellF1[4, -q, -q, 5, (-2*f*x)/(e + Sqrt[e^2 - 4* 
d*f]), (2*f*x)/(-e + Sqrt[e^2 - 4*d*f])] + 210*a*b*c*f*q*x^4*((e + Sqrt[e^ 
2 - 4*d*f] + 2*f*x)/Sqrt[e^2 - 4*d*f])^q*AppellF1[4, -q, -q, 5, (-2*f*x)/( 
e + Sqrt[e^2 - 4*d*f]), (2*f*x)/(-e + Sqrt[e^2 - 4*d*f])] + 84*b^2*c*f*x^5 
*((e + Sqrt[e^2 - 4*d*f] + 2*f*x)/Sqrt[e^2 - 4*d*f])^q*AppellF1[5, -q, -q, 
 6, (-2*f*x)/(e + Sqrt[e^2 - 4*d*f]), (2*f*x)/(-e + Sqrt[e^2 - 4*d*f])] + 
84*a*c^2*f*x^5*((e + Sqrt[e^2 - 4*d*f] + 2*f*x)/Sqrt[e^2 - 4*d*f])^q*Appel 
lF1[5, -q, -q, 6, (-2*f*x)/(e + Sqrt[e^2 - 4*d*f]), (2*f*x)/(-e + Sqrt[e^2 
 - 4*d*f])] + 84*b^2*c*f*q*x^5*((e + Sqrt[e^2 - 4*d*f] + 2*f*x)/Sqrt[e^2 - 
 4*d*f])^q*AppellF1[5, -q, -q, 6, (-2*f*x)/(e + Sqrt[e^2 - 4*d*f]), (2*...
 

Rubi [A] (warning: unable to verify)

Time = 10.18 (sec) , antiderivative size = 1838, normalized size of antiderivative = 1.21, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.320, Rules used = {2192, 2192, 2192, 2192, 2192, 25, 1160, 1096}

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 )^3 \left (d+e x+f x^2\right )^q \, dx\)

\(\Big \downarrow \) 2192

\(\displaystyle \frac {\int \left (f x^2+e x+d\right )^q \left (-c^2 (c e (q+6)-3 b f (2 q+7)) x^5-c \left (-3 f (2 q+7) b^2+5 c^2 d-3 a c f (2 q+7)\right ) x^4+b \left (b^2+6 a c\right ) f (2 q+7) x^3+3 a \left (b^2+a c\right ) f (2 q+7) x^2+3 a^2 b f (2 q+7) x+a^3 f (2 q+7)\right )dx}{f (2 q+7)}+\frac {c^3 x^5 \left (d+e x+f x^2\right )^{q+1}}{f (2 q+7)}\)

\(\Big \downarrow \) 2192

\(\displaystyle \frac {\frac {\int \left (f x^2+e x+d\right )^q \left (c \left (-\left (\left (10 d f (q+3)-e^2 \left (q^2+11 q+30\right )\right ) c^2\right )+3 f (2 q+7) (2 a f (q+3)-b e (q+5)) c+6 b^2 f^2 \left (2 q^2+13 q+21\right )\right ) x^4+2 \left (f^2 \left (2 q^2+13 q+21\right ) b^3-6 c^2 d f (2 q+7) b+6 a c f^2 \left (2 q^2+13 q+21\right ) b+2 c^3 d e (q+6)\right ) x^3+6 a \left (b^2+a c\right ) f^2 (q+3) (2 q+7) x^2+6 a^2 b f^2 (q+3) (2 q+7) x+2 a^3 f^2 (q+3) (2 q+7)\right )dx}{2 f (q+3)}-\frac {c^2 x^4 (c e (q+6)-3 b f (2 q+7)) \left (d+e x+f x^2\right )^{q+1}}{2 f (q+3)}}{f (2 q+7)}+\frac {c^3 x^5 \left (d+e x+f x^2\right )^{q+1}}{f (2 q+7)}\)

\(\Big \downarrow \) 2192

\(\displaystyle \frac {\frac {\frac {\int \left (f x^2+e x+d\right )^q \left (2 a^3 (q+3) (2 q+5) (2 q+7) f^3+6 a^2 b (q+3) (2 q+5) (2 q+7) x f^3+\left (e (q+5) \left (6 d f (3 q+8)-e^2 \left (q^2+10 q+24\right )\right ) c^3-3 f (2 q+7) \left (-b \left (q^2+9 q+20\right ) e^2+2 a f \left (q^2+7 q+12\right ) e+4 b d f (2 q+5)\right ) c^2-6 b f^2 \left (2 q^2+13 q+21\right ) (b e (q+4)-2 a f (2 q+5)) c+2 b^3 f^3 \left (4 q^3+36 q^2+107 q+105\right )\right ) x^3+3 \left (d \left (10 d f (q+3)-e^2 \left (q^2+11 q+30\right )\right ) c^3-3 d f (2 q+7) (2 a f (q+3)-b e (q+5)) c^2-2 f^2 \left (2 q^2+13 q+21\right ) \left (3 b^2 d-a^2 f (2 q+5)\right ) c+2 a b^2 f^3 \left (4 q^3+36 q^2+107 q+105\right )\right ) x^2\right )dx}{f (2 q+5)}+\frac {c x^3 \left (d+e x+f x^2\right )^{q+1} \left (3 c f (2 q+7) (2 a f (q+3)-b e (q+5))+6 b^2 f^2 \left (2 q^2+13 q+21\right )-\left (c^2 \left (10 d f (q+3)-e^2 \left (q^2+11 q+30\right )\right )\right )\right )}{f (2 q+5)}}{2 f (q+3)}-\frac {c^2 x^4 (c e (q+6)-3 b f (2 q+7)) \left (d+e x+f x^2\right )^{q+1}}{2 f (q+3)}}{f (2 q+7)}+\frac {c^3 x^5 \left (d+e x+f x^2\right )^{q+1}}{f (2 q+7)}\)

\(\Big \downarrow \) 2192

\(\displaystyle \frac {c^3 x^5 \left (f x^2+e x+d\right )^{q+1}}{f (2 q+7)}+\frac {\frac {\frac {c \left (-\left (\left (10 d f (q+3)-e^2 \left (q^2+11 q+30\right )\right ) c^2\right )+3 f (2 q+7) (2 a f (q+3)-b e (q+5)) c+6 b^2 f^2 \left (2 q^2+13 q+21\right )\right ) x^3 \left (f x^2+e x+d\right )^{q+1}}{f (2 q+5)}+\frac {\frac {\left (e (q+5) \left (6 d f (3 q+8)-e^2 \left (q^2+10 q+24\right )\right ) c^3-3 f (2 q+7) \left (-b \left (q^2+9 q+20\right ) e^2+2 a f \left (q^2+7 q+12\right ) e+4 b d f (2 q+5)\right ) c^2-6 b f^2 \left (2 q^2+13 q+21\right ) (b e (q+4)-2 a f (2 q+5)) c+2 b^3 f^3 \left (4 q^3+36 q^2+107 q+105\right )\right ) x^2 \left (f x^2+e x+d\right )^{q+1}}{2 f (q+2)}+\frac {\int \left (f x^2+e x+d\right )^q \left (4 a^3 (q+2) (q+3) (2 q+5) (2 q+7) f^4+\left (\left (\left (q^4+18 q^3+119 q^2+342 q+360\right ) e^4-6 d f \left (4 q^3+45 q^2+161 q+180\right ) e^2+60 d^2 f^2 \left (q^2+5 q+6\right )\right ) c^3-3 f (2 q+7) \left (2 a f (q+3) \left (6 d f (q+2)-e^2 \left (q^2+7 q+12\right )\right )-b e (q+4) \left (2 d f (7 q+15)-e^2 \left (q^2+8 q+15\right )\right )\right ) c^2+6 f^2 \left (2 q^2+13 q+21\right ) \left (-\left (\left (6 d f (q+2)-e^2 \left (q^2+7 q+12\right )\right ) b^2\right )-2 a e f \left (2 q^2+11 q+15\right ) b+2 a^2 f^2 \left (2 q^2+9 q+10\right )\right ) c+2 b^2 f^3 \left (4 q^3+36 q^2+107 q+105\right ) (6 a f (q+2)-b e (q+3))\right ) x^2-2 \left (d e (q+5) \left (6 d f (3 q+8)-e^2 \left (q^2+10 q+24\right )\right ) c^3-3 d f (2 q+7) \left (-b \left (q^2+9 q+20\right ) e^2+2 a f \left (q^2+7 q+12\right ) e+4 b d f (2 q+5)\right ) c^2-6 b d f^2 \left (2 q^2+13 q+21\right ) (b e (q+4)-2 a f (2 q+5)) c+2 b f^3 \left (4 q^3+36 q^2+107 q+105\right ) \left (b^2 d-3 a^2 f (q+2)\right )\right ) x\right )dx}{2 f (q+2)}}{f (2 q+5)}}{2 f (q+3)}-\frac {c^2 (c e (q+6)-3 b f (2 q+7)) x^4 \left (f x^2+e x+d\right )^{q+1}}{2 f (q+3)}}{f (2 q+7)}\)

\(\Big \downarrow \) 2192

\(\displaystyle \frac {c^3 x^5 \left (f x^2+e x+d\right )^{q+1}}{f (2 q+7)}+\frac {\frac {\frac {c \left (-\left (\left (10 d f (q+3)-e^2 \left (q^2+11 q+30\right )\right ) c^2\right )+3 f (2 q+7) (2 a f (q+3)-b e (q+5)) c+6 b^2 f^2 \left (2 q^2+13 q+21\right )\right ) x^3 \left (f x^2+e x+d\right )^{q+1}}{f (2 q+5)}+\frac {\frac {\left (e (q+5) \left (6 d f (3 q+8)-e^2 \left (q^2+10 q+24\right )\right ) c^3-3 f (2 q+7) \left (-b \left (q^2+9 q+20\right ) e^2+2 a f \left (q^2+7 q+12\right ) e+4 b d f (2 q+5)\right ) c^2-6 b f^2 \left (2 q^2+13 q+21\right ) (b e (q+4)-2 a f (2 q+5)) c+2 b^3 f^3 \left (4 q^3+36 q^2+107 q+105\right )\right ) x^2 \left (f x^2+e x+d\right )^{q+1}}{2 f (q+2)}+\frac {\frac {\left (\left (\left (q^4+18 q^3+119 q^2+342 q+360\right ) e^4-6 d f \left (4 q^3+45 q^2+161 q+180\right ) e^2+60 d^2 f^2 \left (q^2+5 q+6\right )\right ) c^3-3 f (2 q+7) \left (2 a f (q+3) \left (6 d f (q+2)-e^2 \left (q^2+7 q+12\right )\right )-b e (q+4) \left (2 d f (7 q+15)-e^2 \left (q^2+8 q+15\right )\right )\right ) c^2+6 f^2 \left (2 q^2+13 q+21\right ) \left (-\left (\left (6 d f (q+2)-e^2 \left (q^2+7 q+12\right )\right ) b^2\right )-2 a e f \left (2 q^2+11 q+15\right ) b+2 a^2 f^2 \left (2 q^2+9 q+10\right )\right ) c+2 b^2 f^3 \left (4 q^3+36 q^2+107 q+105\right ) (6 a f (q+2)-b e (q+3))\right ) x \left (f x^2+e x+d\right )^{q+1}}{f (2 q+3)}+\frac {\int -\left (\left (d \left (\left (q^4+18 q^3+119 q^2+342 q+360\right ) e^4-6 d f \left (4 q^3+45 q^2+161 q+180\right ) e^2+60 d^2 f^2 \left (q^2+5 q+6\right )\right ) c^3-3 d f (2 q+7) \left (2 a f (q+3) \left (6 d f (q+2)-e^2 \left (q^2+7 q+12\right )\right )-b e (q+4) \left (2 d f (7 q+15)-e^2 \left (q^2+8 q+15\right )\right )\right ) c^2+6 d f^2 \left (2 q^2+13 q+21\right ) \left (-\left (\left (6 d f (q+2)-e^2 \left (q^2+7 q+12\right )\right ) b^2\right )-2 a e f \left (2 q^2+11 q+15\right ) b+2 a^2 f^2 \left (2 q^2+9 q+10\right )\right ) c+2 f^3 \left (4 q^3+36 q^2+107 q+105\right ) \left (-2 f^2 \left (2 q^2+7 q+6\right ) a^3+6 b^2 d f (q+2) a-b^3 d e (q+3)\right )+\left (e (q+4) \left (\left (q^4+16 q^3+91 q^2+216 q+180\right ) e^4-4 d f \left (7 q^3+68 q^2+201 q+180\right ) e^2+12 d^2 f^2 \left (11 q^2+46 q+45\right )\right ) c^3-3 f (2 q+7) \left (2 a e f \left (2 d f (5 q+8)-e^2 \left (q^2+6 q+8\right )\right ) (q+3)^2+b \left (\left (q^4+14 q^3+71 q^2+154 q+120\right ) e^4-6 d f \left (3 q^3+26 q^2+71 q+60\right ) e^2+8 d^2 f^2 \left (4 q^2+16 q+15\right )\right )\right ) c^2+6 f^2 \left (2 q^2+13 q+21\right ) \left (-e (q+3) \left (2 d f (5 q+8)-e^2 \left (q^2+6 q+8\right )\right ) b^2+2 a f (2 q+5) \left (2 d f (2 q+3)-e^2 \left (q^2+5 q+6\right )\right ) b+2 a^2 e f^2 (q+2)^2 (2 q+5)\right ) c+2 b f^3 \left (4 q^3+36 q^2+107 q+105\right ) \left (\left (2 d f (2 q+3)-e^2 \left (q^2+5 q+6\right )\right ) b^2+6 a e f (q+2)^2 b-6 a^2 f^2 \left (2 q^2+7 q+6\right )\right )\right ) x\right ) \left (f x^2+e x+d\right )^q\right )dx}{f (2 q+3)}}{2 f (q+2)}}{f (2 q+5)}}{2 f (q+3)}-\frac {c^2 (c e (q+6)-3 b f (2 q+7)) x^4 \left (f x^2+e x+d\right )^{q+1}}{2 f (q+3)}}{f (2 q+7)}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {c^3 x^5 \left (f x^2+e x+d\right )^{q+1}}{f (2 q+7)}+\frac {\frac {\frac {c \left (-\left (\left (10 d f (q+3)-e^2 \left (q^2+11 q+30\right )\right ) c^2\right )+3 f (2 q+7) (2 a f (q+3)-b e (q+5)) c+6 b^2 f^2 \left (2 q^2+13 q+21\right )\right ) x^3 \left (f x^2+e x+d\right )^{q+1}}{f (2 q+5)}+\frac {\frac {\left (e (q+5) \left (6 d f (3 q+8)-e^2 \left (q^2+10 q+24\right )\right ) c^3-3 f (2 q+7) \left (-b \left (q^2+9 q+20\right ) e^2+2 a f \left (q^2+7 q+12\right ) e+4 b d f (2 q+5)\right ) c^2-6 b f^2 \left (2 q^2+13 q+21\right ) (b e (q+4)-2 a f (2 q+5)) c+2 b^3 f^3 \left (4 q^3+36 q^2+107 q+105\right )\right ) x^2 \left (f x^2+e x+d\right )^{q+1}}{2 f (q+2)}+\frac {\frac {\left (\left (\left (q^4+18 q^3+119 q^2+342 q+360\right ) e^4-6 d f \left (4 q^3+45 q^2+161 q+180\right ) e^2+60 d^2 f^2 \left (q^2+5 q+6\right )\right ) c^3-3 f (2 q+7) \left (2 a f (q+3) \left (6 d f (q+2)-e^2 \left (q^2+7 q+12\right )\right )-b e (q+4) \left (2 d f (7 q+15)-e^2 \left (q^2+8 q+15\right )\right )\right ) c^2+6 f^2 \left (2 q^2+13 q+21\right ) \left (-\left (\left (6 d f (q+2)-e^2 \left (q^2+7 q+12\right )\right ) b^2\right )-2 a e f \left (2 q^2+11 q+15\right ) b+2 a^2 f^2 \left (2 q^2+9 q+10\right )\right ) c+2 b^2 f^3 \left (4 q^3+36 q^2+107 q+105\right ) (6 a f (q+2)-b e (q+3))\right ) x \left (f x^2+e x+d\right )^{q+1}}{f (2 q+3)}-\frac {\int \left (d \left (\left (q^4+18 q^3+119 q^2+342 q+360\right ) e^4-6 d f \left (4 q^3+45 q^2+161 q+180\right ) e^2+60 d^2 f^2 \left (q^2+5 q+6\right )\right ) c^3-3 d f (2 q+7) \left (2 a f (q+3) \left (6 d f (q+2)-e^2 \left (q^2+7 q+12\right )\right )-b e (q+4) \left (2 d f (7 q+15)-e^2 \left (q^2+8 q+15\right )\right )\right ) c^2+6 d f^2 \left (2 q^2+13 q+21\right ) \left (-\left (\left (6 d f (q+2)-e^2 \left (q^2+7 q+12\right )\right ) b^2\right )-2 a e f \left (2 q^2+11 q+15\right ) b+2 a^2 f^2 \left (2 q^2+9 q+10\right )\right ) c+2 f^3 \left (4 q^3+36 q^2+107 q+105\right ) \left (-2 f^2 \left (2 q^2+7 q+6\right ) a^3+6 b^2 d f (q+2) a-b^3 d e (q+3)\right )+\left (e (q+4) \left (\left (q^4+16 q^3+91 q^2+216 q+180\right ) e^4-4 d f \left (7 q^3+68 q^2+201 q+180\right ) e^2+12 d^2 f^2 \left (11 q^2+46 q+45\right )\right ) c^3-3 f (2 q+7) \left (2 a e f \left (2 d f (5 q+8)-e^2 \left (q^2+6 q+8\right )\right ) (q+3)^2+b \left (\left (q^4+14 q^3+71 q^2+154 q+120\right ) e^4-6 d f \left (3 q^3+26 q^2+71 q+60\right ) e^2+8 d^2 f^2 \left (4 q^2+16 q+15\right )\right )\right ) c^2+6 f^2 \left (2 q^2+13 q+21\right ) \left (-e (q+3) \left (2 d f (5 q+8)-e^2 \left (q^2+6 q+8\right )\right ) b^2+2 a f (2 q+5) \left (2 d f (2 q+3)-e^2 \left (q^2+5 q+6\right )\right ) b+2 a^2 e f^2 (q+2)^2 (2 q+5)\right ) c+2 b f^3 \left (4 q^3+36 q^2+107 q+105\right ) \left (\left (2 d f (2 q+3)-e^2 \left (q^2+5 q+6\right )\right ) b^2+6 a e f (q+2)^2 b-6 a^2 f^2 \left (2 q^2+7 q+6\right )\right )\right ) x\right ) \left (f x^2+e x+d\right )^qdx}{f (2 q+3)}}{2 f (q+2)}}{f (2 q+5)}}{2 f (q+3)}-\frac {c^2 (c e (q+6)-3 b f (2 q+7)) x^4 \left (f x^2+e x+d\right )^{q+1}}{2 f (q+3)}}{f (2 q+7)}\)

\(\Big \downarrow \) 1160

\(\displaystyle \frac {c^3 x^5 \left (f x^2+e x+d\right )^{q+1}}{f (2 q+7)}+\frac {\frac {\frac {c \left (-\left (\left (10 d f (q+3)-e^2 \left (q^2+11 q+30\right )\right ) c^2\right )+3 f (2 q+7) (2 a f (q+3)-b e (q+5)) c+6 b^2 f^2 \left (2 q^2+13 q+21\right )\right ) x^3 \left (f x^2+e x+d\right )^{q+1}}{f (2 q+5)}+\frac {\frac {\left (e (q+5) \left (6 d f (3 q+8)-e^2 \left (q^2+10 q+24\right )\right ) c^3-3 f (2 q+7) \left (-b \left (q^2+9 q+20\right ) e^2+2 a f \left (q^2+7 q+12\right ) e+4 b d f (2 q+5)\right ) c^2-6 b f^2 \left (2 q^2+13 q+21\right ) (b e (q+4)-2 a f (2 q+5)) c+2 b^3 f^3 \left (4 q^3+36 q^2+107 q+105\right )\right ) x^2 \left (f x^2+e x+d\right )^{q+1}}{2 f (q+2)}+\frac {\frac {\left (\left (\left (q^4+18 q^3+119 q^2+342 q+360\right ) e^4-6 d f \left (4 q^3+45 q^2+161 q+180\right ) e^2+60 d^2 f^2 \left (q^2+5 q+6\right )\right ) c^3-3 f (2 q+7) \left (2 a f (q+3) \left (6 d f (q+2)-e^2 \left (q^2+7 q+12\right )\right )-b e (q+4) \left (2 d f (7 q+15)-e^2 \left (q^2+8 q+15\right )\right )\right ) c^2+6 f^2 \left (2 q^2+13 q+21\right ) \left (-\left (\left (6 d f (q+2)-e^2 \left (q^2+7 q+12\right )\right ) b^2\right )-2 a e f \left (2 q^2+11 q+15\right ) b+2 a^2 f^2 \left (2 q^2+9 q+10\right )\right ) c+2 b^2 f^3 \left (4 q^3+36 q^2+107 q+105\right ) (6 a f (q+2)-b e (q+3))\right ) x \left (f x^2+e x+d\right )^{q+1}}{f (2 q+3)}-\frac {\frac {\left (e (q+4) \left (\left (q^4+16 q^3+91 q^2+216 q+180\right ) e^4-4 d f \left (7 q^3+68 q^2+201 q+180\right ) e^2+12 d^2 f^2 \left (11 q^2+46 q+45\right )\right ) c^3-3 f (2 q+7) \left (2 a e f \left (2 d f (5 q+8)-e^2 \left (q^2+6 q+8\right )\right ) (q+3)^2+b \left (\left (q^4+14 q^3+71 q^2+154 q+120\right ) e^4-6 d f \left (3 q^3+26 q^2+71 q+60\right ) e^2+8 d^2 f^2 \left (4 q^2+16 q+15\right )\right )\right ) c^2+6 f^2 \left (2 q^2+13 q+21\right ) \left (-e (q+3) \left (2 d f (5 q+8)-e^2 \left (q^2+6 q+8\right )\right ) b^2+2 a f (2 q+5) \left (2 d f (2 q+3)-e^2 \left (q^2+5 q+6\right )\right ) b+2 a^2 e f^2 (q+2)^2 (2 q+5)\right ) c+2 b f^3 \left (4 q^3+36 q^2+107 q+105\right ) \left (\left (2 d f (2 q+3)-e^2 \left (q^2+5 q+6\right )\right ) b^2+6 a e f (q+2)^2 b-6 a^2 f^2 \left (2 q^2+7 q+6\right )\right )\right ) \left (f x^2+e x+d\right )^{q+1}}{2 f (q+1)}+\frac {\left (2 f \left (d \left (\left (q^4+18 q^3+119 q^2+342 q+360\right ) e^4-6 d f \left (4 q^3+45 q^2+161 q+180\right ) e^2+60 d^2 f^2 \left (q^2+5 q+6\right )\right ) c^3-3 d f (2 q+7) \left (2 a f (q+3) \left (6 d f (q+2)-e^2 \left (q^2+7 q+12\right )\right )-b e (q+4) \left (2 d f (7 q+15)-e^2 \left (q^2+8 q+15\right )\right )\right ) c^2+6 d f^2 \left (2 q^2+13 q+21\right ) \left (-\left (\left (6 d f (q+2)-e^2 \left (q^2+7 q+12\right )\right ) b^2\right )-2 a e f \left (2 q^2+11 q+15\right ) b+2 a^2 f^2 \left (2 q^2+9 q+10\right )\right ) c+2 f^3 \left (4 q^3+36 q^2+107 q+105\right ) \left (-2 f^2 \left (2 q^2+7 q+6\right ) a^3+6 b^2 d f (q+2) a-b^3 d e (q+3)\right )\right )-e \left (e (q+4) \left (\left (q^4+16 q^3+91 q^2+216 q+180\right ) e^4-4 d f \left (7 q^3+68 q^2+201 q+180\right ) e^2+12 d^2 f^2 \left (11 q^2+46 q+45\right )\right ) c^3-3 f (2 q+7) \left (2 a e f \left (2 d f (5 q+8)-e^2 \left (q^2+6 q+8\right )\right ) (q+3)^2+b \left (\left (q^4+14 q^3+71 q^2+154 q+120\right ) e^4-6 d f \left (3 q^3+26 q^2+71 q+60\right ) e^2+8 d^2 f^2 \left (4 q^2+16 q+15\right )\right )\right ) c^2+6 f^2 \left (2 q^2+13 q+21\right ) \left (-e (q+3) \left (2 d f (5 q+8)-e^2 \left (q^2+6 q+8\right )\right ) b^2+2 a f (2 q+5) \left (2 d f (2 q+3)-e^2 \left (q^2+5 q+6\right )\right ) b+2 a^2 e f^2 (q+2)^2 (2 q+5)\right ) c+2 b f^3 \left (4 q^3+36 q^2+107 q+105\right ) \left (\left (2 d f (2 q+3)-e^2 \left (q^2+5 q+6\right )\right ) b^2+6 a e f (q+2)^2 b-6 a^2 f^2 \left (2 q^2+7 q+6\right )\right )\right )\right ) \int \left (f x^2+e x+d\right )^qdx}{2 f}}{f (2 q+3)}}{2 f (q+2)}}{f (2 q+5)}}{2 f (q+3)}-\frac {c^2 (c e (q+6)-3 b f (2 q+7)) x^4 \left (f x^2+e x+d\right )^{q+1}}{2 f (q+3)}}{f (2 q+7)}\)

\(\Big \downarrow \) 1096

\(\displaystyle \frac {c^3 x^5 \left (f x^2+e x+d\right )^{q+1}}{f (2 q+7)}+\frac {\frac {\frac {c \left (-\left (\left (10 d f (q+3)-e^2 \left (q^2+11 q+30\right )\right ) c^2\right )+3 f (2 q+7) (2 a f (q+3)-b e (q+5)) c+6 b^2 f^2 \left (2 q^2+13 q+21\right )\right ) x^3 \left (f x^2+e x+d\right )^{q+1}}{f (2 q+5)}+\frac {\frac {\left (e (q+5) \left (6 d f (3 q+8)-e^2 \left (q^2+10 q+24\right )\right ) c^3-3 f (2 q+7) \left (-b \left (q^2+9 q+20\right ) e^2+2 a f \left (q^2+7 q+12\right ) e+4 b d f (2 q+5)\right ) c^2-6 b f^2 \left (2 q^2+13 q+21\right ) (b e (q+4)-2 a f (2 q+5)) c+2 b^3 f^3 \left (4 q^3+36 q^2+107 q+105\right )\right ) x^2 \left (f x^2+e x+d\right )^{q+1}}{2 f (q+2)}+\frac {\frac {\left (\left (\left (q^4+18 q^3+119 q^2+342 q+360\right ) e^4-6 d f \left (4 q^3+45 q^2+161 q+180\right ) e^2+60 d^2 f^2 \left (q^2+5 q+6\right )\right ) c^3-3 f (2 q+7) \left (2 a f (q+3) \left (6 d f (q+2)-e^2 \left (q^2+7 q+12\right )\right )-b e (q+4) \left (2 d f (7 q+15)-e^2 \left (q^2+8 q+15\right )\right )\right ) c^2+6 f^2 \left (2 q^2+13 q+21\right ) \left (-\left (\left (6 d f (q+2)-e^2 \left (q^2+7 q+12\right )\right ) b^2\right )-2 a e f \left (2 q^2+11 q+15\right ) b+2 a^2 f^2 \left (2 q^2+9 q+10\right )\right ) c+2 b^2 f^3 \left (4 q^3+36 q^2+107 q+105\right ) (6 a f (q+2)-b e (q+3))\right ) x \left (f x^2+e x+d\right )^{q+1}}{f (2 q+3)}-\frac {\frac {\left (e (q+4) \left (\left (q^4+16 q^3+91 q^2+216 q+180\right ) e^4-4 d f \left (7 q^3+68 q^2+201 q+180\right ) e^2+12 d^2 f^2 \left (11 q^2+46 q+45\right )\right ) c^3-3 f (2 q+7) \left (2 a e f \left (2 d f (5 q+8)-e^2 \left (q^2+6 q+8\right )\right ) (q+3)^2+b \left (\left (q^4+14 q^3+71 q^2+154 q+120\right ) e^4-6 d f \left (3 q^3+26 q^2+71 q+60\right ) e^2+8 d^2 f^2 \left (4 q^2+16 q+15\right )\right )\right ) c^2+6 f^2 \left (2 q^2+13 q+21\right ) \left (-e (q+3) \left (2 d f (5 q+8)-e^2 \left (q^2+6 q+8\right )\right ) b^2+2 a f (2 q+5) \left (2 d f (2 q+3)-e^2 \left (q^2+5 q+6\right )\right ) b+2 a^2 e f^2 (q+2)^2 (2 q+5)\right ) c+2 b f^3 \left (4 q^3+36 q^2+107 q+105\right ) \left (\left (2 d f (2 q+3)-e^2 \left (q^2+5 q+6\right )\right ) b^2+6 a e f (q+2)^2 b-6 a^2 f^2 \left (2 q^2+7 q+6\right )\right )\right ) \left (f x^2+e x+d\right )^{q+1}}{2 f (q+1)}-\frac {2^q \left (2 f \left (d \left (\left (q^4+18 q^3+119 q^2+342 q+360\right ) e^4-6 d f \left (4 q^3+45 q^2+161 q+180\right ) e^2+60 d^2 f^2 \left (q^2+5 q+6\right )\right ) c^3-3 d f (2 q+7) \left (2 a f (q+3) \left (6 d f (q+2)-e^2 \left (q^2+7 q+12\right )\right )-b e (q+4) \left (2 d f (7 q+15)-e^2 \left (q^2+8 q+15\right )\right )\right ) c^2+6 d f^2 \left (2 q^2+13 q+21\right ) \left (-\left (\left (6 d f (q+2)-e^2 \left (q^2+7 q+12\right )\right ) b^2\right )-2 a e f \left (2 q^2+11 q+15\right ) b+2 a^2 f^2 \left (2 q^2+9 q+10\right )\right ) c+2 f^3 \left (4 q^3+36 q^2+107 q+105\right ) \left (-2 f^2 \left (2 q^2+7 q+6\right ) a^3+6 b^2 d f (q+2) a-b^3 d e (q+3)\right )\right )-e \left (e (q+4) \left (\left (q^4+16 q^3+91 q^2+216 q+180\right ) e^4-4 d f \left (7 q^3+68 q^2+201 q+180\right ) e^2+12 d^2 f^2 \left (11 q^2+46 q+45\right )\right ) c^3-3 f (2 q+7) \left (2 a e f \left (2 d f (5 q+8)-e^2 \left (q^2+6 q+8\right )\right ) (q+3)^2+b \left (\left (q^4+14 q^3+71 q^2+154 q+120\right ) e^4-6 d f \left (3 q^3+26 q^2+71 q+60\right ) e^2+8 d^2 f^2 \left (4 q^2+16 q+15\right )\right )\right ) c^2+6 f^2 \left (2 q^2+13 q+21\right ) \left (-e (q+3) \left (2 d f (5 q+8)-e^2 \left (q^2+6 q+8\right )\right ) b^2+2 a f (2 q+5) \left (2 d f (2 q+3)-e^2 \left (q^2+5 q+6\right )\right ) b+2 a^2 e f^2 (q+2)^2 (2 q+5)\right ) c+2 b f^3 \left (4 q^3+36 q^2+107 q+105\right ) \left (\left (2 d f (2 q+3)-e^2 \left (q^2+5 q+6\right )\right ) b^2+6 a e f (q+2)^2 b-6 a^2 f^2 \left (2 q^2+7 q+6\right )\right )\right )\right ) \left (-\frac {e+2 f x-\sqrt {e^2-4 d f}}{\sqrt {e^2-4 d f}}\right )^{-q-1} \left (f x^2+e x+d\right )^{q+1} \operatorname {Hypergeometric2F1}\left (-q,q+1,q+2,\frac {e+2 f x+\sqrt {e^2-4 d f}}{2 \sqrt {e^2-4 d f}}\right )}{f \sqrt {e^2-4 d f} (q+1)}}{f (2 q+3)}}{2 f (q+2)}}{f (2 q+5)}}{2 f (q+3)}-\frac {c^2 (c e (q+6)-3 b f (2 q+7)) x^4 \left (f x^2+e x+d\right )^{q+1}}{2 f (q+3)}}{f (2 q+7)}\)

Input:

Int[(a + b*x + c*x^2)^3*(d + e*x + f*x^2)^q,x]
 

Output:

(c^3*x^5*(d + e*x + f*x^2)^(1 + q))/(f*(7 + 2*q)) + (-1/2*(c^2*(c*e*(6 + q 
) - 3*b*f*(7 + 2*q))*x^4*(d + e*x + f*x^2)^(1 + q))/(f*(3 + q)) + ((c*(6*b 
^2*f^2*(21 + 13*q + 2*q^2) + 3*c*f*(7 + 2*q)*(2*a*f*(3 + q) - b*e*(5 + q)) 
 - c^2*(10*d*f*(3 + q) - e^2*(30 + 11*q + q^2)))*x^3*(d + e*x + f*x^2)^(1 
+ q))/(f*(5 + 2*q)) + (((2*b^3*f^3*(105 + 107*q + 36*q^2 + 4*q^3) - 6*b*c* 
f^2*(21 + 13*q + 2*q^2)*(b*e*(4 + q) - 2*a*f*(5 + 2*q)) - 3*c^2*f*(7 + 2*q 
)*(4*b*d*f*(5 + 2*q) + 2*a*e*f*(12 + 7*q + q^2) - b*e^2*(20 + 9*q + q^2)) 
+ c^3*e*(5 + q)*(6*d*f*(8 + 3*q) - e^2*(24 + 10*q + q^2)))*x^2*(d + e*x + 
f*x^2)^(1 + q))/(2*f*(2 + q)) + (((2*b^2*f^3*(105 + 107*q + 36*q^2 + 4*q^3 
)*(6*a*f*(2 + q) - b*e*(3 + q)) + c^3*(60*d^2*f^2*(6 + 5*q + q^2) - 6*d*e^ 
2*f*(180 + 161*q + 45*q^2 + 4*q^3) + e^4*(360 + 342*q + 119*q^2 + 18*q^3 + 
 q^4)) + 6*c*f^2*(21 + 13*q + 2*q^2)*(2*a^2*f^2*(10 + 9*q + 2*q^2) - 2*a*b 
*e*f*(15 + 11*q + 2*q^2) - b^2*(6*d*f*(2 + q) - e^2*(12 + 7*q + q^2))) - 3 
*c^2*f*(7 + 2*q)*(2*a*f*(3 + q)*(6*d*f*(2 + q) - e^2*(12 + 7*q + q^2)) - b 
*e*(4 + q)*(2*d*f*(15 + 7*q) - e^2*(15 + 8*q + q^2))))*x*(d + e*x + f*x^2) 
^(1 + q))/(f*(3 + 2*q)) - (((c^3*e*(4 + q)*(12*d^2*f^2*(45 + 46*q + 11*q^2 
) - 4*d*e^2*f*(180 + 201*q + 68*q^2 + 7*q^3) + e^4*(180 + 216*q + 91*q^2 + 
 16*q^3 + q^4)) + 2*b*f^3*(105 + 107*q + 36*q^2 + 4*q^3)*(6*a*b*e*f*(2 + q 
)^2 - 6*a^2*f^2*(6 + 7*q + 2*q^2) + b^2*(2*d*f*(3 + 2*q) - e^2*(6 + 5*q + 
q^2))) + 6*c*f^2*(21 + 13*q + 2*q^2)*(2*a^2*e*f^2*(2 + q)^2*(5 + 2*q) +...
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 1096
Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Rt[b^2 
 - 4*a*c, 2]}, Simp[(-(a + b*x + c*x^2)^(p + 1)/(q*(p + 1)*((q - b - 2*c*x) 
/(2*q))^(p + 1)))*Hypergeometric2F1[-p, p + 1, p + 2, (b + q + 2*c*x)/(2*q) 
], x]] /; FreeQ[{a, b, c, p}, x] &&  !IntegerQ[4*p] &&  !IntegerQ[3*p]
 

rule 1160
Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol 
] :> Simp[e*((a + b*x + c*x^2)^(p + 1)/(2*c*(p + 1))), x] + Simp[(2*c*d - b 
*e)/(2*c)   Int[(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] 
 && NeQ[p, -1]
 

rule 2192
Int[(Pq_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = 
Expon[Pq, x], e = Coeff[Pq, x, Expon[Pq, x]]}, Simp[e*x^(q - 1)*((a + b*x + 
 c*x^2)^(p + 1)/(c*(q + 2*p + 1))), x] + Simp[1/(c*(q + 2*p + 1))   Int[(a 
+ b*x + c*x^2)^p*ExpandToSum[c*(q + 2*p + 1)*Pq - a*e*(q - 1)*x^(q - 2) - b 
*e*(q + p)*x^(q - 1) - c*e*(q + 2*p + 1)*x^q, x], x], x]] /; FreeQ[{a, b, c 
, p}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] &&  !LeQ[p, -1]
 
Maple [F]

\[\int \left (c \,x^{2}+b x +a \right )^{3} \left (f \,x^{2}+e x +d \right )^{q}d x\]

Input:

int((c*x^2+b*x+a)^3*(f*x^2+e*x+d)^q,x)
 

Output:

int((c*x^2+b*x+a)^3*(f*x^2+e*x+d)^q,x)
 

Fricas [F]

\[ \int \left (a+b x+c x^2\right )^3 \left (d+e x+f x^2\right )^q \, dx=\int { {\left (c x^{2} + b x + a\right )}^{3} {\left (f x^{2} + e x + d\right )}^{q} \,d x } \] Input:

integrate((c*x^2+b*x+a)^3*(f*x^2+e*x+d)^q,x, algorithm="fricas")
 

Output:

integral((c^3*x^6 + 3*b*c^2*x^5 + 3*(b^2*c + a*c^2)*x^4 + 3*a^2*b*x + (b^3 
 + 6*a*b*c)*x^3 + a^3 + 3*(a*b^2 + a^2*c)*x^2)*(f*x^2 + e*x + d)^q, x)
 

Sympy [F(-1)]

Timed out. \[ \int \left (a+b x+c x^2\right )^3 \left (d+e x+f x^2\right )^q \, dx=\text {Timed out} \] Input:

integrate((c*x**2+b*x+a)**3*(f*x**2+e*x+d)**q,x)
 

Output:

Timed out
 

Maxima [F]

\[ \int \left (a+b x+c x^2\right )^3 \left (d+e x+f x^2\right )^q \, dx=\int { {\left (c x^{2} + b x + a\right )}^{3} {\left (f x^{2} + e x + d\right )}^{q} \,d x } \] Input:

integrate((c*x^2+b*x+a)^3*(f*x^2+e*x+d)^q,x, algorithm="maxima")
 

Output:

integrate((c*x^2 + b*x + a)^3*(f*x^2 + e*x + d)^q, x)
 

Giac [F]

\[ \int \left (a+b x+c x^2\right )^3 \left (d+e x+f x^2\right )^q \, dx=\int { {\left (c x^{2} + b x + a\right )}^{3} {\left (f x^{2} + e x + d\right )}^{q} \,d x } \] Input:

integrate((c*x^2+b*x+a)^3*(f*x^2+e*x+d)^q,x, algorithm="giac")
 

Output:

integrate((c*x^2 + b*x + a)^3*(f*x^2 + e*x + d)^q, x)
 

Mupad [F(-1)]

Timed out. \[ \int \left (a+b x+c x^2\right )^3 \left (d+e x+f x^2\right )^q \, dx=\int {\left (c\,x^2+b\,x+a\right )}^3\,{\left (f\,x^2+e\,x+d\right )}^q \,d x \] Input:

int((a + b*x + c*x^2)^3*(d + e*x + f*x^2)^q,x)
 

Output:

int((a + b*x + c*x^2)^3*(d + e*x + f*x^2)^q, x)
 

Reduce [F]

\[ \int \left (a+b x+c x^2\right )^3 \left (d+e x+f x^2\right )^q \, dx=\text {too large to display} \] Input:

int((c*x^2+b*x+a)^3*(f*x^2+e*x+d)^q,x)
 

Output:

(128*(d + e*x + f*x**2)**q*a**3*d*f**6*q**6 + 1728*(d + e*x + f*x**2)**q*a 
**3*d*f**6*q**5 + 9440*(d + e*x + f*x**2)**q*a**3*d*f**6*q**4 + 26640*(d + 
 e*x + f*x**2)**q*a**3*d*f**6*q**3 + 40832*(d + e*x + f*x**2)**q*a**3*d*f* 
*6*q**2 + 32112*(d + e*x + f*x**2)**q*a**3*d*f**6*q + 10080*(d + e*x + f*x 
**2)**q*a**3*d*f**6 + 64*(d + e*x + f*x**2)**q*a**3*e*f**6*q**6*x + 864*(d 
 + e*x + f*x**2)**q*a**3*e*f**6*q**5*x + 4720*(d + e*x + f*x**2)**q*a**3*e 
*f**6*q**4*x + 13320*(d + e*x + f*x**2)**q*a**3*e*f**6*q**3*x + 20416*(d + 
 e*x + f*x**2)**q*a**3*e*f**6*q**2*x + 16056*(d + e*x + f*x**2)**q*a**3*e* 
f**6*q*x + 5040*(d + e*x + f*x**2)**q*a**3*e*f**6*x - 96*(d + e*x + f*x**2 
)**q*a**2*b*d*e*f**5*q**5 - 1200*(d + e*x + f*x**2)**q*a**2*b*d*e*f**5*q** 
4 - 5880*(d + e*x + f*x**2)**q*a**2*b*d*e*f**5*q**3 - 14100*(d + e*x + f*x 
**2)**q*a**2*b*d*e*f**5*q**2 - 16524*(d + e*x + f*x**2)**q*a**2*b*d*e*f**5 
*q - 7560*(d + e*x + f*x**2)**q*a**2*b*d*e*f**5 + 96*(d + e*x + f*x**2)**q 
*a**2*b*e**2*f**5*q**6*x + 1200*(d + e*x + f*x**2)**q*a**2*b*e**2*f**5*q** 
5*x + 5880*(d + e*x + f*x**2)**q*a**2*b*e**2*f**5*q**4*x + 14100*(d + e*x 
+ f*x**2)**q*a**2*b*e**2*f**5*q**3*x + 16524*(d + e*x + f*x**2)**q*a**2*b* 
e**2*f**5*q**2*x + 7560*(d + e*x + f*x**2)**q*a**2*b*e**2*f**5*q*x + 192*( 
d + e*x + f*x**2)**q*a**2*b*e*f**6*q**6*x**2 + 2496*(d + e*x + f*x**2)**q* 
a**2*b*e*f**6*q**5*x**2 + 12960*(d + e*x + f*x**2)**q*a**2*b*e*f**6*q**4*x 
**2 + 34080*(d + e*x + f*x**2)**q*a**2*b*e*f**6*q**3*x**2 + 47148*(d + ...