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

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 = 578 \[ \int \left (a+b x+c x^2\right )^2 \left (d+e x+f x^2\right )^q \, dx=-\frac {\left (2 b f^2 \left (10+9 q+2 q^2\right ) (b e (2+q)-2 a f (3+2 q))+2 c f (5+2 q) \left (2 a e f (2+q)^2+2 b d f (3+2 q)-b e^2 \left (6+5 q+q^2\right )\right )-c^2 e (3+q) \left (2 d f (8+5 q)-e^2 \left (8+6 q+q^2\right )\right )\right ) \left (d+e x+f x^2\right )^{1+q}}{4 f^4 (1+q) (2+q) (3+2 q) (5+2 q)}+\frac {\left (2 b^2 f^2 \left (10+9 q+2 q^2\right )+2 c f (5+2 q) (2 a f (2+q)-b e (3+q))-c^2 \left (6 d f (2+q)-e^2 \left (12+7 q+q^2\right )\right )\right ) x \left (d+e x+f x^2\right )^{1+q}}{2 f^3 (2+q) (3+2 q) (5+2 q)}-\frac {c (c e (4+q)-2 b f (5+2 q)) x^2 \left (d+e x+f x^2\right )^{1+q}}{2 f^2 (2+q) (5+2 q)}+\frac {c^2 x^3 \left (d+e x+f x^2\right )^{1+q}}{f (5+2 q)}+\frac {2^{-3-2 q} \left (2 c f (5+2 q) \left (6 b d e f-4 a d f^2+2 a e^2 f (2+q)-b e^3 (3+q)\right )+c^2 \left (12 d^2 f^2-12 d e^2 f (3+q)+e^4 \left (12+7 q+q^2\right )\right )-2 f^2 (5+2 q) \left (2 a b e f (3+2 q)-2 a^2 f^2 (3+2 q)+b^2 \left (2 d f-e^2 (2+q)\right )\right )\right ) (e+2 f x) \left (d+e x+f x^2\right )^q \left (-\frac {f \left (d+e x+f x^2\right )}{e^2-4 d f}\right )^{-q} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-q,\frac {3}{2},\frac {(e+2 f x)^2}{e^2-4 d f}\right )}{f^5 (3+2 q) (5+2 q)} \] Output:

-1/4*(2*b*f^2*(2*q^2+9*q+10)*(b*e*(2+q)-2*a*f*(3+2*q))+2*c*f*(5+2*q)*(2*a* 
e*f*(2+q)^2+2*b*d*f*(3+2*q)-b*e^2*(q^2+5*q+6))-c^2*e*(3+q)*(2*d*f*(8+5*q)- 
e^2*(q^2+6*q+8)))*(f*x^2+e*x+d)^(1+q)/f^4/(1+q)/(2+q)/(3+2*q)/(5+2*q)+1/2* 
(2*b^2*f^2*(2*q^2+9*q+10)+2*c*f*(5+2*q)*(2*a*f*(2+q)-b*e*(3+q))-c^2*(6*d*f 
*(2+q)-e^2*(q^2+7*q+12)))*x*(f*x^2+e*x+d)^(1+q)/f^3/(2+q)/(3+2*q)/(5+2*q)- 
1/2*c*(c*e*(4+q)-2*b*f*(5+2*q))*x^2*(f*x^2+e*x+d)^(1+q)/f^2/(2+q)/(5+2*q)+ 
c^2*x^3*(f*x^2+e*x+d)^(1+q)/f/(5+2*q)+2^(-3-2*q)*(2*c*f*(5+2*q)*(6*b*d*e*f 
-4*a*d*f^2+2*a*e^2*f*(2+q)-b*e^3*(3+q))+c^2*(12*d^2*f^2-12*d*e^2*f*(3+q)+e 
^4*(q^2+7*q+12))-2*f^2*(5+2*q)*(2*a*b*e*f*(3+2*q)-2*a^2*f^2*(3+2*q)+b^2*(2 
*d*f-e^2*(2+q))))*(2*f*x+e)*(f*x^2+e*x+d)^q*hypergeom([1/2, -q],[3/2],(2*f 
*x+e)^2/(-4*d*f+e^2))/f^5/(3+2*q)/(5+2*q)/((-f*(f*x^2+e*x+d)/(-4*d*f+e^2)) 
^q)
 

Mathematica [C] (warning: unable to verify)

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

