\(\int (d+e x)^3 (f+g x) (a+b x+c x^2)^p \, dx\) [1118]

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

-1/2*(b*e*g*(4+p)-c*(3*d*g+e*f*(5+2*p)))*(e*x+d)^2*(c*x^2+b*x+a)^(p+1)/c^2 
/(2+p)/(5+2*p)+g*(e*x+d)^3*(c*x^2+b*x+a)^(p+1)/c/(5+2*p)+1/4*(c*(3+2*p)*(2 
*b*e^2*g*(4+p)*(a*e+b*d*(2+p))+2*c^2*d^2*(3*d*g+e*f*(5+2*p)^2)-2*c*e*(a*e* 
(3*d*g+e*f)*(5+2*p)+b*d*(2*d*g*(p^2+5*p+7)+e*f*(2*p^2+9*p+10))))-b*e*(2+p) 
*(b*e*(3+p)*(b*e*g*(4+p)-c*(3*d*g+e*f*(5+2*p)))-2*c*(e*g*(3*a*e*(2+p)+b*d* 
(p^2+4*p+6))-c*d*(3*d*g+e*f*(2*p^2+11*p+15))))+2*c*e*(p+1)*(b*e*(3+p)*(b*e 
*g*(4+p)-c*(3*d*g+e*f*(5+2*p)))-2*c*(e*g*(3*a*e*(2+p)+b*d*(p^2+4*p+6))-c*d 
*(3*d*g+e*f*(2*p^2+11*p+15))))*x)*(c*x^2+b*x+a)^(p+1)/c^4/(p+1)/(2+p)/(3+2 
*p)/(5+2*p)+2^(-3-2*p)*(b^4*e^3*g*(p^2+7*p+12)+4*c^4*d^3*f*(4*p^2+16*p+15) 
-2*c^3*d*(5+2*p)*(6*a*e*(d*g+e*f)+b*d*(d*g+3*e*f)*(3+2*p))-b^2*c*e^2*(3+p) 
*(12*a*e*g+b*(3*d*g+e*f)*(5+2*p))+6*c^2*e*(2*a^2*e^2*g+a*b*e*(3*d*g+e*f)*( 
5+2*p)+b^2*d*(d*g+e*f)*(2*p^2+9*p+10)))*(2*c*x+b)*(c*x^2+b*x+a)^p*hypergeo 
m([1/2, -p],[3/2],(2*c*x+b)^2/(-4*a*c+b^2))/c^5/(3+2*p)/(5+2*p)/((-c*(c*x^ 
2+b*x+a)/(-4*a*c+b^2))^p)
 

Mathematica [C] (warning: unable to verify)

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

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

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

Output:

