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

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

Optimal result

Integrand size = 27, antiderivative size = 90 \[ \int (e+f x)^m \left (a c+(b c+a d) x+b d x^2\right ) \, dx=\frac {(b e-a f) (d e-c f) (e+f x)^{1+m}}{f^3 (1+m)}-\frac {(2 b d e-b c f-a d f) (e+f x)^{2+m}}{f^3 (2+m)}+\frac {b d (e+f x)^{3+m}}{f^3 (3+m)} \] Output:

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

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.88 \[ \int (e+f x)^m \left (a c+(b c+a d) x+b d x^2\right ) \, dx=\frac {(e+f x)^{1+m} \left (\frac {(b e-a f) (d e-c f)}{1+m}-\frac {(2 b d e-b c f-a d f) (e+f x)}{2+m}+\frac {b d (e+f x)^2}{3+m}\right )}{f^3} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.25 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {1140, 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 (e+f x)^m \left (x (a d+b c)+a c+b d x^2\right ) \, dx\)

\(\Big \downarrow \) 1140

\(\displaystyle \int \left (\frac {(a f-b e) (c f-d e) (e+f x)^m}{f^2}+\frac {(e+f x)^{m+1} (a d f+b c f-2 b d e)}{f^2}+\frac {b d (e+f x)^{m+2}}{f^2}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {(b e-a f) (d e-c f) (e+f x)^{m+1}}{f^3 (m+1)}-\frac {(e+f x)^{m+2} (-a d f-b c f+2 b d e)}{f^3 (m+2)}+\frac {b d (e+f x)^{m+3}}{f^3 (m+3)}\)

Input:

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

Output:

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

Defintions of rubi rules used

rule 1140
Int[((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x 
_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(a + b*x + c*x^2)^p, x], x] /; 
FreeQ[{a, b, c, d, e, m}, x] && IGtQ[p, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(188\) vs. \(2(90)=180\).

Time = 0.55 (sec) , antiderivative size = 189, normalized size of antiderivative = 2.10

method result size
gosper \(\frac {\left (f x +e \right )^{1+m} \left (b d \,f^{2} m^{2} x^{2}+a d \,f^{2} m^{2} x +b c \,f^{2} m^{2} x +3 b d \,f^{2} m \,x^{2}+a c \,f^{2} m^{2}+4 a d \,f^{2} m x +4 b c \,f^{2} m x -2 b d e f m x +2 b d \,x^{2} f^{2}+5 a c \,f^{2} m -a d e f m +3 a d \,f^{2} x -b c e f m +3 b c \,f^{2} x -2 b d e f x +6 a c \,f^{2}-3 a d e f -3 b c e f +2 b d \,e^{2}\right )}{f^{3} \left (m^{3}+6 m^{2}+11 m +6\right )}\) \(189\)
orering \(\frac {\left (b d \,f^{2} m^{2} x^{2}+a d \,f^{2} m^{2} x +b c \,f^{2} m^{2} x +3 b d \,f^{2} m \,x^{2}+a c \,f^{2} m^{2}+4 a d \,f^{2} m x +4 b c \,f^{2} m x -2 b d e f m x +2 b d \,x^{2} f^{2}+5 a c \,f^{2} m -a d e f m +3 a d \,f^{2} x -b c e f m +3 b c \,f^{2} x -2 b d e f x +6 a c \,f^{2}-3 a d e f -3 b c e f +2 b d \,e^{2}\right ) \left (f x +e \right ) \left (f x +e \right )^{m} \left (a c +\left (a d +b c \right ) x +b d \,x^{2}\right )}{f^{3} \left (m^{3}+6 m^{2}+11 m +6\right ) \left (b x +a \right ) \left (d x +c \right )}\) \(225\)
norman \(\frac {b d \,x^{3} {\mathrm e}^{m \ln \left (f x +e \right )}}{3+m}+\frac {e \left (a c \,f^{2} m^{2}+5 a c \,f^{2} m -a d e f m -b c e f m +6 a c \,f^{2}-3 a d e f -3 b c e f +2 b d \,e^{2}\right ) {\mathrm e}^{m \ln \left (f x +e \right )}}{f^{3} \left (m^{3}+6 m^{2}+11 m +6\right )}+\frac {\left (a d f m +b c f m +b d e m +3 a d f +3 b c f \right ) x^{2} {\mathrm e}^{m \ln \left (f x +e \right )}}{f \left (m^{2}+5 m +6\right )}+\frac {\left (a c \,f^{2} m^{2}+a d e f \,m^{2}+b c e f \,m^{2}+5 a c \,f^{2} m +3 a d e f m +3 b c e f m -2 b d \,e^{2} m +6 a c \,f^{2}\right ) x \,{\mathrm e}^{m \ln \left (f x +e \right )}}{f^{2} \left (m^{3}+6 m^{2}+11 m +6\right )}\) \(253\)
risch \(\frac {\left (b d \,f^{3} m^{2} x^{3}+a d \,f^{3} m^{2} x^{2}+b c \,f^{3} m^{2} x^{2}+b d e \,f^{2} m^{2} x^{2}+3 b d \,f^{3} m \,x^{3}+a c \,f^{3} m^{2} x +a d e \,f^{2} m^{2} x +4 a d \,f^{3} m \,x^{2}+b c e \,f^{2} m^{2} x +4 b c \,f^{3} m \,x^{2}+b d e \,f^{2} m \,x^{2}+2 b d \,x^{3} f^{3}+a c e \,f^{2} m^{2}+5 a c \,f^{3} m x +3 a d e \,f^{2} m x +3 a d \,f^{3} x^{2}+3 b c e \,f^{2} m x +3 b c \,f^{3} x^{2}-2 b d \,e^{2} f m x +5 a c e \,f^{2} m +6 a c \,f^{3} x -a d \,e^{2} f m -b c \,e^{2} f m +6 a c e \,f^{2}-3 a d \,e^{2} f -3 b c \,e^{2} f +2 b d \,e^{3}\right ) \left (f x +e \right )^{m}}{\left (2+m \right ) \left (3+m \right ) \left (1+m \right ) f^{3}}\) \(298\)
parallelrisch \(\frac {6 x \left (f x +e \right )^{m} a c e \,f^{3}+5 \left (f x +e \right )^{m} a c \,e^{2} f^{2} m -\left (f x +e \right )^{m} a d \,e^{3} f m +x \left (f x +e \right )^{m} a d \,e^{2} f^{2} m^{2}+2 x^{3} \left (f x +e \right )^{m} b d e \,f^{3}+3 x^{2} \left (f x +e \right )^{m} a d e \,f^{3}+3 x^{2} \left (f x +e \right )^{m} b c e \,f^{3}+\left (f x +e \right )^{m} a c \,e^{2} f^{2} m^{2}-\left (f x +e \right )^{m} b c \,e^{3} f m +2 \left (f x +e \right )^{m} b d \,e^{4}+x^{3} \left (f x +e \right )^{m} b d e \,f^{3} m^{2}+3 x^{3} \left (f x +e \right )^{m} b d e \,f^{3} m +x^{2} \left (f x +e \right )^{m} a d e \,f^{3} m^{2}+x^{2} \left (f x +e \right )^{m} b c e \,f^{3} m^{2}+x^{2} \left (f x +e \right )^{m} b d \,e^{2} f^{2} m^{2}+4 x^{2} \left (f x +e \right )^{m} a d e \,f^{3} m +x \left (f x +e \right )^{m} b c \,e^{2} f^{2} m^{2}+5 x \left (f x +e \right )^{m} a c e \,f^{3} m +3 x \left (f x +e \right )^{m} a d \,e^{2} f^{2} m +3 x \left (f x +e \right )^{m} b c \,e^{2} f^{2} m +4 x^{2} \left (f x +e \right )^{m} b c e \,f^{3} m +x^{2} \left (f x +e \right )^{m} b d \,e^{2} f^{2} m -2 x \left (f x +e \right )^{m} b d \,e^{3} f m +x \left (f x +e \right )^{m} a c e \,f^{3} m^{2}+6 \left (f x +e \right )^{m} a c \,e^{2} f^{2}-3 \left (f x +e \right )^{m} a d \,e^{3} f -3 \left (f x +e \right )^{m} b c \,e^{3} f}{\left (3+m \right ) \left (2+m \right ) \left (1+m \right ) f^{3} e}\) \(513\)

Input:

int((f*x+e)^m*(a*c+(a*d+b*c)*x+b*d*x^2),x,method=_RETURNVERBOSE)
 

Output:

1/f^3*(f*x+e)^(1+m)/(m^3+6*m^2+11*m+6)*(b*d*f^2*m^2*x^2+a*d*f^2*m^2*x+b*c* 
f^2*m^2*x+3*b*d*f^2*m*x^2+a*c*f^2*m^2+4*a*d*f^2*m*x+4*b*c*f^2*m*x-2*b*d*e* 
f*m*x+2*b*d*f^2*x^2+5*a*c*f^2*m-a*d*e*f*m+3*a*d*f^2*x-b*c*e*f*m+3*b*c*f^2* 
x-2*b*d*e*f*x+6*a*c*f^2-3*a*d*e*f-3*b*c*e*f+2*b*d*e^2)
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 256 vs. \(2 (90) = 180\).

Time = 0.09 (sec) , antiderivative size = 256, normalized size of antiderivative = 2.84 \[ \int (e+f x)^m \left (a c+(b c+a d) x+b d x^2\right ) \, dx=\frac {{\left (a c e f^{2} m^{2} + 2 \, b d e^{3} + 6 \, a c e f^{2} - 3 \, {\left (b c + a d\right )} e^{2} f + {\left (b d f^{3} m^{2} + 3 \, b d f^{3} m + 2 \, b d f^{3}\right )} x^{3} + {\left (3 \, {\left (b c + a d\right )} f^{3} + {\left (b d e f^{2} + {\left (b c + a d\right )} f^{3}\right )} m^{2} + {\left (b d e f^{2} + 4 \, {\left (b c + a d\right )} f^{3}\right )} m\right )} x^{2} + {\left (5 \, a c e f^{2} - {\left (b c + a d\right )} e^{2} f\right )} m + {\left (6 \, a c f^{3} + {\left (a c f^{3} + {\left (b c + a d\right )} e f^{2}\right )} m^{2} - {\left (2 \, b d e^{2} f - 5 \, a c f^{3} - 3 \, {\left (b c + a d\right )} e f^{2}\right )} m\right )} x\right )} {\left (f x + e\right )}^{m}}{f^{3} m^{3} + 6 \, f^{3} m^{2} + 11 \, f^{3} m + 6 \, f^{3}} \] Input:

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

Output:

(a*c*e*f^2*m^2 + 2*b*d*e^3 + 6*a*c*e*f^2 - 3*(b*c + a*d)*e^2*f + (b*d*f^3* 
m^2 + 3*b*d*f^3*m + 2*b*d*f^3)*x^3 + (3*(b*c + a*d)*f^3 + (b*d*e*f^2 + (b* 
c + a*d)*f^3)*m^2 + (b*d*e*f^2 + 4*(b*c + a*d)*f^3)*m)*x^2 + (5*a*c*e*f^2 
- (b*c + a*d)*e^2*f)*m + (6*a*c*f^3 + (a*c*f^3 + (b*c + a*d)*e*f^2)*m^2 - 
(2*b*d*e^2*f - 5*a*c*f^3 - 3*(b*c + a*d)*e*f^2)*m)*x)*(f*x + e)^m/(f^3*m^3 
 + 6*f^3*m^2 + 11*f^3*m + 6*f^3)
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1982 vs. \(2 (78) = 156\).

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

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

Output:

Piecewise((e**m*(a*c*x + a*d*x**2/2 + b*c*x**2/2 + b*d*x**3/3), Eq(f, 0)), 
 (-a*c*f**2/(2*e**2*f**3 + 4*e*f**4*x + 2*f**5*x**2) - a*d*e*f/(2*e**2*f** 
3 + 4*e*f**4*x + 2*f**5*x**2) - 2*a*d*f**2*x/(2*e**2*f**3 + 4*e*f**4*x + 2 
*f**5*x**2) - b*c*e*f/(2*e**2*f**3 + 4*e*f**4*x + 2*f**5*x**2) - 2*b*c*f** 
2*x/(2*e**2*f**3 + 4*e*f**4*x + 2*f**5*x**2) + 2*b*d*e**2*log(e/f + x)/(2* 
e**2*f**3 + 4*e*f**4*x + 2*f**5*x**2) + 3*b*d*e**2/(2*e**2*f**3 + 4*e*f**4 
*x + 2*f**5*x**2) + 4*b*d*e*f*x*log(e/f + x)/(2*e**2*f**3 + 4*e*f**4*x + 2 
*f**5*x**2) + 4*b*d*e*f*x/(2*e**2*f**3 + 4*e*f**4*x + 2*f**5*x**2) + 2*b*d 
*f**2*x**2*log(e/f + x)/(2*e**2*f**3 + 4*e*f**4*x + 2*f**5*x**2), Eq(m, -3 
)), (-a*c*f**2/(e*f**3 + f**4*x) + a*d*e*f*log(e/f + x)/(e*f**3 + f**4*x) 
+ a*d*e*f/(e*f**3 + f**4*x) + a*d*f**2*x*log(e/f + x)/(e*f**3 + f**4*x) + 
b*c*e*f*log(e/f + x)/(e*f**3 + f**4*x) + b*c*e*f/(e*f**3 + f**4*x) + b*c*f 
**2*x*log(e/f + x)/(e*f**3 + f**4*x) - 2*b*d*e**2*log(e/f + x)/(e*f**3 + f 
**4*x) - 2*b*d*e**2/(e*f**3 + f**4*x) - 2*b*d*e*f*x*log(e/f + x)/(e*f**3 + 
 f**4*x) + b*d*f**2*x**2/(e*f**3 + f**4*x), Eq(m, -2)), (a*c*log(e/f + x)/ 
f - a*d*e*log(e/f + x)/f**2 + a*d*x/f - b*c*e*log(e/f + x)/f**2 + b*c*x/f 
+ b*d*e**2*log(e/f + x)/f**3 - b*d*e*x/f**2 + b*d*x**2/(2*f), Eq(m, -1)), 
(a*c*e*f**2*m**2*(e + f*x)**m/(f**3*m**3 + 6*f**3*m**2 + 11*f**3*m + 6*f** 
3) + 5*a*c*e*f**2*m*(e + f*x)**m/(f**3*m**3 + 6*f**3*m**2 + 11*f**3*m + 6* 
f**3) + 6*a*c*e*f**2*(e + f*x)**m/(f**3*m**3 + 6*f**3*m**2 + 11*f**3*m ...
 

Maxima [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 179, normalized size of antiderivative = 1.99 \[ \int (e+f x)^m \left (a c+(b c+a d) x+b d x^2\right ) \, dx=\frac {{\left (f^{2} {\left (m + 1\right )} x^{2} + e f m x - e^{2}\right )} {\left (f x + e\right )}^{m} b c}{{\left (m^{2} + 3 \, m + 2\right )} f^{2}} + \frac {{\left (f^{2} {\left (m + 1\right )} x^{2} + e f m x - e^{2}\right )} {\left (f x + e\right )}^{m} a d}{{\left (m^{2} + 3 \, m + 2\right )} f^{2}} + \frac {{\left (f x + e\right )}^{m + 1} a c}{f {\left (m + 1\right )}} + \frac {{\left ({\left (m^{2} + 3 \, m + 2\right )} f^{3} x^{3} + {\left (m^{2} + m\right )} e f^{2} x^{2} - 2 \, e^{2} f m x + 2 \, e^{3}\right )} {\left (f x + e\right )}^{m} b d}{{\left (m^{3} + 6 \, m^{2} + 11 \, m + 6\right )} f^{3}} \] Input:

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

Output:

(f^2*(m + 1)*x^2 + e*f*m*x - e^2)*(f*x + e)^m*b*c/((m^2 + 3*m + 2)*f^2) + 
(f^2*(m + 1)*x^2 + e*f*m*x - e^2)*(f*x + e)^m*a*d/((m^2 + 3*m + 2)*f^2) + 
(f*x + e)^(m + 1)*a*c/(f*(m + 1)) + ((m^2 + 3*m + 2)*f^3*x^3 + (m^2 + m)*e 
*f^2*x^2 - 2*e^2*f*m*x + 2*e^3)*(f*x + e)^m*b*d/((m^3 + 6*m^2 + 11*m + 6)* 
f^3)
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 490 vs. \(2 (90) = 180\).

Time = 0.37 (sec) , antiderivative size = 490, normalized size of antiderivative = 5.44 \[ \int (e+f x)^m \left (a c+(b c+a d) x+b d x^2\right ) \, dx=\frac {{\left (f x + e\right )}^{m} b d f^{3} m^{2} x^{3} + {\left (f x + e\right )}^{m} b d e f^{2} m^{2} x^{2} + {\left (f x + e\right )}^{m} b c f^{3} m^{2} x^{2} + {\left (f x + e\right )}^{m} a d f^{3} m^{2} x^{2} + 3 \, {\left (f x + e\right )}^{m} b d f^{3} m x^{3} + {\left (f x + e\right )}^{m} b c e f^{2} m^{2} x + {\left (f x + e\right )}^{m} a d e f^{2} m^{2} x + {\left (f x + e\right )}^{m} a c f^{3} m^{2} x + {\left (f x + e\right )}^{m} b d e f^{2} m x^{2} + 4 \, {\left (f x + e\right )}^{m} b c f^{3} m x^{2} + 4 \, {\left (f x + e\right )}^{m} a d f^{3} m x^{2} + 2 \, {\left (f x + e\right )}^{m} b d f^{3} x^{3} + {\left (f x + e\right )}^{m} a c e f^{2} m^{2} - 2 \, {\left (f x + e\right )}^{m} b d e^{2} f m x + 3 \, {\left (f x + e\right )}^{m} b c e f^{2} m x + 3 \, {\left (f x + e\right )}^{m} a d e f^{2} m x + 5 \, {\left (f x + e\right )}^{m} a c f^{3} m x + 3 \, {\left (f x + e\right )}^{m} b c f^{3} x^{2} + 3 \, {\left (f x + e\right )}^{m} a d f^{3} x^{2} - {\left (f x + e\right )}^{m} b c e^{2} f m - {\left (f x + e\right )}^{m} a d e^{2} f m + 5 \, {\left (f x + e\right )}^{m} a c e f^{2} m + 6 \, {\left (f x + e\right )}^{m} a c f^{3} x + 2 \, {\left (f x + e\right )}^{m} b d e^{3} - 3 \, {\left (f x + e\right )}^{m} b c e^{2} f - 3 \, {\left (f x + e\right )}^{m} a d e^{2} f + 6 \, {\left (f x + e\right )}^{m} a c e f^{2}}{f^{3} m^{3} + 6 \, f^{3} m^{2} + 11 \, f^{3} m + 6 \, f^{3}} \] Input:

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

Output:

((f*x + e)^m*b*d*f^3*m^2*x^3 + (f*x + e)^m*b*d*e*f^2*m^2*x^2 + (f*x + e)^m 
*b*c*f^3*m^2*x^2 + (f*x + e)^m*a*d*f^3*m^2*x^2 + 3*(f*x + e)^m*b*d*f^3*m*x 
^3 + (f*x + e)^m*b*c*e*f^2*m^2*x + (f*x + e)^m*a*d*e*f^2*m^2*x + (f*x + e) 
^m*a*c*f^3*m^2*x + (f*x + e)^m*b*d*e*f^2*m*x^2 + 4*(f*x + e)^m*b*c*f^3*m*x 
^2 + 4*(f*x + e)^m*a*d*f^3*m*x^2 + 2*(f*x + e)^m*b*d*f^3*x^3 + (f*x + e)^m 
*a*c*e*f^2*m^2 - 2*(f*x + e)^m*b*d*e^2*f*m*x + 3*(f*x + e)^m*b*c*e*f^2*m*x 
 + 3*(f*x + e)^m*a*d*e*f^2*m*x + 5*(f*x + e)^m*a*c*f^3*m*x + 3*(f*x + e)^m 
*b*c*f^3*x^2 + 3*(f*x + e)^m*a*d*f^3*x^2 - (f*x + e)^m*b*c*e^2*f*m - (f*x 
+ e)^m*a*d*e^2*f*m + 5*(f*x + e)^m*a*c*e*f^2*m + 6*(f*x + e)^m*a*c*f^3*x + 
 2*(f*x + e)^m*b*d*e^3 - 3*(f*x + e)^m*b*c*e^2*f - 3*(f*x + e)^m*a*d*e^2*f 
 + 6*(f*x + e)^m*a*c*e*f^2)/(f^3*m^3 + 6*f^3*m^2 + 11*f^3*m + 6*f^3)
 

Mupad [B] (verification not implemented)

Time = 5.89 (sec) , antiderivative size = 259, normalized size of antiderivative = 2.88 \[ \int (e+f x)^m \left (a c+(b c+a d) x+b d x^2\right ) \, dx={\left (e+f\,x\right )}^m\,\left (\frac {x\,\left (6\,a\,c\,f^3+5\,a\,c\,f^3\,m+a\,c\,f^3\,m^2+a\,d\,e\,f^2\,m^2+b\,c\,e\,f^2\,m^2+3\,a\,d\,e\,f^2\,m+3\,b\,c\,e\,f^2\,m-2\,b\,d\,e^2\,f\,m\right )}{f^3\,\left (m^3+6\,m^2+11\,m+6\right )}+\frac {e\,\left (6\,a\,c\,f^2+2\,b\,d\,e^2+5\,a\,c\,f^2\,m+a\,c\,f^2\,m^2-3\,a\,d\,e\,f-3\,b\,c\,e\,f-a\,d\,e\,f\,m-b\,c\,e\,f\,m\right )}{f^3\,\left (m^3+6\,m^2+11\,m+6\right )}+\frac {b\,d\,x^3\,\left (m^2+3\,m+2\right )}{m^3+6\,m^2+11\,m+6}+\frac {x^2\,\left (m+1\right )\,\left (3\,a\,d\,f+3\,b\,c\,f+a\,d\,f\,m+b\,c\,f\,m+b\,d\,e\,m\right )}{f\,\left (m^3+6\,m^2+11\,m+6\right )}\right ) \] Input:

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

Output:

(e + f*x)^m*((x*(6*a*c*f^3 + 5*a*c*f^3*m + a*c*f^3*m^2 + a*d*e*f^2*m^2 + b 
*c*e*f^2*m^2 + 3*a*d*e*f^2*m + 3*b*c*e*f^2*m - 2*b*d*e^2*f*m))/(f^3*(11*m 
+ 6*m^2 + m^3 + 6)) + (e*(6*a*c*f^2 + 2*b*d*e^2 + 5*a*c*f^2*m + a*c*f^2*m^ 
2 - 3*a*d*e*f - 3*b*c*e*f - a*d*e*f*m - b*c*e*f*m))/(f^3*(11*m + 6*m^2 + m 
^3 + 6)) + (b*d*x^3*(3*m + m^2 + 2))/(11*m + 6*m^2 + m^3 + 6) + (x^2*(m + 
1)*(3*a*d*f + 3*b*c*f + a*d*f*m + b*c*f*m + b*d*e*m))/(f*(11*m + 6*m^2 + m 
^3 + 6)))
 

Reduce [B] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 297, normalized size of antiderivative = 3.30 \[ \int (e+f x)^m \left (a c+(b c+a d) x+b d x^2\right ) \, dx=\frac {\left (f x +e \right )^{m} \left (b d \,f^{3} m^{2} x^{3}+a d \,f^{3} m^{2} x^{2}+b c \,f^{3} m^{2} x^{2}+b d e \,f^{2} m^{2} x^{2}+3 b d \,f^{3} m \,x^{3}+a c \,f^{3} m^{2} x +a d e \,f^{2} m^{2} x +4 a d \,f^{3} m \,x^{2}+b c e \,f^{2} m^{2} x +4 b c \,f^{3} m \,x^{2}+b d e \,f^{2} m \,x^{2}+2 b d \,f^{3} x^{3}+a c e \,f^{2} m^{2}+5 a c \,f^{3} m x +3 a d e \,f^{2} m x +3 a d \,f^{3} x^{2}+3 b c e \,f^{2} m x +3 b c \,f^{3} x^{2}-2 b d \,e^{2} f m x +5 a c e \,f^{2} m +6 a c \,f^{3} x -a d \,e^{2} f m -b c \,e^{2} f m +6 a c e \,f^{2}-3 a d \,e^{2} f -3 b c \,e^{2} f +2 b d \,e^{3}\right )}{f^{3} \left (m^{3}+6 m^{2}+11 m +6\right )} \] Input:

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

Output:

((e + f*x)**m*(a*c*e*f**2*m**2 + 5*a*c*e*f**2*m + 6*a*c*e*f**2 + a*c*f**3* 
m**2*x + 5*a*c*f**3*m*x + 6*a*c*f**3*x - a*d*e**2*f*m - 3*a*d*e**2*f + a*d 
*e*f**2*m**2*x + 3*a*d*e*f**2*m*x + a*d*f**3*m**2*x**2 + 4*a*d*f**3*m*x**2 
 + 3*a*d*f**3*x**2 - b*c*e**2*f*m - 3*b*c*e**2*f + b*c*e*f**2*m**2*x + 3*b 
*c*e*f**2*m*x + b*c*f**3*m**2*x**2 + 4*b*c*f**3*m*x**2 + 3*b*c*f**3*x**2 + 
 2*b*d*e**3 - 2*b*d*e**2*f*m*x + b*d*e*f**2*m**2*x**2 + b*d*e*f**2*m*x**2 
+ b*d*f**3*m**2*x**3 + 3*b*d*f**3*m*x**3 + 2*b*d*f**3*x**3))/(f**3*(m**3 + 
 6*m**2 + 11*m + 6))