Time = 2.97 (sec) , antiderivative size = 742, normalized size of antiderivative = 1.28 \[ \int \left (a+b x+c x^2\right )^2 \left (d+e x+f x^2\right )^q \, dx=\frac {2^{-1-q} \left (\frac {e-\sqrt {e^2-4 d f}}{2 f}+x\right )^{-q} \left (\frac {e-\sqrt {e^2-4 d f}+2 f x}{f}\right )^q \left (\frac {e-\sqrt {e^2-4 d f}+2 f x}{e-\sqrt {e^2-4 d f}}\right )^{-q} \left (\frac {e+\sqrt {e^2-4 d f}+2 f x}{\sqrt {e^2-4 d f}}\right )^{-q} \left (\frac {e+\sqrt {e^2-4 d f}+2 f x}{e+\sqrt {e^2-4 d f}}\right )^{-q} (d+x (e+f x))^q \left (30 a b f (1+q) x^2 \left (\frac {e+\sqrt {e^2-4 d f}+2 f x}{\sqrt {e^2-4 d f}}\right )^q \operatorname {AppellF1}\left (2,-q,-q,3,-\frac {2 f x}{e+\sqrt {e^2-4 d f}},\frac {2 f x}{-e+\sqrt {e^2-4 d f}}\right )+10 \left (b^2+2 a c\right ) f (1+q) x^3 \left (\frac {e+\sqrt {e^2-4 d f}+2 f x}{\sqrt {e^2-4 d f}}\right )^q \operatorname {AppellF1}\left (3,-q,-q,4,-\frac {2 f x}{e+\sqrt {e^2-4 d f}},\frac {2 f x}{-e+\sqrt {e^2-4 d f}}\right )+15 b c f (1+q) x^4 \left (\frac {e+\sqrt {e^2-4 d f}+2 f x}{\sqrt {e^2-4 d f}}\right )^q \operatorname {AppellF1}\left (4,-q,-q,5,-\frac {2 f x}{e+\sqrt {e^2-4 d f}},\frac {2 f x}{-e+\sqrt {e^2-4 d f}}\right )+6 c^2 f (1+q) x^5 \left (\frac {e+\sqrt {e^2-4 d f}+2 f x}{\sqrt {e^2-4 d f}}\right )^q \operatorname {AppellF1}\left (5,-q,-q,6,-\frac {2 f x}{e+\sqrt {e^2-4 d f}},\frac {2 f x}{-e+\sqrt {e^2-4 d f}}\right )-15\ 2^q a^2 \left (-e+\sqrt {e^2-4 d f}-2 f x\right ) \left (\frac {e-\sqrt {e^2-4 d f}+2 f x}{e-\sqrt {e^2-4 d f}}\right )^q \left (\frac {e+\sqrt {e^2-4 d f}+2 f x}{e+\sqrt {e^2-4 d f}}\right )^q \operatorname {Hypergeometric2F1}\left (-q,1+q,2+q,\frac {-e+\sqrt {e^2-4 d f}-2 f x}{2 \sqrt {e^2-4 d f}}\right )\right )}{15 f (1+q)} \] Input:

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

Output:

(2^(-1 - q)*((e - Sqrt[e^2 - 4*d*f] + 2*f*x)/f)^q*(d + x*(e + f*x))^q*(30* 
a*b*f*(1 + q)*x^2*((e + Sqrt[e^2 - 4*d*f] + 2*f*x)/Sqrt[e^2 - 4*d*f])^q*Ap 
pellF1[2, -q, -q, 3, (-2*f*x)/(e + Sqrt[e^2 - 4*d*f]), (2*f*x)/(-e + Sqrt[ 
e^2 - 4*d*f])] + 10*(b^2 + 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])] + 15*b*c*f*(1 + 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])] + 6*c^2*f 
*(1 + q)*x^5*((e + Sqrt[e^2 - 4*d*f] + 2*f*x)/Sqrt[e^2 - 4*d*f])^q*AppellF 
1[5, -q, -q, 6, (-2*f*x)/(e + Sqrt[e^2 - 4*d*f]), (2*f*x)/(-e + Sqrt[e^2 - 
 4*d*f])] - 15*2^q*a^2*(-e + Sqrt[e^2 - 4*d*f] - 2*f*x)*((e - Sqrt[e^2 - 4 
*d*f] + 2*f*x)/(e - Sqrt[e^2 - 4*d*f]))^q*((e + Sqrt[e^2 - 4*d*f] + 2*f*x) 
/(e + Sqrt[e^2 - 4*d*f]))^q*Hypergeometric2F1[-q, 1 + q, 2 + q, (-e + Sqrt 
[e^2 - 4*d*f] - 2*f*x)/(2*Sqrt[e^2 - 4*d*f])]))/(15*f*(1 + q)*((e - Sqrt[e 
^2 - 4*d*f])/(2*f) + x)^q*((e - Sqrt[e^2 - 4*d*f] + 2*f*x)/(e - Sqrt[e^2 - 
 4*d*f]))^q*((e + Sqrt[e^2 - 4*d*f] + 2*f*x)/Sqrt[e^2 - 4*d*f])^q*((e + Sq 
rt[e^2 - 4*d*f] + 2*f*x)/(e + Sqrt[e^2 - 4*d*f]))^q)
 