((a + x*(b + c*x))^p*(10*c*d^2*(3*e*f + d*g)*(1 + p)*x^2*((b + Sqrt[b^2 - 
4*a*c] + 2*c*x)/Sqrt[b^2 - 4*a*c])^p*AppellF1[2, -p, -p, 3, (-2*c*x)/(b + 
Sqrt[b^2 - 4*a*c]), (2*c*x)/(-b + Sqrt[b^2 - 4*a*c])] + 20*c*d*e*(e*f + d* 
g)*(1 + p)*x^3*((b + Sqrt[b^2 - 4*a*c] + 2*c*x)/Sqrt[b^2 - 4*a*c])^p*Appel 
lF1[3, -p, -p, 4, (-2*c*x)/(b + Sqrt[b^2 - 4*a*c]), (2*c*x)/(-b + Sqrt[b^2 
 - 4*a*c])] + 5*c*e^3*f*x^4*((b + Sqrt[b^2 - 4*a*c] + 2*c*x)/Sqrt[b^2 - 4* 
a*c])^p*AppellF1[4, -p, -p, 5, (-2*c*x)/(b + Sqrt[b^2 - 4*a*c]), (2*c*x)/( 
-b + Sqrt[b^2 - 4*a*c])] + 15*c*d*e^2*g*x^4*((b + Sqrt[b^2 - 4*a*c] + 2*c* 
x)/Sqrt[b^2 - 4*a*c])^p*AppellF1[4, -p, -p, 5, (-2*c*x)/(b + Sqrt[b^2 - 4* 
a*c]), (2*c*x)/(-b + Sqrt[b^2 - 4*a*c])] + 5*c*e^3*f*p*x^4*((b + Sqrt[b^2 
- 4*a*c] + 2*c*x)/Sqrt[b^2 - 4*a*c])^p*AppellF1[4, -p, -p, 5, (-2*c*x)/(b 
+ Sqrt[b^2 - 4*a*c]), (2*c*x)/(-b + Sqrt[b^2 - 4*a*c])] + 15*c*d*e^2*g*p*x 
^4*((b + Sqrt[b^2 - 4*a*c] + 2*c*x)/Sqrt[b^2 - 4*a*c])^p*AppellF1[4, -p, - 
p, 5, (-2*c*x)/(b + Sqrt[b^2 - 4*a*c]), (2*c*x)/(-b + Sqrt[b^2 - 4*a*c])] 
+ 4*c*e^3*g*x^5*((b + Sqrt[b^2 - 4*a*c] + 2*c*x)/Sqrt[b^2 - 4*a*c])^p*Appe 
llF1[5, -p, -p, 6, (-2*c*x)/(b + Sqrt[b^2 - 4*a*c]), (2*c*x)/(-b + Sqrt[b^ 
2 - 4*a*c])] + 4*c*e^3*g*p*x^5*((b + Sqrt[b^2 - 4*a*c] + 2*c*x)/Sqrt[b^2 - 
 4*a*c])^p*AppellF1[5, -p, -p, 6, (-2*c*x)/(b + Sqrt[b^2 - 4*a*c]), (2*c*x 
)/(-b + Sqrt[b^2 - 4*a*c])] + 5*2^(1 + p)*b*d^3*f*((b - Sqrt[b^2 - 4*a*c] 
+ 2*c*x)/(b - Sqrt[b^2 - 4*a*c]))^p*((b + Sqrt[b^2 - 4*a*c] + 2*c*x)/(b...
 

Rubi [A] (warning: unable to verify)

Time = 2.07 (sec) , antiderivative size = 725, normalized size of antiderivative = 1.07, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {1236, 1236, 1225, 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 (d+e x)^3 (f+g x) \left (a+b x+c x^2\right )^p \, dx\)

\(\Big \downarrow \) 1236

\(\displaystyle \frac {\int (d+e x)^2 (c d f (2 p+5)-g (3 a e+b d (p+1))+(3 c d g-b e (p+4) g+c e f (2 p+5)) x) \left (c x^2+b x+a\right )^pdx}{c (2 p+5)}+\frac {g (d+e x)^3 \left (a+b x+c x^2\right )^{p+1}}{c (2 p+5)}\)

\(\Big \downarrow \) 1236

\(\displaystyle \frac {\frac {\int (d+e x) \left (2 c^2 f \left (2 p^2+9 p+10\right ) d^2+b e g (p+4) (2 a e+b d (p+1))-c (2 a e (3 d g (p+3)+e f (2 p+5))+b d (p+1) (e f (2 p+5)+d g (2 p+7)))+\left (2 d \left (3 d g+e f \left (2 p^2+11 p+15\right )\right ) c^2-e \left (6 a e g (p+2)+b e f \left (2 p^2+11 p+15\right )+b d g \left (2 p^2+11 p+21\right )\right ) c+b^2 e^2 g \left (p^2+7 p+12\right )\right ) x\right ) \left (c x^2+b x+a\right )^pdx}{2 c (p+2)}+\frac {(d+e x)^2 \left (a+b x+c x^2\right )^{p+1} (-b e g (p+4)+3 c d g+c e f (2 p+5))}{2 c (p+2)}}{c (2 p+5)}+\frac {g (d+e x)^3 \left (a+b x+c x^2\right )^{p+1}}{c (2 p+5)}\)

\(\Big \downarrow \) 1225

\(\displaystyle \frac {\frac {\frac {(p+2) \left (6 c^2 e \left (2 a^2 e^2 g+a b e (2 p+5) (3 d g+e f)+b^2 d \left (2 p^2+9 p+10\right ) (d g+e f)\right )-b^2 c e^2 (p+3) (12 a e g+b (2 p+5) (3 d g+e f))-2 c^3 d (2 p+5) (6 a e (d g+e f)+b d (2 p+3) (d g+3 e f))+b^4 e^3 g \left (p^2+7 p+12\right )+4 c^4 d^3 f \left (4 p^2+16 p+15\right )\right ) \int \left (c x^2+b x+a\right )^pdx}{2 c^2 (2 p+3)}-\frac {\left (a+b x+c x^2\right )^{p+1} \left (-2 c e (p+1) x \left (-c e \left (6 a e g (p+2)+b d g \left (2 p^2+11 p+21\right )+b e f \left (2 p^2+11 p+15\right )\right )+b^2 e^2 g \left (p^2+7 p+12\right )+2 c^2 d \left (3 d g+e f \left (2 p^2+11 p+15\right )\right )\right )+b e (p+2) \left (-c e \left (6 a e g (p+2)+b d g \left (2 p^2+11 p+21\right )+b e f \left (2 p^2+11 p+15\right )\right )+b^2 e^2 g \left (p^2+7 p+12\right )+2 c^2 d \left (3 d g+e f \left (2 p^2+11 p+15\right )\right )\right )-c (2 p+3) \left (-2 c e \left (a e (2 p+5) (3 d g+e f)+b d \left (2 d g \left (p^2+5 p+7\right )+e f \left (2 p^2+9 p+10\right )\right )\right )+2 b e^2 g (p+4) (a e+b d (p+2))+2 c^2 d^2 \left (3 d g+e f (2 p+5)^2\right )\right )\right )}{2 c^2 (p+1) (2 p+3)}}{2 c (p+2)}+\frac {(d+e x)^2 \left (a+b x+c x^2\right )^{p+1} (-b e g (p+4)+3 c d g+c e f (2 p+5))}{2 c (p+2)}}{c (2 p+5)}+\frac {g (d+e x)^3 \left (a+b x+c x^2\right )^{p+1}}{c (2 p+5)}\)

\(\Big \downarrow \) 1096

\(\displaystyle \frac {\frac {-\frac {2^p (p+2) \left (a+b x+c x^2\right )^{p+1} \left (-\frac {-\sqrt {b^2-4 a c}+b+2 c x}{\sqrt {b^2-4 a c}}\right )^{-p-1} \operatorname {Hypergeometric2F1}\left (-p,p+1,p+2,\frac {b+2 c x+\sqrt {b^2-4 a c}}{2 \sqrt {b^2-4 a c}}\right ) \left (6 c^2 e \left (2 a^2 e^2 g+a b e (2 p+5) (3 d g+e f)+b^2 d \left (2 p^2+9 p+10\right ) (d g+e f)\right )-b^2 c e^2 (p+3) (12 a e g+b (2 p+5) (3 d g+e f))-2 c^3 d (2 p+5) (6 a e (d g+e f)+b d (2 p+3) (d g+3 e f))+b^4 e^3 g \left (p^2+7 p+12\right )+4 c^4 d^3 f \left (4 p^2+16 p+15\right )\right )}{c^2 (p+1) (2 p+3) \sqrt {b^2-4 a c}}-\frac {\left (a+b x+c x^2\right )^{p+1} \left (-2 c e (p+1) x \left (-c e \left (6 a e g (p+2)+b d g \left (2 p^2+11 p+21\right )+b e f \left (2 p^2+11 p+15\right )\right )+b^2 e^2 g \left (p^2+7 p+12\right )+2 c^2 d \left (3 d g+e f \left (2 p^2+11 p+15\right )\right )\right )+b e (p+2) \left (-c e \left (6 a e g (p+2)+b d g \left (2 p^2+11 p+21\right )+b e f \left (2 p^2+11 p+15\right )\right )+b^2 e^2 g \left (p^2+7 p+12\right )+2 c^2 d \left (3 d g+e f \left (2 p^2+11 p+15\right )\right )\right )-c (2 p+3) \left (-2 c e \left (a e (2 p+5) (3 d g+e f)+b d \left (2 d g \left (p^2+5 p+7\right )+e f \left (2 p^2+9 p+10\right )\right )\right )+2 b e^2 g (p+4) (a e+b d (p+2))+2 c^2 d^2 \left (3 d g+e f (2 p+5)^2\right )\right )\right )}{2 c^2 (p+1) (2 p+3)}}{2 c (p+2)}+\frac {(d+e x)^2 \left (a+b x+c x^2\right )^{p+1} (-b e g (p+4)+3 c d g+c e f (2 p+5))}{2 c (p+2)}}{c (2 p+5)}+\frac {g (d+e x)^3 \left (a+b x+c x^2\right )^{p+1}}{c (2 p+5)}\)

Input:

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

Output:

(g*(d + e*x)^3*(a + b*x + c*x^2)^(1 + p))/(c*(5 + 2*p)) + (((3*c*d*g - b*e 
*g*(4 + p) + c*e*f*(5 + 2*p))*(d + e*x)^2*(a + b*x + c*x^2)^(1 + p))/(2*c* 
(2 + p)) + (-1/2*((b*e*(2 + p)*(b^2*e^2*g*(12 + 7*p + p^2) + 2*c^2*d*(3*d* 
g + e*f*(15 + 11*p + 2*p^2)) - c*e*(6*a*e*g*(2 + p) + b*e*f*(15 + 11*p + 2 
*p^2) + b*d*g*(21 + 11*p + 2*p^2))) - c*(3 + 2*p)*(2*b*e^2*g*(4 + p)*(a*e 
+ b*d*(2 + p)) + 2*c^2*d^2*(3*d*g + e*f*(5 + 2*p)^2) - 2*c*e*(a*e*(e*f + 3 
*d*g)*(5 + 2*p) + b*d*(2*d*g*(7 + 5*p + p^2) + e*f*(10 + 9*p + 2*p^2)))) - 
 2*c*e*(1 + p)*(b^2*e^2*g*(12 + 7*p + p^2) + 2*c^2*d*(3*d*g + e*f*(15 + 11 
*p + 2*p^2)) - c*e*(6*a*e*g*(2 + p) + b*e*f*(15 + 11*p + 2*p^2) + b*d*g*(2 
1 + 11*p + 2*p^2)))*x)*(a + b*x + c*x^2)^(1 + p))/(c^2*(1 + p)*(3 + 2*p)) 
- (2^p*(2 + p)*(b^4*e^3*g*(12 + 7*p + p^2) + 4*c^4*d^3*f*(15 + 16*p + 4*p^ 
2) - 2*c^3*d*(5 + 2*p)*(6*a*e*(e*f + d*g) + b*d*(3*e*f + d*g)*(3 + 2*p)) - 
 b^2*c*e^2*(3 + p)*(12*a*e*g + b*(e*f + 3*d*g)*(5 + 2*p)) + 6*c^2*e*(2*a^2 
*e^2*g + a*b*e*(e*f + 3*d*g)*(5 + 2*p) + b^2*d*(e*f + d*g)*(10 + 9*p + 2*p 
^2)))*(-((b - Sqrt[b^2 - 4*a*c] + 2*c*x)/Sqrt[b^2 - 4*a*c]))^(-1 - p)*(a + 
 b*x + c*x^2)^(1 + p)*Hypergeometric2F1[-p, 1 + p, 2 + p, (b + Sqrt[b^2 - 
4*a*c] + 2*c*x)/(2*Sqrt[b^2 - 4*a*c])])/(c^2*Sqrt[b^2 - 4*a*c]*(1 + p)*(3 
+ 2*p)))/(2*c*(2 + p)))/(c*(5 + 2*p))
 

Defintions of rubi rules used

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 1225
Int[((d_.) + (e_.)*(x_))*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*( 
x_)^2)^(p_), x_Symbol] :> Simp[(-(b*e*g*(p + 2) - c*(e*f + d*g)*(2*p + 3) - 
 2*c*e*g*(p + 1)*x))*((a + b*x + c*x^2)^(p + 1)/(2*c^2*(p + 1)*(2*p + 3))), 
 x] + Simp[(b^2*e*g*(p + 2) - 2*a*c*e*g + c*(2*c*d*f - b*(e*f + d*g))*(2*p 
+ 3))/(2*c^2*(2*p + 3))   Int[(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c 
, d, e, f, g, p}, x] &&  !LeQ[p, -1]
 

rule 1236
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c 
_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[g*(d + e*x)^m*((a + b*x + c*x^2)^(p + 
1)/(c*(m + 2*p + 2))), x] + Simp[1/(c*(m + 2*p + 2))   Int[(d + e*x)^(m - 1 
)*(a + b*x + c*x^2)^p*Simp[m*(c*d*f - a*e*g) + d*(2*c*f - b*g)*(p + 1) + (m 
*(c*e*f + c*d*g - b*e*g) + e*(p + 1)*(2*c*f - b*g))*x, x], x], x] /; FreeQ[ 
{a, b, c, d, e, f, g, p}, x] && GtQ[m, 0] && NeQ[m + 2*p + 2, 0] && (Intege 
rQ[m] || IntegerQ[p] || IntegersQ[2*m, 2*p]) &&  !(IGtQ[m, 0] && EqQ[f, 0])
 
Maple [F]

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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