Rubi [A] (warning: unable to verify)

Time = 1.41 (sec) , antiderivative size = 668, normalized size of antiderivative = 1.16, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {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 )^2 \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 (c e (q+4)-2 b f (2 q+5)) x^3-\left (-f (2 q+5) b^2+3 c^2 d-2 a c f (2 q+5)\right ) x^2+2 a b f (2 q+5) x+a^2 f (2 q+5)\right )dx}{f (2 q+5)}+\frac {c^2 x^3 \left (d+e x+f x^2\right )^{q+1}}{f (2 q+5)}\)

\(\Big \downarrow \) 2192

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

\(\Big \downarrow \) 2192

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 1160

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

\(\Big \downarrow \) 1096

\(\displaystyle \frac {\frac {\frac {x \left (d+e x+f x^2\right )^{q+1} \left (2 c f (2 q+5) (2 a f (q+2)-b e (q+3))+2 b^2 f^2 \left (2 q^2+9 q+10\right )-\left (c^2 \left (6 d f (q+2)-e^2 \left (q^2+7 q+12\right )\right )\right )\right )}{f (2 q+3)}-\frac {\frac {\left (d+e x+f x^2\right )^{q+1} \left (2 c f (2 q+5) \left (2 a e f (q+2)^2+2 b d f (2 q+3)-b e^2 \left (q^2+5 q+6\right )\right )+2 b f^2 \left (2 q^2+9 q+10\right ) (b e (q+2)-2 a f (2 q+3))+c^2 (-e) (q+3) \left (2 d f (5 q+8)-e^2 \left (q^2+6 q+8\right )\right )\right )}{2 f (q+1)}-\frac {2^q \left (-\frac {-\sqrt {e^2-4 d f}+e+2 f x}{\sqrt {e^2-4 d f}}\right )^{-q-1} \left (d+e x+f x^2\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 ) \left (4 f^3 \left (2 q^2+9 q+10\right ) \left (b^2 d-a^2 f (2 q+3)\right )-2 c e f (2 q+5) \left (2 a e f (q+2)^2+2 b d f (2 q+3)-b e^2 \left (q^2+5 q+6\right )\right )+4 c d f^2 (2 q+5) (2 a f (q+2)-b e (q+3))-2 b e f^2 \left (2 q^2+9 q+10\right ) (b e (q+2)-2 a f (2 q+3))-2 c^2 d f \left (6 d f (q+2)-e^2 \left (q^2+7 q+12\right )\right )+c^2 e^2 (q+3) \left (2 d f (5 q+8)-e^2 \left (q^2+6 q+8\right )\right )\right )}{f (q+1) \sqrt {e^2-4 d f}}}{f (2 q+3)}}{2 f (q+2)}-\frac {c x^2 (c e (q+4)-2 b f (2 q+5)) \left (d+e x+f x^2\right )^{q+1}}{2 f (q+2)}}{f (2 q+5)}+\frac {c^2 x^3 \left (d+e x+f x^2\right )^{q+1}}{f (2 q+5)}\)

Input:

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

Output:

(c^2*x^3*(d + e*x + f*x^2)^(1 + q))/(f*(5 + 2*q)) + (-1/2*(c*(c*e*(4 + q) 
- 2*b*f*(5 + 2*q))*x^2*(d + e*x + f*x^2)^(1 + q))/(f*(2 + q)) + (((2*b^2*f 
^2*(10 + 9*q + 2*q^2) + 2*c*f*(5 + 2*q)*(2*a*f*(2 + q) - b*e*(3 + q)) - c^ 
2*(6*d*f*(2 + q) - e^2*(12 + 7*q + q^2)))*x*(d + e*x + f*x^2)^(1 + q))/(f* 
(3 + 2*q)) - (((2*b*f^2*(10 + 9*q + 2*q^2)*(b*e*(2 + q) - 2*a*f*(3 + 2*q)) 
 + 2*c*f*(5 + 2*q)*(2*a*e*f*(2 + q)^2 + 2*b*d*f*(3 + 2*q) - b*e^2*(6 + 5*q 
 + q^2)) - c^2*e*(3 + q)*(2*d*f*(8 + 5*q) - e^2*(8 + 6*q + q^2)))*(d + e*x 
 + f*x^2)^(1 + q))/(2*f*(1 + q)) - (2^q*(4*c*d*f^2*(5 + 2*q)*(2*a*f*(2 + q 
) - b*e*(3 + q)) - 2*b*e*f^2*(10 + 9*q + 2*q^2)*(b*e*(2 + q) - 2*a*f*(3 + 
2*q)) + 4*f^3*(10 + 9*q + 2*q^2)*(b^2*d - a^2*f*(3 + 2*q)) - 2*c*e*f*(5 + 
2*q)*(2*a*e*f*(2 + q)^2 + 2*b*d*f*(3 + 2*q) - b*e^2*(6 + 5*q + q^2)) + c^2 
*e^2*(3 + q)*(2*d*f*(8 + 5*q) - e^2*(8 + 6*q + q^2)) - 2*c^2*d*f*(6*d*f*(2 
 + q) - e^2*(12 + 7*q + q^2)))*(-((e - Sqrt[e^2 - 4*d*f] + 2*f*x)/Sqrt[e^2 
 - 4*d*f]))^(-1 - q)*(d + e*x + f*x^2)^(1 + q)*Hypergeometric2F1[-q, 1 + q 
, 2 + q, (e + Sqrt[e^2 - 4*d*f] + 2*f*x)/(2*Sqrt[e^2 - 4*d*f])])/(f*Sqrt[e 
^2 - 4*d*f]*(1 + q)))/(f*(3 + 2*q)))/(2*f*(2 + q)))/(f*(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 )^{2} \left (f \,x^{2}+e x +d \right )^{q}d x\]

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

(32*(d + e*x + f*x**2)**q*a**2*d*f**4*q**4 + 224*(d + e*x + f*x**2)**q*a** 
2*d*f**4*q**3 + 568*(d + e*x + f*x**2)**q*a**2*d*f**4*q**2 + 616*(d + e*x 
+ f*x**2)**q*a**2*d*f**4*q + 240*(d + e*x + f*x**2)**q*a**2*d*f**4 + 16*(d 
 + e*x + f*x**2)**q*a**2*e*f**4*q**4*x + 112*(d + e*x + f*x**2)**q*a**2*e* 
f**4*q**3*x + 284*(d + e*x + f*x**2)**q*a**2*e*f**4*q**2*x + 308*(d + e*x 
+ f*x**2)**q*a**2*e*f**4*q*x + 120*(d + e*x + f*x**2)**q*a**2*e*f**4*x - 1 
6*(d + e*x + f*x**2)**q*a*b*d*e*f**3*q**3 - 96*(d + e*x + f*x**2)**q*a*b*d 
*e*f**3*q**2 - 188*(d + e*x + f*x**2)**q*a*b*d*e*f**3*q - 120*(d + e*x + f 
*x**2)**q*a*b*d*e*f**3 + 16*(d + e*x + f*x**2)**q*a*b*e**2*f**3*q**4*x + 9 
6*(d + e*x + f*x**2)**q*a*b*e**2*f**3*q**3*x + 188*(d + e*x + f*x**2)**q*a 
*b*e**2*f**3*q**2*x + 120*(d + e*x + f*x**2)**q*a*b*e**2*f**3*q*x + 32*(d 
+ e*x + f*x**2)**q*a*b*e*f**4*q**4*x**2 + 208*(d + e*x + f*x**2)**q*a*b*e* 
f**4*q**3*x**2 + 472*(d + e*x + f*x**2)**q*a*b*e*f**4*q**2*x**2 + 428*(d + 
 e*x + f*x**2)**q*a*b*e*f**4*q*x**2 + 120*(d + e*x + f*x**2)**q*a*b*e*f**4 
*x**2 - 32*(d + e*x + f*x**2)**q*a*c*d**2*f**3*q**3 - 176*(d + e*x + f*x** 
2)**q*a*c*d**2*f**3*q**2 - 304*(d + e*x + f*x**2)**q*a*c*d**2*f**3*q - 160 
*(d + e*x + f*x**2)**q*a*c*d**2*f**3 + 8*(d + e*x + f*x**2)**q*a*c*d*e**2* 
f**2*q**3 + 52*(d + e*x + f*x**2)**q*a*c*d*e**2*f**2*q**2 + 112*(d + e*x + 
 f*x**2)**q*a*c*d*e**2*f**2*q + 80*(d + e*x + f*x**2)**q*a*c*d*e**2*f**2 + 
 32*(d + e*x + f*x**2)**q*a*c*d*e*f**3*q**4*x + 176*(d + e*x + f*x**2)*...